chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util.h: fix typo
[elogind.git]
/
src
/
shared
/
generator.c
diff --git
a/src/shared/generator.c
b/src/shared/generator.c
index 5d5b6a0a61cc3b5d30caecd07fc6685fa9e97637..414470be1c4a1ecf8029c60bb711ac93ea0a802e 100644
(file)
--- a/
src/shared/generator.c
+++ b/
src/shared/generator.c
@@
-125,7
+125,7
@@
int generator_write_timeouts(const char *dir, const char *what, const char *wher
char *prefix, *postfix;
prefix = strndupa(opts, start - opts - (start != opts));
char *prefix, *postfix;
prefix = strndupa(opts, start - opts - (start != opts));
- postfix = timeout + len + (timeout[len] != '\0');
+ postfix = timeout + len + (
start == opts &&
timeout[len] != '\0');
*filtered = strjoin(prefix, *postfix ? postfix : NULL, NULL);
if (!*filtered)
return log_oom();
*filtered = strjoin(prefix, *postfix ? postfix : NULL, NULL);
if (!*filtered)
return log_oom();
@@
-148,7
+148,7
@@
int generator_write_timeouts(const char *dir, const char *what, const char *wher
return write_drop_in_format(dir, unit, 50, "device-timeout",
"# Automatically generated by %s\n\n"
return write_drop_in_format(dir, unit, 50, "device-timeout",
"# Automatically generated by %s\n\n"
- "[Unit]\nJobTimeoutSec=
%u"
,
+ "[Unit]\nJobTimeoutSec=
" USEC_FMT
,
program_invocation_short_name,
u / USEC_PER_SEC);
}
program_invocation_short_name,
u / USEC_PER_SEC);
}