Check for over/underflow while allocating PTS ids
authorBen Kaduk <kaduk@mit.edu>
Wed, 17 Jul 2013 00:39:56 +0000 (20:39 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 2 Aug 2013 16:02:56 +0000 (09:02 -0700)
commit6c7c185ba3ec6fbdda0651d18868e66edd655809
treec1e46c58707bc7a450cea120f6792fab57bf5b83
parent0d4aae8e6bac495642e7328e26c96d6e5e8144ed
Check for over/underflow while allocating PTS ids

The behavior of signed integer over/underflow is implementation-defined,
but even if the compiler is nice and just wraps around, we could get
ourselves into trouble later on.

Change-Id: I20ea9c790037a36b8527889b3f7adcfd60e74fd4
Reviewed-on: http://gerrit.openafs.org/10091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/ptserver/utils.c