diff options
-rw-r--r-- | builtin-update-index.c | 2 | ||||
-rw-r--r-- | convert-objects.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin-update-index.c b/builtin-update-index.c index 6ed61ebc57..8659800eec 100644 --- a/builtin-update-index.c +++ b/builtin-update-index.c @@ -551,7 +551,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) if (i+3 >= argc) die("git-update-index: --cacheinfo <mode> <sha1> <path>"); - if ((strtoul_ui(argv[i+1], 8, &mode) != 1) || + if (strtoul_ui(argv[i+1], 8, &mode) || get_sha1_hex(argv[i+2], sha1) || add_cacheinfo(mode, sha1, argv[i+3], 0)) die("git-update-index: --cacheinfo" diff --git a/convert-objects.c b/convert-objects.c index cf03bcfe5a..cefbcebdca 100644 --- a/convert-objects.c +++ b/convert-objects.c @@ -88,7 +88,7 @@ static int write_subdirectory(void *buffer, unsigned long size, const char *base unsigned int mode; char *slash, *origpath; - if (!path || strtoul_ui(buffer, 8, &mode) != 1) + if (!path || strtoul_ui(buffer, 8, &mode)) die("bad tree conversion"); mode = convert_mode(mode); path++; |