get rid of unnecessary fgets() buffer size limitation
fgets() will read at most size-1 bytes into the buffer and add a
terminating null-char at the end. Therefore it is not necessary to pass
a reduced buffer size when calling it.
This change was generated using the following semantic patch:
@@
identifier buf, fp;
@@
- fgets(buf, sizeof(buf) - 1, fp)
+ fgets(buf, sizeof(buf), fp)
Signed-off-by: Phil Sutter <phil@nwl.cc>
diff --git a/misc/arpd.c b/misc/arpd.c
index 7919eb8..6bb9bd1 100644
--- a/misc/arpd.c
+++ b/misc/arpd.c
@@ -703,7 +703,7 @@
}
buf[sizeof(buf)-1] = 0;
- while (fgets(buf, sizeof(buf)-1, fp)) {
+ while (fgets(buf, sizeof(buf), fp)) {
__u8 b1[6];
char ipbuf[128];
char macbuf[128];