]> arthur.barton.de Git - netdata.git/commitdiff
disable strsame() - fallback to strcmp()
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 20 Jan 2017 22:01:51 +0000 (00:01 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 20 Jan 2017 22:01:51 +0000 (00:01 +0200)
src/inlined.h

index 0e3b2910f9fc406f6a62ebb338135c2dc1ce89a1..2b41b66a5e78717a4439f2c3c913e748f198dbf0 100644 (file)
@@ -77,11 +77,15 @@ static inline unsigned long long str2ull(const char *s) {
     return n;
 }
 
+#ifdef NETDATA_STRSAME
 static inline int strsame(register const char *a, register const char *b) {
     if(unlikely(a == b)) return 0;
     while(*a && *a == *b) { a++; b++; }
     return *a - *b;
 }
+#else
+#define strsame(a, b) strcmp(a, b)
+#endif // NETDATA_STRSAME
 
 static inline int read_single_number_file(const char *filename, unsigned long long *result) {
     char buffer[30 + 1];