summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-08-15 19:31:30 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-08-15 19:31:30 +0000
commitcc7a78241f8535fd006a51951ab99b378bf37924 (patch)
tree3a2d5a9294885a688d256e4b11e4a9351066c6c5 /nuttx
parentce2e2a11b0b2b403abdbcdc4bfb34b940560f002 (diff)
downloadpx4-nuttx-cc7a78241f8535fd006a51951ab99b378bf37924.tar.gz
px4-nuttx-cc7a78241f8535fd006a51951ab99b378bf37924.tar.bz2
px4-nuttx-cc7a78241f8535fd006a51951ab99b378bf37924.zip
Fix strcasecmp
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2019 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Documentation/NuttX.html12
-rw-r--r--nuttx/lib/lib_strcasecmp.c11
-rw-r--r--nuttx/lib/lib_strncasecmp.c7
4 files changed, 27 insertions, 8 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index d303c3ac0..df05833a7 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -841,3 +841,8 @@
0.4.11 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
+ * fs/fs_read.c and fs/fs_write.c. read() and write() to socket is the
+ same as recv() and send() with flags = 0. Fixed!
+ * net/recvfrom.c: Fix errors in return value from non-blocking socket read.
+ * lib/lib_strcasecmp.c and lib/lib_strncasecmp.c. Use of post-incremented
+ argument to macro caused strcasecmp() and strncasecmp() to fail.
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 968c2c1d3..509b770aa 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
- <p>Last Updated: August 8, 2009</p>
+ <p>Last Updated: August 15, 2009</p>
</td>
</tr>
</table>
@@ -1435,7 +1435,7 @@ Other memory:
</tr>
</table>
-<pre><ul>
+<ul><pre>
nuttx-0.4.10 2009-08-08 Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* lib/: Added some basic regex-subset, pattern matching functions
@@ -1499,9 +1499,15 @@ buildroot-0.1.7 2009-06-26 &lt;spudmonkey@racsa.co.cr&gt;
</tr>
</table>
-<pre><ul>
+<ul><pre>
nuttx-0.4.11 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
+ * fs/fs_read.c and fs/fs_write.c. read() and write() to socket is the
+ same as recv() and send() with flags = 0. Fixed!
+ * net/recvfrom.c: Fix errors in return value from non-blocking socket read.
+ * lib/lib_strcasecmp.c and lib/lib_strncasecmp.c. Use of post-incremented
+ argument to macro caused strcasecmp() and strncasecmp() to fail.
+
pascal-0.1.3 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
buildroot-0.1.8 2009-xx-xx &lt;spudmonkey@racsa.co.cr&gt;
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;
}
diff --git a/nuttx/lib/lib_strncasecmp.c b/nuttx/lib/lib_strncasecmp.c
index 11d499161..5b35bfff1 100644
--- a/nuttx/lib/lib_strncasecmp.c
+++ b/nuttx/lib/lib_strncasecmp.c
@@ -1,7 +1,7 @@
/****************************************************************************
* lib/lib_strncasecmp.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-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,10 +57,13 @@ int strncasecmp(const char *cs, const char *ct, size_t nb)
register signed char result = 0;
for (; nb > 0; nb--)
{
- if ((result = toupper(*cs) - toupper(*ct++)) != 0 || !*cs++)
+ if ((result = toupper(*cs) - toupper(*ct)) != 0 || !*cs)
{
break;
}
+
+ cs++;
+ ct++;
}
return result;
}