diff options
author | kevlo <kevlo@FreeBSD.org> | 2007-03-06 09:32:41 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2007-03-06 09:32:41 +0000 |
commit | 8c9d3c018a54e0300ee146ffce11fdf43d7ee41b (patch) | |
tree | dd4b53875b60e23b434e53c7d430da63fdeb7bcb /usr.sbin/arp/arp.c | |
parent | e5953785d06c108599cb30d8a2cfe0c8b6419ef0 (diff) | |
download | FreeBSD-src-8c9d3c018a54e0300ee146ffce11fdf43d7ee41b.zip FreeBSD-src-8c9d3c018a54e0300ee146ffce11fdf43d7ee41b.tar.gz |
Use sizeof() for calculating the buffer size instead of hard-coded values.
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r-- | usr.sbin/arp/arp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index f251243..a4ec683 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -224,7 +224,7 @@ file(char *name) args[3] = &arg[3][0]; args[4] = &arg[4][0]; retval = 0; - while(fgets(line, 100, fp) != NULL) { + while(fgets(line, sizeof(line), fp) != NULL) { if ((p = strchr(line, '#')) != NULL) *p = '\0'; for (p = line; isblank(*p); p++); |