use sizeof var instead of constant.
authorChristos Zoulas <christos@zoulas.com>
Wed, 17 Sep 2008 20:21:45 +0000 (20:21 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 17 Sep 2008 20:21:45 +0000 (20:21 +0000)
fixmount/fixmount.c

index 8bbcb99f351671c6cafb009f271f047a1d118559..b95d1c45e2adc518ab6882d0ea80e9c20c217204 100644 (file)
@@ -115,7 +115,7 @@ is_same_host(char *name1, char *name2, struct in_addr addr2)
     } else if (!(he = gethostbyname(name1))) {
       return 0;
     } else {
-      xstrlcpy(lasthost, name1, MAXHOSTNAMELEN);
+      xstrlcpy(lasthost, name1, sizeof(lasthost));
       memcpy(&addr1, he->h_addr, sizeof(addr1));
       return (addr1.s_addr == addr2.s_addr);
     }