keep USETRAILERS from SIOCSARP
[unix-history] / usr / src / sys / netinet / raw_ip.c
index b3bb3e3..cdf00d3 100644 (file)
@@ -1,9 +1,9 @@
 /*
 /*
- * Copyright (c) 1982 Regents of the University of California.
+ * Copyright (c) 1982, 1986 Regents of the University of California.
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)raw_ip.c    6.7 (Berkeley) %G%
+ *     @(#)raw_ip.c    7.2 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -136,7 +136,7 @@ rip_ctloutput(op, so, level, optname, m)
                                (*m)->m_off = rp->rcb_options->m_off;
                                (*m)->m_len = rp->rcb_options->m_len;
                                bcopy(mtod(rp->rcb_options, caddr_t),
                                (*m)->m_off = rp->rcb_options->m_off;
                                (*m)->m_len = rp->rcb_options->m_len;
                                bcopy(mtod(rp->rcb_options, caddr_t),
-                                   mtod(*m, caddr_t), (*m)->m_len);
+                                   mtod(*m, caddr_t), (unsigned)(*m)->m_len);
                        } else
                                (*m)->m_len = 0;
                        break;
                        } else
                                (*m)->m_len = 0;
                        break;
@@ -146,7 +146,7 @@ rip_ctloutput(op, so, level, optname, m)
                }
                break;
        }
                }
                break;
        }
-       if (op == PRCO_SETOPT)
-               m_free(*m);
+       if (op == PRCO_SETOPT && *m)
+               (void)m_free(*m);
        return (error);
 }
        return (error);
 }