summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndp
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2007-03-06 09:32:41 +0000
committerkevlo <kevlo@FreeBSD.org>2007-03-06 09:32:41 +0000
commit8c9d3c018a54e0300ee146ffce11fdf43d7ee41b (patch)
treedd4b53875b60e23b434e53c7d430da63fdeb7bcb /usr.sbin/ndp
parente5953785d06c108599cb30d8a2cfe0c8b6419ef0 (diff)
downloadFreeBSD-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/ndp')
-rw-r--r--usr.sbin/ndp/ndp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index 07b5cf5..80a5026 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -333,7 +333,7 @@ file(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) {
i = sscanf(line, "%49s %49s %49s %49s %49s",
arg[0], arg[1], arg[2], arg[3], arg[4]);
if (i < 2) {
OpenPOWER on IntegriCloud