aboutsummaryrefslogtreecommitdiffstats
path: root/src/string/strmove.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-01 21:07:54 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-01 21:07:54 +0200
commitac044784a6ce64ff15610d4b70750065a7f01b80 (patch)
tree8ac8629c0089099f21be9107a5d3779963d33ca0 /src/string/strmove.c
parentadd memfrob (diff)
downloadslibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.gz
slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.bz2
slibc-ac044784a6ce64ff15610d4b70750065a7f01b80.tar.xz
start on makefile and fixing warnings and errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/string/strmove.c')
-rw-r--r--src/string/strmove.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/string/strmove.c b/src/string/strmove.c
index 86298cf..596822a 100644
--- a/src/string/strmove.c
+++ b/src/string/strmove.c
@@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
-#include <stddef.h>
@@ -97,7 +96,7 @@ char* strstrmove(char* whither, const char* whence, const char* restrict str)
{
const char* stop = str == NULL ? NULL : strstr(whence, str);
size_t n = stop == NULL ? strlen(whence) : (size_t)(stop - whence);
- char* r = stop == NULL ? NULL ? whither + n;
+ char* r = stop == NULL ? NULL : (whither + n);
memmove(whither, whence, n);
whither[n] = 0;
return r;