summaryrefslogtreecommitdiffstats
path: root/gl/xsize.h
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2009-01-15 09:22:57 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2009-01-15 10:19:08 (GMT)
commit71cdb52799220f8d9052643baf1d3e9836a9c755 (patch)
tree27aee97a35d9ab51f0d8f64a46690bd41a5f8c1b /gl/xsize.h
parentf7afa46586645e50498d8b2d0c67884f014dc3a4 (diff)
downloadmonitoring-plugins-71cdb52799220f8d9052643baf1d3e9836a9c755.tar.gz
Sync with gnulib
Diffstat (limited to 'gl/xsize.h')
-rw-r--r--gl/xsize.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gl/xsize.h b/gl/xsize.h
index b294d66..284cf7f 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -1,6 +1,6 @@
1/* xsize.h -- Checked size_t computations. 1/* xsize.h -- Checked size_t computations.
2 2
3 Copyright (C) 2003 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2008 Free Software Foundation, Inc.
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
@@ -94,7 +94,7 @@ xmax (size_t size1, size_t size2)
94/* Multiplication of a count with an element size, with overflow check. 94/* Multiplication of a count with an element size, with overflow check.
95 The count must be >= 0 and the element size must be > 0. 95 The count must be >= 0 and the element size must be > 0.
96 This is a macro, not an inline function, so that it works correctly even 96 This is a macro, not an inline function, so that it works correctly even
97 when N is of a wider tupe and N > SIZE_MAX. */ 97 when N is of a wider type and N > SIZE_MAX. */
98#define xtimes(N, ELSIZE) \ 98#define xtimes(N, ELSIZE) \
99 ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) 99 ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
100 100