From 9e95d9adfe50902f6c235a0e46a8ab30635f2c86 Mon Sep 17 00:00:00 2001 From: Chris Kuethe Date: Sun, 18 Apr 2010 13:50:58 -0700 Subject: 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. --- isgps.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'isgps.c') diff --git a/isgps.c b/isgps.c index 4c89ad40..abc566a3 100644 --- a/isgps.c +++ b/isgps.c @@ -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) { -- cgit v1.2.1