1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00
freebsd-ports/math/snns/files/patch-kernel__sources__kr_mem.c
Martin Wilke cef18d9388 - Update to 4.3
PR:		130451
Submitted by:	Ports Fury
2009-01-16 09:09:59 +00:00

29 lines
1.0 KiB
C

--- kernel/sources/kr_mem.c.orig Sat Sep 28 20:55:39 2002
+++ kernel/sources/kr_mem.c Sat Sep 28 20:56:45 2002
@@ -26,6 +26,7 @@
#include <values.h>
#else
#include <math.h>
+#include <limits.h>
#endif
@@ -1023,7 +1024,7 @@
if ( (n_ptr = krm_NTableSymbolSearch( symbol_name, symbol_type ) ) != NULL)
{ /* symbol is already in the name table */
- if ((n_ptr->ref_count) < ((unsigned short) MAXSHORT)) {
+ if ((n_ptr->ref_count) < ((unsigned short) SHRT_MAX)) {
n_ptr->ref_count++;
}
return( n_ptr->Entry.symbol );
@@ -1052,7 +1053,7 @@
if (symbol_name == NULL) return;
if ( (n_ptr = krm_NTableSymbolSearch( symbol_name, symbol_type ) ) != NULL)
{ /* symbol is in the name table */
- if ((n_ptr->ref_count) < ((unsigned short) MAXSHORT))
+ if ((n_ptr->ref_count) < ((unsigned short) SHRT_MAX))
{ /* No. of references to this symbol don't exceed the max. reference
count. This means it is possible to delete the symbol if the
reference count is zero.