Commit 782c030
config: flip return value of write_section()
d9bd4cb (config: flip return value of store_write_*()) made
write_section() follow the convention of write(2) to return -1 on error
and the number of written bytes on success. 3b48045 (Merge branch
'sd/branch-copy') changed it back to returning 0 on error and 1 on
success, but left its callers still checking for negative values.
Let write_section() follow the convention of write(2) again to meet the
expectations of its callers.
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 3b48045 commit 782c030
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2319 | 2319 | | |
2320 | 2320 | | |
2321 | 2321 | | |
2322 | | - | |
| 2322 | + | |
2323 | 2323 | | |
2324 | 2324 | | |
2325 | 2325 | | |
| |||
0 commit comments