Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
use xstrdup, not strdup in ll-merge.c
author
Jim Meyering
<jim@meyering.net>
Sun, 14 Jun 2009 19:47:54 +0000
(21:47 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 14 Jun 2009 20:37:14 +0000
(13:37 -0700)
Otherwise, a fluky allocation failure would cause merge
configuration settings to be silently ignored.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ll-merge.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c97038d
)
diff --git
a/ll-merge.c
b/ll-merge.c
index 9837c842a3f215ebee7cbe9690e42e216fb5c76c..e339b8cfaca7c3a08fae4b9c54b76c0351101a2b 100644
(file)
--- a/
ll-merge.c
+++ b/
ll-merge.c
@@
-233,7
+233,7
@@
static int read_merge_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "merge.default")) {
if (value)
if (!strcmp(var, "merge.default")) {
if (value)
- default_ll_merge = strdup(value);
+ default_ll_merge =
x
strdup(value);
return 0;
}
return 0;
}
@@
-267,7
+267,7
@@
static int read_merge_config(const char *var, const char *value, void *cb)
if (!strcmp("name", ep)) {
if (!value)
return error("%s: lacks value", var);
if (!strcmp("name", ep)) {
if (!value)
return error("%s: lacks value", var);
- fn->description = strdup(value);
+ fn->description =
x
strdup(value);
return 0;
}
return 0;
}
@@
-290,14
+290,14
@@
static int read_merge_config(const char *var, const char *value, void *cb)
* file named by %A, and signal that it has done with zero exit
* status.
*/
* file named by %A, and signal that it has done with zero exit
* status.
*/
- fn->cmdline = strdup(value);
+ fn->cmdline =
x
strdup(value);
return 0;
}
if (!strcmp("recursive", ep)) {
if (!value)
return error("%s: lacks value", var);
return 0;
}
if (!strcmp("recursive", ep)) {
if (!value)
return error("%s: lacks value", var);
- fn->recursive = strdup(value);
+ fn->recursive =
x
strdup(value);
return 0;
}
return 0;
}