1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-19 17:25:17 +03:00
aports/testing/slurm/fix-bufsize.patch
2020-12-14 14:13:04 +00:00

17 lines
596 B
Diff

--- a/src/linux.c
+++ b/src/linux.c
@@ -68,11 +68,11 @@
/* do not parse the first two lines as they only contain static garbage */
fseek(proc_net_dev, 0, SEEK_SET);
- fgets(buffer, BUFSIZ-1, proc_net_dev);
- fgets(buffer, BUFSIZ-1, proc_net_dev);
+ fgets(buffer, BUFSIZE-1, proc_net_dev);
+ fgets(buffer, BUFSIZE-1, proc_net_dev);
interfacefound = 0;
- while (fgets(buffer, BUFSIZ-1, proc_net_dev) != NULL)
+ while (fgets(buffer, BUFSIZE-1, proc_net_dev) != NULL)
{
/* find the device name and substitute ':' with '\0' */
ptr = buffer;