diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-25 11:55:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-25 11:55:44 -0700 |
commit | 3df592c85e40983ce8bf13afed6df15ffb93bb40 (patch) | |
tree | 38573c0f11c107342004e525246441747d50f922 | |
parent | 01774fb58330733858ff41ceabe2d646d127d4f3 (diff) |
Delete unused uStrCasePrefix function
Flagged by cppcheck 1.64:
[utils.c:262]: (style) The function 'uStrCasePrefix' is never used.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | utils.c | 18 | ||||
-rw-r--r-- | utils.h | 5 |
2 files changed, 0 insertions, 23 deletions
@@ -257,22 +257,4 @@ uStrCaseCmp(const char *str1, const char *str2) *s = '\0'; return (strcmp(buf1, buf2)); } - -int -uStrCasePrefix(const char *prefix, const char *str) -{ - char c1; - char c2; - while (((c1=*prefix)!='\0')&&((c2=*str)!='\0')) { - if (isupper(c1)) c1= tolower(c1); - if (isupper(c2)) c2= tolower(c2); - if (c1!=c2) - return 0; - prefix++; str++; - } - if (c1!='\0') - return 0; - return 1; -} - #endif @@ -97,16 +97,11 @@ extern void uInternalError ( const char *s, ... ) _X_ATTRIBUTE_PRINTF(1,2); #define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0) #ifdef HAVE_STRCASECMP #define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2)) -#define uStrCasePrefix(p,s) (strncasecmp(p,s,strlen(p))==0) #else extern int uStrCaseCmp( const char * /* s1 */, const char * /* s2 */ ); -extern int uStrCasePrefix( - const char * /* p */, - const char * /* str */ -); #endif #define uStringDup(s1) (strdup(s1)) |