Xinqi Bao's Git
projects
/
dmenu.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
3d25a32
)
changing order
author
Anselm R. Garbe <
[email protected]
>
Thu, 12 Oct 2006 10:59:37 +0000
(12:59 +0200)
committer
Anselm R. Garbe <
[email protected]
>
Thu, 12 Oct 2006 10:59:37 +0000
(12:59 +0200)
util.c
diff
|
blob
|
history
diff --git
a/util.c
b/util.c
index
b7798d2
..
0427ed5
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-18,15
+18,6
@@
emalloc(unsigned int size) {
return res;
}
return res;
}
-char *
-estrdup(const char *str) {
- void *res = strdup(str);
-
- if(!res)
- eprint("fatal: could not malloc() %u bytes\n", strlen(str));
- return res;
-}
-
void
eprint(const char *errstr, ...) {
va_list ap;
void
eprint(const char *errstr, ...) {
va_list ap;
@@
-36,3
+27,12
@@
eprint(const char *errstr, ...) {
va_end(ap);
exit(EXIT_FAILURE);
}
va_end(ap);
exit(EXIT_FAILURE);
}
+
+char *
+estrdup(const char *str) {
+ void *res = strdup(str);
+
+ if(!res)
+ eprint("fatal: could not malloc() %u bytes\n", strlen(str));
+ return res;
+}