summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa4cfa8)
raw | patch | inline | side by side (parent: aa4cfa8)
author | James Bowes <jbowes@dangerouslyinc.com> | |
Tue, 27 Mar 2007 22:30:08 +0000 (18:30 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Mar 2007 23:57:57 +0000 (16:57 -0700) |
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
help.c | patch | blob | history |
index be8651a73977f860a87fb944f6fca52af41a2c28..6a9af4d175f2fe9724a2844df63e4011ba91f1b3 100644 (file)
--- a/help.c
+++ b/help.c
return 80;
}
-static void oom(void)
-{
- fprintf(stderr, "git: out of memory\n");
- exit(1);
-}
-
static inline void mput_char(char c, unsigned int num)
{
while(num--)
struct cmdname *ent;
if (cmdname_alloc <= cmdname_cnt) {
cmdname_alloc = cmdname_alloc + 200;
- cmdname = realloc(cmdname, cmdname_alloc * sizeof(*cmdname));
- if (!cmdname)
- oom();
+ cmdname = xrealloc(cmdname, cmdname_alloc * sizeof(*cmdname));
}
ent = xmalloc(sizeof(*ent) + len);
- if (!ent)
- oom();
ent->len = len;
memcpy(ent->name, name, len);
ent->name[len] = 0;