Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-03-14 05:41:43 +0300
committerAlexandre Oliva <aoliva@redhat.com>2002-03-14 05:41:43 +0300
commit62a963ee4d0ca5e98f52dfc0f3612065efdad641 (patch)
treed2803fb9ca27807ea74f391124eeb7c18d5ff015 /newlib
parentbbe09139144e6faaf373e704a5d9fc7aef01c904 (diff)
* libc/machine/mips/strlen.c (strlen) [__mips16]: Fix off-by-two
error.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/machine/mips/strlen.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index e29da5339..02409c570 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/machine/mips/strlen.c (strlen) [__mips16]: Fix off-by-two
+ error.
+
2002-03-12 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/go32/access.c: Change license to relaxed license
diff --git a/newlib/libc/machine/mips/strlen.c b/newlib/libc/machine/mips/strlen.c
index f936039fd..158fb9f3f 100644
--- a/newlib/libc/machine/mips/strlen.c
+++ b/newlib/libc/machine/mips/strlen.c
@@ -2,7 +2,7 @@
* strlen.c -- strlen function. On at least some MIPS chips, a simple
* strlen is faster than the 'optimized' C version.
*
- * Copyright (c) 2001 Red Hat, Inc.
+ * Copyright (c) 2001, 2002 Red Hat, Inc.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
@@ -29,7 +29,7 @@ strlen (const char *str)
while (*str++ != '\0')
;
- return str - start + 1;
+ return str - start - 1;
}
#elif defined(__mips64)
__asm__("" /* 64-bit MIPS targets */