Skip to content

Commit b333d0d

Browse files
ramsay-jonesgitster
authored andcommitted
write_or_die: remove the unused write_or_whine() function
Now the last caller of this function is gone, and new ones are unlikely to appear, because this function is doing very little that a regular if() does not besides obfuscating the error message (and if we ever did want something like it, we would probably prefer the function to come back with more "normal" return value semantics). Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f0bca72 commit b333d0d

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,6 @@ extern int copy_file(const char *dst, const char *src, int mode);
17151715
extern int copy_file_with_time(const char *dst, const char *src, int mode);
17161716

17171717
extern void write_or_die(int fd, const void *buf, size_t count);
1718-
extern int write_or_whine(int fd, const void *buf, size_t count, const char *msg);
17191718
extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg);
17201719
extern void fsync_or_die(int fd, const char *);
17211720

write_or_die.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,3 @@ int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg)
9494

9595
return 1;
9696
}
97-
98-
int write_or_whine(int fd, const void *buf, size_t count, const char *msg)
99-
{
100-
if (write_in_full(fd, buf, count) < 0) {
101-
fprintf(stderr, "%s: write error (%s)\n",
102-
msg, strerror(errno));
103-
return 0;
104-
}
105-
106-
return 1;
107-
}

0 commit comments

Comments
 (0)