chiark / gitweb /
remove unused includes
[elogind.git] / src / test / test-hostname.c
index 8c1a60f94078cb3d124c207db53d520eee5875bb..c7e5de896b3a314984263f59020d7a91941d96cd 100644 (file)
   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"
@@ -30,8 +26,9 @@
 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;
 }