aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-11-06 23:32:49 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2014-11-06 23:32:49 -0500
commit3f032ebdfc58608c2f02d379fd67a9ab79845e83 (patch)
treea4d551729e03ba39817a9801c8a68780514d6d05
parentbf2e8106cc197e373f827aa6fbd40a4093d14432 (diff)
use strncpy we already have it
-rw-r--r--fsbm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fsbm.c b/fsbm.c
index 5f7d5c1..d099640 100644
--- a/fsbm.c
+++ b/fsbm.c
@@ -130,7 +130,7 @@ skip:
printf(")\t");
// update our interface
- strcpy(interfaces[i].interface, name);
+ strncpy(interfaces[i].interface, name, len);
interfaces[i].rx_bytes = rx_bytes;
interfaces[i].timestamp = timestamp;
interfaces[i].tx_bytes = tx_bytes;
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
int c;
int interval = 10 * 100000;
- while ((c = getopt (argc, argv, "brd:hv")) != -1)
+ while ((c = getopt (argc, argv, "bd:hv")) != -1)
switch (c)
{
case 'b':