Date: Wed, 4 Jan 2017 17:39:20 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311292 - head/usr.bin/rpcgen Message-ID: <201701041739.v04HdKLY006426@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Wed Jan 4 17:39:20 2017 New Revision: 311292 URL: https://svnweb.freebsd.org/changeset/base/311292 Log: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/rpcgen/rpc_parse.c Modified: head/usr.bin/rpcgen/rpc_parse.c ============================================================================== --- head/usr.bin/rpcgen/rpc_parse.c Wed Jan 4 17:38:18 2017 (r311291) +++ head/usr.bin/rpcgen/rpc_parse.c Wed Jan 4 17:39:20 2017 (r311292) @@ -290,7 +290,6 @@ def_union(definition *defp) declaration dec; case_list *cases; case_list **tailp; - int flag; defp->def_kind = DEF_UNION; scan(TOK_IDENT, &tok); @@ -309,7 +308,6 @@ def_union(definition *defp) cases->case_name = tok.str; scan(TOK_COLON, &tok); /* now peek at next token */ - flag = 0; if (peekscan(TOK_CASE, &tok)){ do { scan2(TOK_IDENT, TOK_CHARCONST, &tok); @@ -322,14 +320,6 @@ def_union(definition *defp) scan(TOK_COLON, &tok); } while (peekscan(TOK_CASE, &tok)); } - else - if (flag) - { - - *tailp = cases; - tailp = &cases->next; - cases = XALLOC(case_list); - } get_declaration(&dec, DEF_UNION); cases->case_decl = dec;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701041739.v04HdKLY006426>