libarchive: open_zipped() does not need to check extensions for e.g. gzip
[oweals/busybox.git] / libbb / safe_gethostname.c
index 1f8b2a8fd32c5e46f5a93431c9d70eacf95e7b8f..cac99ae03902d6e1313b48b954a6a64fb2ff0078 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Copyright (C) 2008 Tito Ragusa <farmatito@tiscali.it>
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
 /*
@@ -48,6 +48,5 @@ char* FAST_FUNC safe_gethostname(void)
 
        /* Uname can fail only if you pass a bad pointer to it. */
        uname(&uts);
-
-       return xstrndup(!*(uts.nodename) ? "?" : uts.nodename, sizeof(uts.nodename));
+       return xstrndup(!uts.nodename[0] ? "?" : uts.nodename, sizeof(uts.nodename));
 }