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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to