diff options
author | Brad King <brad.king@kitware.com> | 2009-06-12 10:46:16 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-06-12 10:46:16 -0400 |
commit | 74c385e702645b70f230c13b9f5bbc3acc76d367 (patch) | |
tree | 399f2abfb61e78e0236eb066c1bc3b843a6ac06e /Source/kwsys/String.c | |
parent | 590a0c809e558f05d2a17bcd4ea7e4e4ba4e9125 (diff) | |
download | cmake-74c385e702645b70f230c13b9f5bbc3acc76d367.tar.gz |
COMP: Avoid double-initialization in KWSys String
The KWSys String implementation of strcasecmp initialized 'result'
immediately before assigning to it. Borland produces a warning in this
case, so this commit removes the extra initialization.
Diffstat (limited to 'Source/kwsys/String.c')
-rw-r--r-- | Source/kwsys/String.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/String.c b/Source/kwsys/String.c index 9d2afc6363..c4421cc7a9 100644 --- a/Source/kwsys/String.c +++ b/Source/kwsys/String.c @@ -86,7 +86,7 @@ int kwsysString_strcasecmp(const char* lhs, const char* rhs) const char* const lower = kwsysString_strcasecmp_tolower; unsigned char const* us1 = (unsigned char const*)lhs; unsigned char const* us2 = (unsigned char const*)rhs; - int result = 0; + int result; while((result = lower[*us1] - lower[*us2++], result == 0) && *us1++) { } |