svn commit: r302476 - head/sys/net

Pedro F. Giffuni pfg at FreeBSD.org
Sat Jul 9 02:33:47 UTC 2016


Author: pfg
Date: Sat Jul  9 02:33:45 2016
New Revision: 302476
URL: https://svnweb.freebsd.org/changeset/base/302476

Log:
  ng_mppc(4):: basic readability cleanups.
  
  In particular use __unreachable() to appease static analyzers.
  No functional change.
  
  CID:		1356591
  MFC after:	3 days

Modified:
  head/sys/net/mppcc.c
  head/sys/net/mppcd.c

Modified: head/sys/net/mppcc.c
==============================================================================
--- head/sys/net/mppcc.c	Sat Jul  9 00:35:20 2016	(r302475)
+++ head/sys/net/mppcc.c	Sat Jul  9 02:33:45 2016	(r302476)
@@ -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: head/sys/net/mppcd.c
==============================================================================
--- head/sys/net/mppcd.c	Sat Jul  9 00:35:20 2016	(r302475)
+++ head/sys/net/mppcd.c	Sat Jul  9 02:33:45 2016	(r302476)
@@ -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-all mailing list