Skip to content

Commit 5867757

Browse files
avargitster
authored andcommitted
pack-objects: use BUG(...) not die("BUG: ...")
Change this code added in da93d12 (pack-objects: be incredibly anal about stdio semantics, 2006-04-02) to use BUG() instead. See 1a07e59 (Update messages in preparation for i18n, 2018-07-21) for when the "BUG: " prefix was added, and [1] for background on the Solaris behavior that prompted the exhaustive error checking in this fgets() loop. 1. https://lore.kernel.org/git/[email protected]/ Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9d7761 commit 5867757

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3397,7 +3397,7 @@ static void read_object_list_from_stdin(void)
33973397
if (feof(stdin))
33983398
break;
33993399
if (!ferror(stdin))
3400-
die("BUG: fgets returned NULL, not EOF, not error!");
3400+
BUG("fgets returned NULL, not EOF, not error!");
34013401
if (errno != EINTR)
34023402
die_errno("fgets");
34033403
clearerr(stdin);

0 commit comments

Comments
 (0)