llvm.org GIT mirror llvm / fbd1589
Guard for empty strings in CStrInCStrNoCase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50823 91177308-0d34-0410-b5e6-96231b3b80d8 Ted Kremenek 11 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
146146 /// NULL if 's1' cannot be found.
147147 static inline const char* CStrInCStrNoCase(const char *s1, const char *s2) {
148148
149 // Are either strings NULL?
150 if (!s1 || !s2)
149 // Are either strings NULL or empty?
150 if (!s1 || !s2 || s1[0] == '\0' || s2[0] == '\0')
151151 return 0;
152152
153153 const char *I1=s1, *I2=s2;