diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2013-03-25 11:47:59 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-28 16:35:37 +0100 |
commit | b2124270ea43361dd88b9bff54943ef8db29e2f2 (patch) | |
tree | e2f243969429a8b148f8c1921a69de0d78548e13 | |
parent | 6f435fb4ed14fe432b324e1b1c241fca338b55c1 (diff) | |
download | neard-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.
-rw-r--r-- | src/ndef.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |