[parted-devel] Problem with Linux "3.0"

H. Peter Anvin hpa at zytor.com
Tue Jun 7 17:58:00 UTC 2011


On 06/07/2011 09:34 AM, Richard W.M. Jones wrote:
> On Tue, Jun 07, 2011 at 09:31:07AM -0700, H. Peter Anvin wrote:
>> On 06/07/2011 09:27 AM, Jim Meyering wrote:
>>>
>>> However, I don't want to ignore the return value.
>>>
>>> How about the patch below?
>>> I left your name on it.
>>> Let me know if that's ok.
>>>
>>
>> assert (n >= 2);
>>
>> ... would be more succinct to me and more future-proof, but that's just
>> stylistic...
> 
> Surely it returns 2 or 3, else it's an error?  (ie. it could never
> return, say, 4).
> 

If sscanf() starts returning 4 when given a 3-element format, then you
have worse problems.
	
	-hpa



More information about the parted-devel mailing list