From: Christos Zoulas Date: Wed, 17 Sep 2008 20:21:45 +0000 (+0000) Subject: use sizeof var instead of constant. X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=b3a75b6555bd9b1e2ec709407a33a9fe8f0a3d39;p=am-utils-6.0.git use sizeof var instead of constant. --- diff --git a/fixmount/fixmount.c b/fixmount/fixmount.c index 8bbcb99..b95d1c4 100644 --- a/fixmount/fixmount.c +++ b/fixmount/fixmount.c @@ -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); }