Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/citrus/citrus_ctype_template.h,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/citrus/citrus_ctype_template.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.14 retrieving revision 1.15 diff -u -p -r1.14 -r1.15 --- src/lib/libc/citrus/citrus_ctype_template.h 2002/05/24 04:04:30 1.14 +++ src/lib/libc/citrus/citrus_ctype_template.h 2003/01/01 13:29:45 1.15 @@ -1,4 +1,4 @@ -/* $NetBSD: citrus_ctype_template.h,v 1.14 2002/05/24 04:04:30 thorpej Exp $ */ +/* $NetBSD: citrus_ctype_template.h,v 1.15 2003/01/01 13:29:45 yamt Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -233,14 +233,12 @@ _FUNCNAME(mbsrtowcs_priv)(_ENCODING_INFO _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. */