diff options
Diffstat (limited to 'lib/string.h')
-rw-r--r-- | lib/string.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/string.h b/lib/string.h index 6e549cb7..d6ae5ef7 100644 --- a/lib/string.h +++ b/lib/string.h @@ -63,6 +63,15 @@ memset32(void *D, u32 val, uint n) dst[i] = val; } +static inline int +bstrcmp(const char *s1, const char *s2) +{ + if (s1 && s2) + return strcmp(s1, s2); + else + return !s2 - !s1; +} + #define ROUTER_ID_64_LENGTH 23 #endif |