Module Name: src
Committed By: kre
Date: Mon Feb 15 09:29:57 UTC 2021
Modified Files:
src/sys/sys: mbuf.h
Log Message:
Don't compare int against size_t .. since mbuf lengths should never
be negative, cast it from int to size_t (rather than the other way
around). Hopefully fix build.
To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/sys/mbuf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.229 src/sys/sys/mbuf.h:1.230
--- src/sys/sys/mbuf.h:1.229 Mon Feb 15 00:44:09 2021
+++ src/sys/sys/mbuf.h Mon Feb 15 09:29:56 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.229 2021/02/15 00:44:09 christos Exp $ */
+/* $NetBSD: mbuf.h,v 1.230 2021/02/15 09:29:56 kre Exp $ */
/*
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -849,7 +849,7 @@ m_get_aligned_hdr(struct mbuf **m, int a
if (POINTER_ALIGNED_P(mtod(*m, void *), align) == 0)
*m = m_copyup(*m, hlen,
linkhdr ? (max_linkhdr + align) & ~align : 0);
- else if (__predict_false((*m)->m_len < hlen))
+ else if (__predict_false((size_t)(*m)->m_len < hlen))
*m = m_pullup(*m, hlen);
return *m == NULL;
}