summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-09-03 09:45:34 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-03 15:55:42 +0200
commit58dee4047788964ed4b0f6c5d6512967f390ac21 (patch)
tree7338a023303872d511c0dce55f8fe4004d85c176 /src/util
parent546f1e38fa7ec1d86dd44117dda45f456fb00d39 (diff)
downloadsssd-58dee4047788964ed4b0f6c5d6512967f390ac21.tar.gz
sssd-58dee4047788964ed4b0f6c5d6512967f390ac21.tar.xz
sssd-58dee4047788964ed4b0f6c5d6512967f390ac21.zip
UTIL: Use standard maximum value of type size_t
It is better to use standard constant for maximum value of type size_t, instead of reinventing wheel with own defined constant SIZE_T_MAX This patch replace string "SIZE_T_MAX" -> "SIZE_MAX"
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util_safealign.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/util/util_safealign.h b/src/util/util_safealign.h
index d1d7a4861..e7f34e147 100644
--- a/src/util/util_safealign.h
+++ b/src/util/util_safealign.h
@@ -30,11 +30,10 @@
#define _UTIL_SAFEALIGN_H
#include <string.h>
-
-#define SIZE_T_MAX ((size_t) -1)
+#include <stdint.h>
#define SIZE_T_OVERFLOW(current, add) \
- (((size_t)(add)) > (SIZE_T_MAX - ((size_t)(current))))
+ (((size_t)(add)) > (SIZE_MAX - ((size_t)(current))))
static inline void
safealign_memcpy(void *dest, const void *src, size_t n, size_t *counter)