This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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] |
On Wed, May 21, 2003 at 06:44:14PM +0200, Michal Ludvig wrote:
- regnames_count = sizeof (regnames_64); + regnames_count = sizeof (regnames_64) / sizeof (void*);
Better to divide by sizeof (regnames_64[0]), then it's obvious in just this one line of code that you're calculating an array size.
+ while ((*p >= 'a' && *p <= 'z') + || (*p >= 'A' && *p <= 'Z')
+ || (*p >= '0' && *p <= '9'))
while (ISALNUM (*p))
+ /* Save char at *p only when it isn't \0. */
Why not save it when it is 0 too? Saves a test, here and later when you restore.
Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |