diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2005-12-15 08:47:30 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-21 23:09:40 -0800 |
commit | 7246ed438c541650c2cd50e4e98b43226f60da0c (patch) | |
tree | f7b8899038e9434ce77fe7db3ca7ccf80747b2f7 /sha1_file.c | |
parent | f4a11066cfb70c49fddbca7f95aa0fedcee53cca (diff) | |
download | git-7246ed438c541650c2cd50e4e98b43226f60da0c.tar.gz |
\n usage in stderr output
fprintf and die sometimes have missing/excessive "\n" in their arguments,
correct the strings where I think it would be appropriate.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sha1_file.c b/sha1_file.c index d83d8240d0..601147351d 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1274,7 +1274,7 @@ int move_temp_to_file(const char *tmpfile, char *filename) unlink(tmpfile); if (ret) { if (ret != EEXIST) { - fprintf(stderr, "unable to write sha1 filename %s: %s", filename, strerror(ret)); + fprintf(stderr, "unable to write sha1 filename %s: %s\n", filename, strerror(ret)); return -1; } /* FIXME!!! Collision check here ? */ @@ -1313,7 +1313,7 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha } if (errno != ENOENT) { - fprintf(stderr, "sha1 file %s: %s", filename, strerror(errno)); + fprintf(stderr, "sha1 file %s: %s\n", filename, strerror(errno)); return -1; } @@ -1321,7 +1321,7 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha fd = mkstemp(tmpfile); if (fd < 0) { - fprintf(stderr, "unable to create temporary sha1 filename %s: %s", tmpfile, strerror(errno)); + fprintf(stderr, "unable to create temporary sha1 filename %s: %s\n", tmpfile, strerror(errno)); return -1; } @@ -1410,7 +1410,7 @@ int write_sha1_to_fd(int fd, const unsigned char *sha1) size = write(fd, buf + posn, objsize - posn); if (size <= 0) { if (!size) { - fprintf(stderr, "write closed"); + fprintf(stderr, "write closed\n"); } else { perror("write "); } |