mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
vol: Don't use MAX_INT when UINT_MAX will do
limits.h provides us with UINT_MAX, so use this for the maxmimum size of an unsigned integer, rather than trying to grow our own. Change-Id: Ia23c45a9e295589929374a8324ea2b3d268ae6c0 Reviewed-on: http://gerrit.openafs.org/4420 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
bda87d7943
commit
3fef4d00c8
@ -20,9 +20,7 @@
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#ifndef MAXINT
|
||||
#define MAXINT (~(1<<((sizeof(int)*8)-1)))
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
@ -1386,7 +1384,7 @@ VPutVnode_r(Error * ec, Vnode * vnp)
|
||||
if (vnp->changed_newTime)
|
||||
{
|
||||
V_updateDate(vp) = vp->updateTime = now;
|
||||
if(V_volUpCounter(vp)<MAXINT)
|
||||
if(V_volUpCounter(vp)< UINT_MAX)
|
||||
V_volUpCounter(vp)++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user