From bae6371d6e25895c3b9e28a256be89385df7e5da Mon Sep 17 00:00:00 2001 From: millert <> Date: Wed, 11 Dec 2002 22:55:39 +0000 Subject: [PATCH] Make x_handy in XDR u_int, not int since there are places in the code that assign a u_int value to x_handy. However, this means that we need to be careful checking for overflow as we can no longer subtract a value and check the result for < 0. We reorder the expression instead to avoid this problem (basic algebra). deraadt@ OK --- src/include/rpc/xdr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/rpc/xdr.h b/src/include/rpc/xdr.h index 26731c04..05a7e100 100644 --- a/src/include/rpc/xdr.h +++ b/src/include/rpc/xdr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xdr.h,v 1.4 2002/02/17 19:42:21 millert Exp $ */ +/* $OpenBSD: xdr.h,v 1.5 2002/12/11 22:55:39 millert Exp $ */ /* $NetBSD: xdr.h,v 1.7 1995/04/29 05:28:06 cgd Exp $ */ /* @@ -120,7 +120,7 @@ typedef struct __rpc_xdr { caddr_t x_public; /* users' data */ caddr_t x_private; /* pointer to private data */ caddr_t x_base; /* private used for position info */ - int x_handy; /* extra private word */ + u_int x_handy; /* extra private word */ } XDR; /*