projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
kconfig: add xstrdup() helper
[linux-2.6-block.git]
/
scripts
/
kconfig
/
util.c
diff --git
a/scripts/kconfig/util.c
b/scripts/kconfig/util.c
index b98a79e30e04a4017bd33264e85b2c40e46bc3af..c6f6e21b809ffe7a6f60acd2a7f016ee88971d5c 100644
(file)
--- a/
scripts/kconfig/util.c
+++ b/
scripts/kconfig/util.c
@@
-154,3
+154,14
@@
void *xrealloc(void *p, size_t size)
fprintf(stderr, "Out of memory.\n");
exit(1);
}
+
+char *xstrdup(const char *s)
+{
+ char *p;
+
+ p = strdup(s);
+ if (p)
+ return p;
+ fprintf(stderr, "Out of memory.\n");
+ exit(1);
+}