Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Don't check mp for NULL twice. From Michael W. Boma...



details:   https://anonhg.NetBSD.org/src/rev/ec75dba0ee28
branches:  trunk
changeset: 782887:ec75dba0ee28
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Sun Nov 25 09:06:43 2012 +0000

description:
Don't check mp for NULL twice.  From Michael W. Bomardieri <mb%il.net@localhost>
via tech-net%NetBSD.org@localhost.  Thanks!

diffstat:

 sys/net/if_ppp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d7fa1a88bddd -r ec75dba0ee28 sys/net/if_ppp.c
--- a/sys/net/if_ppp.c  Sun Nov 25 08:39:35 2012 +0000
+++ b/sys/net/if_ppp.c  Sun Nov 25 09:06:43 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ppp.c,v 1.137 2012/10/11 20:05:50 christos Exp $    */
+/*     $NetBSD: if_ppp.c,v 1.138 2012/11/25 09:06:43 mbalmer Exp $     */
 /*     Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp       */
 
 /*
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.137 2012/10/11 20:05:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.138 2012/11/25 09:06:43 mbalmer Exp $");
 
 #include "ppp.h"
 
@@ -1266,7 +1266,7 @@
        mp = m->m_next;
        if (mp == NULL)
            return;
-       dp = (mp != NULL)? mtod(mp, u_char *): NULL;
+       dp = mtod(mp, u_char *);
     } else {
        mp = m;
        dp = mtod(mp, u_char *) + PPP_HDRLEN;



Home | Main Index | Thread Index | Old Index