From e65c2374fe0b8fa952bab270213723454ec067b4 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 23 Apr 2022 23:11:40 -0500 Subject: hostname: Fix logic Thanks to floatcomplex. --- hostname/hostname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++); } } -- cgit v1.2.3-70-g09d2