Merge tag 'iwlwifi-for-kalle-2016-04-12_2' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / arch / arm / boot / compressed / string.c
index 36e53ef..6894674 100644 (file)
@@ -65,6 +65,15 @@ size_t strlen(const char *s)
        return sc - s;
 }
 
+size_t strnlen(const char *s, size_t count)
+{
+       const char *sc;
+
+       for (sc = s; count-- && *sc != '\0'; ++sc)
+               /* nothing */;
+       return sc - s;
+}
+
 int memcmp(const void *cs, const void *ct, size_t count)
 {
        const unsigned char *su1 = cs, *su2 = ct, *end = su1 + count;