Code Review 7022269: clean up fscanf usage in soalris networking native code
Michael McMahon
michael.x.mcmahon at oracle.com
Fri Feb 25 06:39:37 PST 2011
Alan Bateman wrote:
> Chris Hegarty wrote:
>> Michael, Alan,
>>
>> Some small cleanups to the use of scanf with specified string width.
>> The buffers should be sized large enough to handle the specified
>> width and the null terminator.
>>
>> http://cr.openjdk.java.net/~chegar/7022269/webrev.00/webrev/
>>
>> -Chris.
> Looks okay although slightly inconsistent in that the code in
> initLocalIfs allows a device name up to 32 chars but the other places
> it is 20. I don't know what the right answer is.
>
> -Alan
Would it be better to #define a constant and use constant+1 then where
the array
is allocated. Maybe use the same 32 byte storage in all places.
Not a big deal really.
- Michael
More information about the net-dev
mailing list