Re: [PATCH v4 3/8] worktree: refactor infer_backlink return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/11/2024 05:20, Caleb White wrote:
On Tue Nov 19, 2024 at 9:08 AM CST, Phillip Wood wrote:
   	strbuf_release(&actual);
-	return 1;
-
+	return inferred->len;
   error:
   	strbuf_release(&actual);
   	strbuf_reset(inferred); /* clear invalid path */
-	return 0;
+	return -1;

Why don't we need to update the callers of this function to account for
the new return value?

Originally this function was called inside an `if` statement, however,
another topic extracted the call to a separate line and so this return
was no longer used. I decided to keep the return anyway in case it was
useful in the future.

If we don't use the return value I'd be inclined to leave it as is.

Best Wishes

Phillip


Best,

Caleb






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux