disable strsame() - fallback to strcmp()
Costa Tsaousis (ktsaou) committed
Jan 21, 2017 at 00:01 UTC
ce131c3247ca96b100e8c21ea9e9ab2f0a25da25
1 file changed
+4
src/inlined.h
+4
@@ -77,11 +77,15 @@ static inline unsigned long long str2ull(const char *s) {
77
return n;
78
}
79
80
+#ifdef NETDATA_STRSAME
81
static inline int strsame(register const char *a, register const char *b) {
82
if(unlikely(a == b)) return 0;
83
while(*a && *a == *b) { a++; b++; }
84
return *a - *b;
85
}
86
+#else
87
+#define strsame(a, b) strcmp(a, b)
88
+#endif // NETDATA_STRSAME
89
90
static inline int read_single_number_file(const char *filename, unsigned long long *result) {
91
char buffer[30 + 1];