libifconfig icon indicating copy to clipboard operation
libifconfig copied to clipboard

libifconfig_get_description(): Confusing code

Open Savagedlight opened this issue 9 years ago • 0 comments

Investigate if the following section of code is necessary:

} else if (ifr.ifr_buffer.length > descrlen) {
    descrlen = ifr.ifr_buffer.length;
    continue;
}

I think this tells the next ioctl() call to allocate a larger buffer for the name, but this needs digging into how the SIOCGIFDESCR ioctl() call is implemented.

Savagedlight avatar Sep 02 '16 02:09 Savagedlight