Re: [Patch 1/3] sysctl: refactor integer handling proc code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Changli Gao
Date: Friday, April 9, 2010 - 3:49 am

On Fri, Apr 9, 2010 at 6:11 PM, Amerigo Wang <amwang@redhat.com> wrote:

the function name implies that it is used to parse unsigned long, so
negative value should not be supported.


It seems that ledding white space should be allowed, so this check
isn't needed, and simple_strtoul can handle it.


is strspn() better?


negative should not be supported too.


These functions have so much lines of code. I think you can make them
less. Please refer to strsep().

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch 2/3] sysctl: add proc_do_large_bitmap, Amerigo Wang, (Fri Apr 9, 3:11 am)
Re: [Patch 2/3] sysctl: add proc_do_large_bitmap, Changli Gao, (Fri Apr 9, 3:33 am)
Re: [Patch 1/3] sysctl: refactor integer handling proc code, Changli Gao, (Fri Apr 9, 3:49 am)
Re: [Patch 2/3] sysctl: add proc_do_large_bitmap, Octavian Purdila, (Fri Apr 9, 5:35 am)
Re: [Patch 1/3] sysctl: refactor integer handling proc code, Octavian Purdila, (Fri Apr 9, 6:40 am)
Re: [Patch 2/3] sysctl: add proc_do_large_bitmap, Cong Wang, (Sun Apr 11, 11:32 pm)