Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses libcurses: remove unreachable statements



details:   https://anonhg.NetBSD.org/src/rev/81d69a89e916
branches:  trunk
changeset: 359672:81d69a89e916
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 16 10:30:45 2022 +0000

description:
libcurses: remove unreachable statements

Found by lint.

No binary change.

diffstat:

 lib/libcurses/addbytes.c |  8 ++++----
 lib/libcurses/ins_wstr.c |  9 ++++-----
 2 files changed, 8 insertions(+), 9 deletions(-)

diffs (80 lines):

diff -r 6b5405510356 -r 81d69a89e916 lib/libcurses/addbytes.c
--- a/lib/libcurses/addbytes.c  Sun Jan 16 10:11:38 2022 +0000
+++ b/lib/libcurses/addbytes.c  Sun Jan 16 10:30:45 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: addbytes.c,v 1.59 2021/09/06 07:45:48 rin Exp $        */
+/*     $NetBSD: addbytes.c,v 1.60 2022/01/16 10:30:45 rillig Exp $     */
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.59 2021/09/06 07:45:48 rin Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.60 2022/01/16 10:30:45 rillig Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -398,7 +398,7 @@
                }
                for (i = 0; i < wch->elements; i++) {
                        if (!(np = (nschar_t *) malloc(sizeof(nschar_t))))
-                               return ERR;;
+                               return ERR;
                        np->ch = wch->vals[i];
                        np->next = lp->nsp;
                        lp->nsp = np;
@@ -523,7 +523,7 @@
                for (i = 1; i < wch->elements; i++) {
                        np = malloc(sizeof(nschar_t));
                        if (!np)
-                               return ERR;;
+                               return ERR;
                        np->ch = wch->vals[i];
                        np->next = lp->nsp;
                        __CTRACE(__CTRACE_INPUT,
diff -r 6b5405510356 -r 81d69a89e916 lib/libcurses/ins_wstr.c
--- a/lib/libcurses/ins_wstr.c  Sun Jan 16 10:11:38 2022 +0000
+++ b/lib/libcurses/ins_wstr.c  Sun Jan 16 10:30:45 2022 +0000
@@ -1,4 +1,4 @@
-/*   $NetBSD: ins_wstr.c,v 1.20 2021/11/16 23:23:02 kre Exp $ */
+/*   $NetBSD: ins_wstr.c,v 1.21 2022/01/16 10:30:45 rillig Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ins_wstr.c,v 1.20 2021/11/16 23:23:02 kre Exp $");
+__RCSID("$NetBSD: ins_wstr.c,v 1.21 2022/01/16 10:30:45 rillig Exp $");
 #endif                                           /* not lint */
 
 #include <string.h>
@@ -174,7 +174,7 @@
                                        cw = 1;
                                width -= cw;
                                scp++;
-                               continue;;
+                               continue;
 
                        case L'\r':
                                width = 0;
@@ -242,7 +242,7 @@
                                        scp++;
                                        if (lstr != slstr)
                                                lstr--;
-                                       continue;;
+                                       continue;
 
                                case L'\r':
                                        width = 0;
@@ -254,7 +254,6 @@
 
                                case L'\n':
                                        goto loopdone;
-                                       break;
 
                                case L'\t':
                                        cw = wcwidth(ws[0]);



Home | Main Index | Thread Index | Old Index