This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 14 Oct 2014 21:51, Matthew Fortune wrote: > +static inline int > +__attribute__ ((unused)) > +_dl_procinfo (unsigned int type, unsigned long int word) i think we just use "unsigned long". pairing "int" with "long" is just a waste of space. > +{ > + int i; > + > + /* Fallback to unknown output mechanism. */ > + if (type == AT_HWCAP2) > + return -1; > + > + _dl_printf ("AT_HWCAP: "); > + > + for (i = 0; i < _DL_HWCAP_COUNT; ++i) > + if (word & (1 << i)) i is an int, but word is an unsigned long int. probably want to harmonize those types. > +static inline const char * > +__attribute__ ((unused)) > +_dl_hwcap_string (int idx) > +{ > + return GLRO(dl_mips_cap_flags)[idx]; > +}; no trailing semi-colons on func defs > +static inline int > +__attribute__ ((unused)) > +_dl_string_hwcap (const char *str) > +{ > + int i; > > -#define _dl_string_hwcap(str) (-1) > + for (i = 0; i < _DL_HWCAP_COUNT; i++) nit: ++i > + { > + if (strcmp (str, GLRO(dl_mips_cap_flags)[i]) == 0) > + return i; > + } no need for the braces > + return -1; GNU style says to put a blank line above the return > +}; no trailing semi-colons on func defs -mike
Attachment:
signature.asc
Description: Digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |