summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-09-14 11:21:44 -0700
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-09-14 11:21:44 -0700
commit16e602617d194c65ac641d1835bab6c58503cdcc (patch)
tree2b1647318d378c6c86ff5227a38e74a036dee02a
parent77a980323fc54f94b9f552dde4050a5e9758d5d5 (diff)
Use strncmp for filtering records
It's faster, and there's no chance of ever having false positives -- not that it was actually going to happen in this case, because we would never find a colon elsewhere in the line. But code gets copied around and changes over time.
-rw-r--r--src/adapter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/adapter.c b/src/adapter.c
index a2dc4ce0..f19cc3d3 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2137,7 +2137,7 @@ static void create_stored_records_from_keys(char *key, char *value,
uint8_t *pdata;
char tmp[3] = "";
- if (strstr(key, addr) == NULL)
+ if (strncmp(key, addr, 17))
return;
size = strlen(value)/2;