diff options
| author | Florian Westphal <fw@strlen.de> | 2005-07-07 21:26:31 +0000 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2005-07-07 21:26:31 +0000 |
| commit | 7b5a1bbe3c291060874dc036d348a672a11319bb (patch) | |
| tree | 42776c7bb74c4b6c67f17ab5d3df7b7249b6b2ae /src | |
| parent | b88e97f1938d82f734e35984bbef74f61266a4c4 (diff) | |
| download | ngircd-7b5a1bbe3c291060874dc036d348a672a11319bb.tar.gz ngircd-7b5a1bbe3c291060874dc036d348a672a11319bb.zip | |
safemult_uint(): return bool
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/array.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ngircd/array.c b/src/ngircd/array.c index 8b83c2c4..e468a1e5 100644 --- a/src/ngircd/array.c +++ b/src/ngircd/array.c @@ -12,7 +12,7 @@ #include "array.h" -static char UNUSED id[] = "$Id: array.c,v 1.1 2005/07/07 18:38:14 fw Exp $"; +static char UNUSED id[] = "$Id: array.c,v 1.2 2005/07/07 21:26:31 fw Exp $"; #include <assert.h> @@ -28,23 +28,23 @@ static char UNUSED id[] = "$Id: array.c,v 1.1 2005/07/07 18:38:14 fw Exp $"; #define ALIGN_4096U(x) ((x | 0xfffU) +1) -static int +static bool safemult_uint(unsigned int a, unsigned int b, unsigned int *res) { unsigned int tmp; if (!a || !b) { *res = 0; - return 1; + return true; } tmp = a * b; if (tmp / b != a) - return 0; + return false; *res = tmp; - return 1; + return true; } |