From f564d526ab3ffb7a4bade14d8ffd7b36136bf456 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Thu, 21 Feb 2019 17:05:44 -0500 Subject: [PATCH] freebsd_network: Initialize some variables. The cases where these were uninitialized are panics, but continuable panics, so it makes sense to initialize them anyway. Spotted by Clang. --- src/libs/compat/freebsd_network/compat/sys/mbuf-fbsd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/compat/freebsd_network/compat/sys/mbuf-fbsd.h b/src/libs/compat/freebsd_network/compat/sys/mbuf-fbsd.h index e9ef74147b..772951fc6c 100644 --- a/src/libs/compat/freebsd_network/compat/sys/mbuf-fbsd.h +++ b/src/libs/compat/freebsd_network/compat/sys/mbuf-fbsd.h @@ -156,7 +156,7 @@ m_extrefcnt(struct mbuf *m) static __inline int m_gettype(int size) { - int type; + int type = 0; switch (size) { case MCLBYTES: @@ -185,7 +185,7 @@ m_gettype(int size) static __inline void m_cljset(struct mbuf *m, void *cl, int type) { - int size; + int size = 0; switch (type) { case EXT_CLUSTER: