diff options
author | Chris Kuethe <ckuethe@users.berlios.de> | 2010-04-18 13:50:58 -0700 |
---|---|---|
committer | Chris Kuethe <ckuethe@users.berlios.de> | 2010-04-18 13:50:58 -0700 |
commit | 9e95d9adfe50902f6c235a0e46a8ab30635f2c86 (patch) | |
tree | 34a78c4864f27a8df520b216425e69e85670411f /isgps.c | |
parent | a43e82b4ce8849af4c000a119e2a0f132cb91c51 (diff) | |
download | gpsd-9e95d9adfe50902f6c235a0e46a8ab30635f2c86.tar.gz |
isgps_parityok is a macro, delete function
rearrange the comment a little to explain why we're using a macro
to do this, rather than a function. no point in keeping a commented
out function.
Diffstat (limited to 'isgps.c')
-rw-r--r-- | isgps.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -151,15 +151,11 @@ unsigned int isgps_parity(isgps30bits_t th) return (p); } - -#define isgps_parityok(w) (isgps_parity(w) == ((w) & 0x3f)) - -#if 0 /* * ESR found a doozy of a bug... * - * Defining the above as a function triggers an optimizer bug in gcc 3.4.2. - * The symptom is that parity computation is screwed up and the decoder + * Defining isgps_parityok as a function triggers an optimizer bug in gcc + * 3.4.2. The symptom is that parity computation is screwed up and the decoder * never achieves sync lock. Something steps on the argument to * isgpsparity(); the lossage appears to be related to the compiler's * attempt to fold the isgps_parity() call into isgps_parityok() in some @@ -174,11 +170,7 @@ unsigned int isgps_parity(isgps30bits_t th) * * gcc 4.0 does not manifest these bugs. */ -static bool isgps_parityok(isgps30bits_t w) -{ - return (isgpsparity(w) == (w & 0x3f)); -} -#endif +#define isgps_parityok(w) (isgps_parity(w) == ((w) & 0x3f)) void isgps_init( /*@out@*/ struct gps_packet_t *session) { |