tech-net archive

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

[PATCH] if_ppp.c



Hi tech-net,

I have a small patch for if_ppp.c...

* Don't check mp for NULL twice

Does this look OK to go in?

- Michael


Index: if_ppp.c
===================================================================
RCS file: /cvsroot/src/sys/net/if_ppp.c,v
retrieving revision 1.137
diff -u -r1.137 if_ppp.c
--- if_ppp.c    11 Oct 2012 20:05:50 -0000      1.137
+++ if_ppp.c    25 Nov 2012 04:45:17 -0000
@@ -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