summaryrefslogtreecommitdiff
path: root/monitor_sirf.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nsn.com>2015-01-16 15:46:59 +0100
committerEric S. Raymond <esr@thyrsus.com>2015-01-21 10:47:00 -0500
commitd0174ca4e78831bbdd798d02a481ba2569425722 (patch)
tree3bcdd83bb0e0fabcbc2e1e8e84c7befffc19c3cc /monitor_sirf.c
parent39554efdf0416e35236ad3d23a3a893d90c68be6 (diff)
downloadgpsd-d0174ca4e78831bbdd798d02a481ba2569425722.tar.gz
Add str_starts_with macro, use it instead of strncmp.
This change doesn't affect generated binary code.
Diffstat (limited to 'monitor_sirf.c')
-rw-r--r--monitor_sirf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/monitor_sirf.c b/monitor_sirf.c
index 3026e67c..0a17691e 100644
--- a/monitor_sirf.c
+++ b/monitor_sirf.c
@@ -16,6 +16,7 @@
#include "gpsd.h"
#include "bits.h"
#include "gpsmon.h"
+#include "strfuncs.h"
#if defined(SIRF_ENABLE) && defined(BINARY_ENABLE)
extern const struct gps_type_t driver_sirf;
@@ -551,8 +552,7 @@ static void sirf_update(void)
buf[len] = '\0';
j = 1;
for (i = 0; verbpat[i] != NULL; i++)
- if (strncmp((char *)(buf + 1), verbpat[i], strlen(verbpat[i])) ==
- 0) {
+ if (str_starts_with((char *)(buf + 1), verbpat[i])) {
j = 0;
break;
}