]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-tar-tree.c
Fix an "implicit function definition" warning.
[thirdparty/git.git] / builtin-tar-tree.c
index 4d4cfec878e468b8ab8a7f055c836c3569443914..8055ddab9b07e017a832e2fedf31b35fa0788a13 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * Copyright (c) 2005, 2006 Rene Scharfe
  */
-#include <time.h>
 #include "cache.h"
 #include "commit.h"
 #include "tar.h"
@@ -75,7 +74,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
        char *content = buffer + RECORDSIZE;
        ssize_t n;
 
-       n = xread(0, buffer, HEADERSIZE);
+       n = read_in_full(0, buffer, HEADERSIZE);
        if (n < HEADERSIZE)
                die("git-get-tar-commit-id: read error");
        if (header->typeflag[0] != 'g')
@@ -83,7 +82,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
        if (memcmp(content, "52 comment=", 11))
                return 1;
 
-       n = xwrite(1, content + 11, 41);
+       n = write_in_full(1, content + 11, 41);
        if (n < 41)
                die("git-get-tar-commit-id: write error");