This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] Error on bad count number


> Nothing in a name like "get number" suggests to me only positive
> numbers would be returned.  I think it should be up to the
> caller to handle whether the returned value is valid in
> that context.

I agree. If useful, we could have a second routine that calls
get_number and errors out if the number returned was negative,
like get_natural_number for instance.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]