summaryrefslogtreecommitdiff
path: root/isgps.c
diff options
context:
space:
mode:
authorChris Kuethe <ckuethe@users.berlios.de>2010-04-18 13:50:58 -0700
committerChris Kuethe <ckuethe@users.berlios.de>2010-04-18 13:50:58 -0700
commit9e95d9adfe50902f6c235a0e46a8ab30635f2c86 (patch)
tree34a78c4864f27a8df520b216425e69e85670411f /isgps.c
parenta43e82b4ce8849af4c000a119e2a0f132cb91c51 (diff)
downloadgpsd-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.c14
1 files changed, 3 insertions, 11 deletions
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)
{