Source-Changes-HG archive

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

[src/trunk]: src/sys/net Use uint8_t for opt as some of the values don't fit ...



details:   https://anonhg.NetBSD.org/src/rev/40c50cf5b543
branches:  trunk
changeset: 818332:40c50cf5b543
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Oct 08 17:37:32 2016 +0000

description:
Use uint8_t for opt as some of the values don't fit into the (positive)
range of a signed char.

diffstat:

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

diffs (27 lines):

diff -r 2886e0a90d41 -r 40c50cf5b543 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Sat Oct 08 17:28:17 2016 +0000
+++ b/sys/net/if_spppsubr.c     Sat Oct 08 17:37:32 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.155 2016/10/03 11:06:06 ozaki-r Exp $         */
+/*     $NetBSD: if_spppsubr.c,v 1.156 2016/10/08 17:37:32 joerg Exp $   */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.155 2016/10/03 11:06:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.156 2016/10/08 17:37:32 joerg Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3208,7 +3208,7 @@
 static void
 sppp_ipcp_scr(struct sppp *sp)
 {
-       char opt[6 /* compression */ + 6 /* address */ + 12 /* dns addresses */];
+       uint8_t opt[6 /* compression */ + 6 /* address */ + 12 /* dns addresses */];
 #ifdef INET
        uint32_t ouraddr;
 #endif



Home | Main Index | Thread Index | Old Index