summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strerror.c
diff options
context:
space:
mode:
authormini <mini@FreeBSD.org>2002-07-03 06:28:04 +0000
committermini <mini@FreeBSD.org>2002-07-03 06:28:04 +0000
commit46aac0b82f4235ec836db7bda7446aac4bcf5101 (patch)
tree4c3a46953ee6e1c29d700f4bc26dd453944525cf /lib/libc/string/strerror.c
parent43e208a3ee3b9dea43ec1c077c70919cc8332c7c (diff)
downloadFreeBSD-src-46aac0b82f4235ec836db7bda7446aac4bcf5101.zip
FreeBSD-src-46aac0b82f4235ec836db7bda7446aac4bcf5101.tar.gz
Fix off-by-one error.
PR: misc/40104 Submitted by: Neal Fachan <neal@isilon.com> MFC after: 3 days
Diffstat (limited to 'lib/libc/string/strerror.c')
-rw-r--r--lib/libc/string/strerror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
index 55840f1..32e35aa 100644
--- a/lib/libc/string/strerror.c
+++ b/lib/libc/string/strerror.c
@@ -96,7 +96,7 @@ strerror(num)
* supplied buffer, inverting the number string.
*/
strcpy(ebuf, unknown_prefix);
- for (p = ebuf + sizeof unknown_prefix - 1; t >= tmp; )
+ for (p = ebuf + sizeof unknown_prefix - 1; t > tmp; )
*p++ = *--t;
*p = '\0';
return (ebuf);
OpenPOWER on IntegriCloud