summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-04-23 23:11:40 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-04-23 23:11:40 -0500
commite65c2374fe0b8fa952bab270213723454ec067b4 (patch)
treede608960f5ad0a417a53d7fc3aff5a3c00773620
parent452f87ace48b6cc710e2b50a749c818825455493 (diff)
downloadshimmy-e65c2374fe0b8fa952bab270213723454ec067b4.tar.gz
shimmy-e65c2374fe0b8fa952bab270213723454ec067b4.tar.bz2
shimmy-e65c2374fe0b8fa952bab270213723454ec067b4.tar.xz
shimmy-e65c2374fe0b8fa952bab270213723454ec067b4.zip
hostname: Fix logic
Thanks to floatcomplex.
-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++);
}
}