]> git.proxmox.com Git - pve-cluster.git/commitdiff
pmxcfs: cleanup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 9 Nov 2016 08:15:54 +0000 (09:15 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 29 Nov 2016 05:17:40 +0000 (06:17 +0100)
data/src/pmxcfs.c

index e1b6fed50ecab3ed67d63aee23af8ecfa6c88d14..1b6cbcc3a72049d8848d6e42f730d36d446f03e5 100644 (file)
@@ -800,9 +800,9 @@ int main(int argc, char *argv[])
                exit (-1);
        }
 
-       for (int i=0; i < sizeof(utsname.nodename); i++) {
-               if (utsname.nodename[i] =='.') utsname.nodename[i] = 0;
-       }
+       char *dot = strchr(utsname.nodename, '.');
+       if (dot)
+               *dot = 0;
 
        cfs.nodename = g_strdup(utsname.nodename);