summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cb35c06)
raw | patch | inline | side by side (parent: cb35c06)
author | Stephen Boyd <bebarino@gmail.com> | |
Sun, 3 Apr 2011 07:06:54 +0000 (00:06 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 3 Apr 2011 17:14:53 +0000 (10:14 -0700) |
* load_file() returns a void pointer but is using 0 for the return
value
* builtin/receive-pack.c forgot to include builtin.h
* packet_trace_prefix can be marked static
* ll_merge takes a pointer for its last argument, not an int
* crc32 expects a pointer as the second argument but Z_NULL is defined
to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer,
2006-11-18 for more info)
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
value
* builtin/receive-pack.c forgot to include builtin.h
* packet_trace_prefix can be marked static
* ll_merge takes a pointer for its last argument, not an int
* crc32 expects a pointer as the second argument but Z_NULL is defined
to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer,
2006-11-18 for more info)
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/grep.c | patch | blob | history | |
builtin/index-pack.c | patch | blob | history | |
builtin/receive-pack.c | patch | blob | history | |
csum-file.c | patch | blob | history | |
pack-check.c | patch | blob | history | |
pkt-line.c | patch | blob | history | |
rerere.c | patch | blob | history |
diff --git a/builtin/grep.c b/builtin/grep.c
index 891e5eab3da4d835325e859bf8979664e2c112ae..10a1f65310f28f2014bab3f3295205abf6dc59ad 100644 (file)
--- a/builtin/grep.c
+++ b/builtin/grep.c
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)
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 5a67c8181e5273ab0e79b8cb704dadc87cde1a37..31f001f1059ec533ee62d6bd951b068d7f924f50 100644 (file)
--- 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 27050e7c1627ed2899963fb3fdb81a7ba95d06df..e1ba4dc697abd1b2582713744c5a1892ef4a4882 100644 (file)
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
-#include "cache.h"
+#include "builtin.h"
#include "pack.h"
#include "refs.h"
#include "pkt-line.h"
diff --git a/csum-file.c b/csum-file.c
index 4d50cc5ce18c24a1dc853d3050062b864fe0b943..be49d5fcf900cb47cb14d8c85a69112b26532b93 100644 (file)
--- a/csum-file.c
+++ b/csum-file.c
@@ -116,7 +116,7 @@ struct sha1file *sha1fd_throughput(int fd, const char *name, struct progress *tp
void crc32_begin(struct sha1file *f)
{
- f->crc32 = crc32(0, Z_NULL, 0);
+ f->crc32 = crc32(0, NULL, 0);
f->do_crc = 1;
}
diff --git a/pack-check.c b/pack-check.c
index c3bf21dbcb4b79fdc815ef80ae5c970aafd02bbf..a1a521648deee8e7e82c4e2cb7fe8fe03605dc06 100644 (file)
--- a/pack-check.c
+++ b/pack-check.c
off_t offset, off_t len, unsigned int nr)
{
const uint32_t *index_crc;
- uint32_t data_crc = crc32(0, Z_NULL, 0);
+ uint32_t data_crc = crc32(0, NULL, 0);
do {
unsigned int avail;
diff --git a/pkt-line.c b/pkt-line.c
index cd1bd264139bf15cca06f900b7921f0956c6458b..5a04984ea31744528de30269add2754ed2dcd105 100644 (file)
--- a/pkt-line.c
+++ b/pkt-line.c
#include "cache.h"
#include "pkt-line.h"
-const char *packet_trace_prefix = "git";
+static const char *packet_trace_prefix = "git";
static const char trace_key[] = "GIT_TRACE_PACKET";
void packet_trace_identity(const char *prog)
diff --git a/rerere.c b/rerere.c
index 3d00a71ff9730ed4a10114185f4360de698c1fbf..22dfc843da1528ffd0466d496c50c56702e55a24 100644 (file)
--- a/rerere.c
+++ b/rerere.c
ret = 1;
goto out;
}
- ret = ll_merge(&result, path, &base, NULL, &cur, "", &other, "", 0);
+ ret = ll_merge(&result, path, &base, NULL, &cur, "", &other, "", NULL);
if (!ret) {
FILE *f;