From f2194f03cc2301c92df06d37bb699f73deca988b Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 19 Mar 2006 01:21:28 +0000 Subject: [PATCH] Coverity CID 2463: Bail out instead of accessing uninitialized variables. --- lib/libc/citrus/modules/citrus_utf8.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/libc/citrus/modules/citrus_utf8.c b/lib/libc/citrus/modules/citrus_utf8.c index d537e6bda1ca..7d78d17b0448 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.13 2005/10/29 18:02:04 tshiozak Exp $ */ +/* $NetBSD: citrus_utf8.c,v 1.14 2006/03/19 01:21:28 christos Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -60,7 +60,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: citrus_utf8.c,v 1.13 2005/10/29 18:02:04 tshiozak Exp $"); +__RCSID("$NetBSD: citrus_utf8.c,v 1.14 2006/03/19 01:21:28 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -258,6 +258,9 @@ _citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, const char **s, _DIAGASSERT(findlen(wchar) == c); break; + default: + /* illegal state */ + goto ilseq; } *s = s0;