• Phil Sutter's avatar
    get rid of unnecessary fgets() buffer size limitation · 61170fd8
    Phil Sutter authored
    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: default avatarPhil Sutter <phil@nwl.cc>
    61170fd8
arpd.c 17.6 KB