aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2005-12-15 08:47:30 +0100
committerJunio C Hamano <junkio@cox.net>2005-12-21 23:09:40 -0800
commit7246ed438c541650c2cd50e4e98b43226f60da0c (patch)
treef7b8899038e9434ce77fe7db3ca7ccf80747b2f7 /sha1_file.c
parentf4a11066cfb70c49fddbca7f95aa0fedcee53cca (diff)
downloadgit-7246ed438c541650c2cd50e4e98b43226f60da0c.tar.gz
git-7246ed438c541650c2cd50e4e98b43226f60da0c.tar.xz
\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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sha1_file.c b/sha1_file.c
index d83d8240d..601147351 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 ");
}