From 4ac8cfbb1d5225a4a02fb1d55693885813484514 Mon Sep 17 00:00:00 2001 From: yamt Date: Mon, 18 Mar 2002 08:56:32 +0000 Subject: [PATCH] don't check variable s0 before assign. --- lib/libc/citrus/modules/citrus_utf8.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/citrus/modules/citrus_utf8.c b/lib/libc/citrus/modules/citrus_utf8.c index 72b1740f0a1b..b29a6faa3aab 100644 --- a/lib/libc/citrus/modules/citrus_utf8.c +++ b/lib/libc/citrus/modules/citrus_utf8.c @@ -1,4 +1,4 @@ -/* $NetBSD: citrus_utf8.c,v 1.1 2002/03/17 22:14:24 tshiozak Exp $ */ +/* $NetBSD: citrus_utf8.c,v 1.2 2002/03/18 08:56:32 yamt Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -64,7 +64,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: citrus_utf8.c,v 1.1 2002/03/17 22:14:24 tshiozak Exp $"); +__RCSID("$NetBSD: citrus_utf8.c,v 1.2 2002/03/18 08:56:32 yamt Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -206,13 +206,14 @@ _citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, const char **s, _DIAGASSERT(s != NULL); _DIAGASSERT(psenc != NULL); + s0 = *s; + if (s0 == NULL) { _citrus_UTF8_init_state(ei, psenc); *nresult = 0; /* state independent */ return (0); } - s0 = *s; chlenbak = psenc->chlen; /* make sure we have the first byte in the buffer */