add an abort for a case that can't happen

This commit is contained in:
christos 2019-10-05 20:22:36 +00:00
parent 86bd1b8280
commit 3379dd2438

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.34 2015/03/12 12:40:41 christos Exp $ */ /* $NetBSD: main.c,v 1.35 2019/10/05 20:22:36 christos Exp $ */
/*- /*-
* Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson. * Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson.
@ -39,7 +39,7 @@
#endif #endif
#include <sys/cdefs.h> #include <sys/cdefs.h>
__RCSID("$NetBSD: main.c,v 1.34 2015/03/12 12:40:41 christos Exp $"); __RCSID("$NetBSD: main.c,v 1.35 2019/10/05 20:22:36 christos Exp $");
#ifdef __FBSDID #ifdef __FBSDID
__FBSDID("$FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $"); __FBSDID("$FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $");
#endif #endif
@ -268,6 +268,8 @@ again:
s = script->s; s = script->s;
state = ST_STRING; state = ST_STRING;
goto again; goto again;
default:
abort();
} }
case ST_FILE: case ST_FILE:
if ((p = fgets(buf, n, f)) != NULL) { if ((p = fgets(buf, n, f)) != NULL) {