aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c6
-rw-r--r--builtin/index-pack.c2
-rw-r--r--builtin/receive-pack.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 891e5eab3..10a1f6531 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -414,10 +414,10 @@ static void *load_file(const char *filename, size_t *sz)
err_ret:
if (errno != ENOENT)
error(_("'%s': %s"), filename, strerror(errno));
- return 0;
+ return NULL;
}
if (!S_ISREG(st.st_mode))
- return 0;
+ return NULL;
*sz = xsize_t(st.st_size);
i = open(filename, O_RDONLY);
if (i < 0)
@@ -427,7 +427,7 @@ static void *load_file(const char *filename, size_t *sz)
error(_("'%s': short read %s"), filename, strerror(errno));
close(i);
free(data);
- return 0;
+ return NULL;
}
close(i);
data[*sz] = 0;
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 5a67c8181..31f001f10 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -294,7 +294,7 @@ static void *unpack_raw_entry(struct object_entry *obj, union delta_base *delta_
void *data;
obj->idx.offset = consumed_bytes;
- input_crc32 = crc32(0, Z_NULL, 0);
+ input_crc32 = crc32(0, NULL, 0);
p = fill(1);
c = *p;
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 27050e7c1..e1ba4dc69 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
#include "pack.h"
#include "refs.h"
#include "pkt-line.h"