svn commit: r302773 - stable/11/sys/net

Pedro F. Giffuni pfg at FreeBSD.org
Wed Jul 13 15:51:59 UTC 2016


Author: pfg
Date: Wed Jul 13 15:51:58 2016
New Revision: 302773
URL: https://svnweb.freebsd.org/changeset/base/302773

Log:
  MFC r302476:
  ng_mppc(4):: basic code readability cleanups.
  
  In particular use __unreachable() to appease static analyzers.
  No functional change.
  
  CID:		1356591
  Approved by:	re (gjb)

Modified:
  stable/11/sys/net/mppcc.c
  stable/11/sys/net/mppcd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/mppcc.c
==============================================================================
--- stable/11/sys/net/mppcc.c	Wed Jul 13 15:16:51 2016	(r302772)
+++ stable/11/sys/net/mppcc.c	Wed Jul 13 15:51:58 2016	(r302773)
@@ -232,8 +232,9 @@ int MPPC_Compress(u_char **src, u_char *
 	} else if (off < 8192) {	/* 16-bit offset; 320 <= offset < 8192 */
 	    putbits16(*dst, 0xc000|(off-320), 16, &olen, &l);
 	} else {		/* NOTREACHED */
+	    __unreachable();
 	    rtn &= ~MPPC_OK;
-	    return rtn;
+	    return (rtn);
 	}
 
 	/* Encode length of match. */

Modified: stable/11/sys/net/mppcd.c
==============================================================================
--- stable/11/sys/net/mppcd.c	Wed Jul 13 15:16:51 2016	(r302772)
+++ stable/11/sys/net/mppcd.c	Wed Jul 13 15:51:58 2016	(r302773)
@@ -170,7 +170,7 @@ int MPPC_Decompress(u_char **src, u_char
 			rtn &= ~MPPC_OK;
 			return (rtn);
 		    }
-		} else {		/* NOTREACHED */
+		} else {		/* This shouldn't happen. */
 		    rtn &= ~MPPC_OK;
 		    return (rtn);
 		}


More information about the svn-src-stable mailing list