X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=entry.c;h=0ebf0f0c1996b3f5ec3e16e0b557294f255b7b29;hb=e4b0e4ab8ee68df0fa99100640ed5cb54b736141;hp=793724fd52063157545f523f6d88953b96385c2c;hpb=3d990f110c2e5b8df83f6ab3ef83497f43c7fd47;p=git.git diff --git a/entry.c b/entry.c index 793724fd5..0ebf0f0c1 100644 --- a/entry.c +++ b/entry.c @@ -1,5 +1,3 @@ -#include -#include #include "cache.h" #include "blob.h" @@ -91,7 +89,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat return error("git-checkout-index: unable to create file %s (%s)", path, strerror(errno)); } - wrote = write(fd, new, size); + wrote = write_in_full(fd, new, size); close(fd); free(new); if (wrote != size) @@ -106,7 +104,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat return error("git-checkout-index: unable to create " "file %s (%s)", path, strerror(errno)); } - wrote = write(fd, new, size); + wrote = write_in_full(fd, new, size); close(fd); free(new); if (wrote != size) @@ -135,7 +133,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath) { - static char path[MAXPATHLEN+1]; + static char path[PATH_MAX + 1]; struct stat st; int len = state->base_dir_len; @@ -172,5 +170,3 @@ int checkout_entry(struct cache_entry *ce, struct checkout *state, char *topath) create_directories(path, state); return write_entry(ce, path, state, 0); } - -