Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/lib/libc/citrus Pull up revision 1.15 (requested by yam...



details:   https://anonhg.NetBSD.org/src/rev/9db79a9dae8e
branches:  netbsd-1-6
changeset: 530242:9db79a9dae8e
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 02 14:59:39 2003 +0000

description:
Pull up revision 1.15 (requested by yamt in ticket #1202):
mbsrtowcs_priv template:
        n == 0 is not an error. it's a valid input.
_citrus_NONE_ctype_mbsrtowcs:
        fix a typo that causes SEGV.
while i'm here, make them similar each other.
fix PR 19620.

diffstat:

 lib/libc/citrus/citrus_ctype_template.h |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (29 lines):

diff -r 8abd7800a7b0 -r 9db79a9dae8e lib/libc/citrus/citrus_ctype_template.h
--- a/lib/libc/citrus/citrus_ctype_template.h   Mon Jun 02 14:59:32 2003 +0000
+++ b/lib/libc/citrus/citrus_ctype_template.h   Mon Jun 02 14:59:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: citrus_ctype_template.h,v 1.13.2.1 2002/05/24 21:55:23 perry Exp $     */
+/*     $NetBSD: citrus_ctype_template.h,v 1.13.2.2 2003/06/02 14:59:39 tron Exp $      */
 
 /*-
  * Copyright (c)2002 Citrus Project,
@@ -233,14 +233,12 @@
        _DIAGASSERT(nresult != 0);
        _DIAGASSERT(ei != NULL);
        _DIAGASSERT(psenc != NULL);
+       _DIAGASSERT(s == NULL);
+       _DIAGASSERT(*s == NULL);
 
-       if (s == NULL || *s == NULL || n==0) {
-               *nresult = (size_t)-1;
-               return EILSEQ;
-       }
-
-       if (!pwcs)
-               n = 1;
+       /* if pwcs is NULL, ignore n */
+       if (pwcs == NULL)
+               n = 1; /* arbitrary >0 value */
 
        cnt = 0;
        s0 = *s; /* to keep *s unchanged for now, use copy instead. */



Home | Main Index | Thread Index | Old Index