summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hostname/hostname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hostname/hostname.c b/hostname/hostname.c
index b994a07..7dcef71 100644
--- a/hostname/hostname.c
+++ b/hostname/hostname.c
@@ -173,7 +173,7 @@ int do_set_nodename(bool file, const char *value)
curr += 63;
}
sethostname(curr, len);
- } while(curr = strchr(curr, '\n') + 1, curr != 0x1);
+ } while((curr = strchr(curr, '\n')) && curr++);
}
}