diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2014-11-06 23:32:49 -0500 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2014-11-06 23:32:49 -0500 |
commit | 3f032ebdfc58608c2f02d379fd67a9ab79845e83 (patch) | |
tree | a4d551729e03ba39817a9801c8a68780514d6d05 | |
parent | bf2e8106cc197e373f827aa6fbd40a4093d14432 (diff) |
use strncpy we already have it
-rw-r--r-- | fsbm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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': |