Module Name: src
Committed By: martin
Date: Mon Apr 4 09:59:42 UTC 2022
Modified Files:
src/sys/net/lagg: if_lagg.c
Log Message:
Avoid signed/unsigned comparision by casting the sizeof expression.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/net/lagg/if_lagg.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/lagg/if_lagg.c
diff -u src/sys/net/lagg/if_lagg.c:1.46 src/sys/net/lagg/if_lagg.c:1.47
--- src/sys/net/lagg/if_lagg.c:1.46 Mon Apr 4 06:10:00 2022
+++ src/sys/net/lagg/if_lagg.c Mon Apr 4 09:59:41 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lagg.c,v 1.46 2022/04/04 06:10:00 yamaguchi Exp $ */
+/* $NetBSD: if_lagg.c,v 1.47 2022/04/04 09:59:41 martin Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <[email protected]>
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.46 2022/04/04 06:10:00 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.47 2022/04/04 09:59:41 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1121,7 +1121,7 @@ lagg_input_ethernet(struct ifnet *ifp_po
* if we are not in promiscuous mode.
*/
- if (__predict_false(m->m_len < sizeof(*eh))) {
+ if (__predict_false(m->m_len < (int)sizeof(*eh))) {
if ((m = m_pullup(m, sizeof(*eh))) == NULL) {
if_statinc(ifp, if_ierrors);
goto out;