don't check variable s0 before assign.
This commit is contained in:
parent
8e7efd7c05
commit
4ac8cfbb1d
|
@ -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,
|
* Copyright (c)2002 Citrus Project,
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#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 */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -206,13 +206,14 @@ _citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, const char **s,
|
||||||
_DIAGASSERT(s != NULL);
|
_DIAGASSERT(s != NULL);
|
||||||
_DIAGASSERT(psenc != NULL);
|
_DIAGASSERT(psenc != NULL);
|
||||||
|
|
||||||
|
s0 = *s;
|
||||||
|
|
||||||
if (s0 == NULL) {
|
if (s0 == NULL) {
|
||||||
_citrus_UTF8_init_state(ei, psenc);
|
_citrus_UTF8_init_state(ei, psenc);
|
||||||
*nresult = 0; /* state independent */
|
*nresult = 0; /* state independent */
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
s0 = *s;
|
|
||||||
chlenbak = psenc->chlen;
|
chlenbak = psenc->chlen;
|
||||||
|
|
||||||
/* make sure we have the first byte in the buffer */
|
/* make sure we have the first byte in the buffer */
|
||||||
|
|
Loading…
Reference in New Issue