summaryrefslogtreecommitdiff
path: root/src/ndef.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2013-03-25 11:47:59 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-03-28 16:35:37 +0100
commitb2124270ea43361dd88b9bff54943ef8db29e2f2 (patch)
treee2f243969429a8b148f8c1921a69de0d78548e13 /src/ndef.c
parent6f435fb4ed14fe432b324e1b1c241fca338b55c1 (diff)
downloadneard-b2124270ea43361dd88b9bff54943ef8db29e2f2.tar.gz
neard-b2124270ea43361dd88b9bff54943ef8db29e2f2.tar.bz2
neard-b2124270ea43361dd88b9bff54943ef8db29e2f2.zip
ndef: Use sizeof instead of strlen to get BT_MIME_STRING_2_0 len
This is a constant string and there is no need to calculate its length in runtime.
Diffstat (limited to 'src/ndef.c')
-rw-r--r--src/ndef.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ndef.c b/src/ndef.c
index e9b3338..35fc7ee 100644
--- a/src/ndef.c
+++ b/src/ndef.c
@@ -695,7 +695,7 @@ static enum record_type get_external_record_type(uint8_t *type,
DBG("");
if (strncmp((char *) type, BT_MIME_STRING_2_0,
- strlen(BT_MIME_STRING_2_0)) == 0)
+ sizeof(BT_MIME_STRING_2_0) - 1) == 0)
return RECORD_TYPE_MIME_TYPE;
else
return RECORD_TYPE_UNKNOWN;