summaryrefslogtreecommitdiff
path: root/nuttx/lib/lib_strcasecmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/lib/lib_strcasecmp.c')
-rw-r--r--nuttx/lib/lib_strcasecmp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/nuttx/lib/lib_strcasecmp.c b/nuttx/lib/lib_strcasecmp.c
index e5d14bda9..425a3e639 100644
--- a/nuttx/lib/lib_strcasecmp.c
+++ b/nuttx/lib/lib_strcasecmp.c
@@ -1,7 +1,7 @@
/****************************************************************************
* lib/lib_strcasecmp.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -57,8 +57,13 @@ int strcasecmp(const char *cs, const char *ct)
register signed char result;
for (;;)
{
- if ((result = toupper(*cs) - toupper(*ct++)) != 0 || !*cs++)
- break;
+ if ((result = toupper(*cs) - toupper(*ct)) != 0 || !*cs)
+ {
+ break;
+ }
+
+ cs++;
+ ct++;
}
return result;
}