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 <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones committed
Jun 9, 2016 at 23:52 UTC
b333d0d6f450d4f9c4535fd9fd6e0f4ef367507c
2 files changed
-12
cache.h
-1
@@ -1715,7 +1715,6 @@ extern int copy_file(const char *dst, const char *src, int mode);
1715
extern int copy_file_with_time(const char *dst, const char *src, int mode);
1716
1717
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);
1718
extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg);
1719
extern void fsync_or_die(int fd, const char *);
1720
write_or_die.c
-11
@@ -94,14 +94,3 @@ int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg)
94
95
return 1;
96
}
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
-}