Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
use xmalloc in git.c and help.c
author
James Bowes
<jbowes@dangerouslyinc.com>
Mon, 26 Mar 2007 00:39:36 +0000
(20:39 -0400)
committer
Junio C Hamano
<junkio@cox.net>
Mon, 26 Mar 2007 01:00:23 +0000
(18:00 -0700)
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c
patch
|
blob
|
history
help.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
3a81b9f
)
diff --git
a/git.c
b/git.c
index ed1c65e3095fbbbeab88976bbae358a9d76ad937..5b1bc2a895306157649e399d5bad9bb827935318 100644
(file)
--- a/
git.c
+++ b/
git.c
@@
-99,7
+99,7
@@
static int split_cmdline(char *cmdline, const char ***argv)
int src, dst, count = 0, size = 16;
char quoted = 0;
- *argv = malloc(sizeof(char*) * size);
+ *argv =
x
malloc(sizeof(char*) * size);
/* split alias_string */
(*argv)[count++] = cmdline;
diff --git
a/help.c
b/help.c
index 0893fea0254f4ec8acbce82a0af41e4e61bd72a6..be8651a73977f860a87fb944f6fca52af41a2c28 100644
(file)
--- a/
help.c
+++ b/
help.c
@@
-58,7
+58,7
@@
static void add_cmdname(const char *name, int len)
if (!cmdname)
oom();
}
- ent = malloc(sizeof(*ent) + len);
+ ent =
x
malloc(sizeof(*ent) + len);
if (!ent)
oom();
ent->len = len;