chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
install: use automatic cleanup in find_symlinks_fd()
[elogind.git]
/
src
/
shared
/
specifier.c
diff --git
a/src/shared/specifier.c
b/src/shared/specifier.c
index ae00ae10bbf303fbb67ccbb5349ce65208b02095..599027cd47e795f7ffc42304601ccddcbf017cf4 100644
(file)
--- a/
src/shared/specifier.c
+++ b/
src/shared/specifier.c
@@
-41,7
+41,8
@@
char *specifier_printf(const char *text, const Specifier table[], void *userdata
assert(table);
l = strlen(text);
assert(table);
l = strlen(text);
- if (!(r = new(char, l+1)))
+ r = new(char, l+1);
+ if (!r)
return NULL;
t = r;
return NULL;
t = r;
@@
-62,7
+63,8
@@
char *specifier_printf(const char *text, const Specifier table[], void *userdata
char *n, *w;
size_t k, j;
char *n, *w;
size_t k, j;
- if (!(w = i->lookup(i->specifier, i->data, userdata))) {
+ w = i->lookup(i->specifier, i->data, userdata);
+ if (!w) {
free(r);
return NULL;
}
free(r);
return NULL;
}
@@
-70,7
+72,8
@@
char *specifier_printf(const char *text, const Specifier table[], void *userdata
j = t - r;
k = strlen(w);
j = t - r;
k = strlen(w);
- if (!(n = new(char, j + k + l + 1))) {
+ n = new(char, j + k + l + 1);
+ if (!n) {
free(r);
free(w);
return NULL;
free(r);
free(w);
return NULL;