chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove unused includes
[elogind.git]
/
src
/
test
/
test-hostname.c
diff --git
a/src/test/test-hostname.c
b/src/test/test-hostname.c
index 8c1a60f94078cb3d124c207db53d520eee5875bb..c7e5de896b3a314984263f59020d7a91941d96cd 100644
(file)
--- a/
src/test/test-hostname.c
+++ b/
src/test/test-hostname.c
@@
-19,10
+19,6
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <errno.h>
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
#include "hostname-setup.h"
#include "util.h"
#include "hostname-setup.h"
#include "util.h"
@@
-30,8
+26,9
@@
int main(int argc, char* argv[]) {
int r;
int main(int argc, char* argv[]) {
int r;
- if ((r = hostname_setup()) < 0)
- fprintf(stderr, "hostname: %s\n", strerror(-r));
+ r = hostname_setup();
+ if (r < 0)
+ log_error_errno(r, "hostname: %m");
return 0;
}
return 0;
}