diff options
author | Erik Faye-Lund <kusmabite@gmail.com> | 2014-01-17 15:17:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-17 12:09:26 -0800 |
commit | 7edc02f4deedb3a11abeb328dc2596b2886c2f47 (patch) | |
tree | f592d5687516f56552669dd16e34bfbc8d538be1 /streaming.c | |
parent | 4224916ae979204f13db2996d9e32490e0acb90f (diff) | |
download | git-7edc02f4deedb3a11abeb328dc2596b2886c2f47.tar.gz |
prefer xwrite instead of write
Our xwrite wrapper already deals with a few potential hazards, and
are as such more robust. Prefer it instead of write to get the
robustness benefits everywhere.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-and-improved-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'streaming.c')
-rw-r--r-- | streaming.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/streaming.c b/streaming.c index debe904523..e3d697b88e 100644 --- a/streaming.c +++ b/streaming.c @@ -538,7 +538,7 @@ int stream_blob_to_fd(int fd, unsigned const char *sha1, struct stream_filter *f goto close_and_exit; } if (kept && (lseek(fd, kept - 1, SEEK_CUR) == (off_t) -1 || - write(fd, "", 1) != 1)) + xwrite(fd, "", 1) != 1)) goto close_and_exit; result = 0; |