chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
755bde3
)
hostnamectl: Exit with zero on success
author
Martin Pitt
<martin.pitt@ubuntu.com>
Fri, 28 Nov 2014 14:38:05 +0000
(15:38 +0100)
committer
David Herrmann
<dh.herrmann@gmail.com>
Fri, 28 Nov 2014 16:08:51 +0000
(17:08 +0100)
In show_all_names(), bus_map_all_properties() returns 1 on success which is
then used as the return code of show_all_names() and eventually main(). Exit
with zero in main() on all nonnegative results to guard against similar errors.
src/hostname/hostnamectl.c
patch
|
blob
|
history
diff --git
a/src/hostname/hostnamectl.c
b/src/hostname/hostnamectl.c
index 1026e195dc9e88072373c700c8ef54c32a1d9838..b3ce8510baf40f45ef6a6f1a54bc913e1313e28e 100644
(file)
--- a/
src/hostname/hostnamectl.c
+++ b/
src/hostname/hostnamectl.c
@@
-536,5
+536,5
@@
int main(int argc, char *argv[]) {
r = hostnamectl_main(bus, argc, argv);
finish:
- return r < 0 ? EXIT_FAILURE :
r
;
+ return r < 0 ? EXIT_FAILURE :
EXIT_SUCCESS
;
}