diff options
author | Paul Jakma <paul.jakma@sun.com> | 2008-01-08 14:50:11 +0100 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2008-01-08 14:50:11 +0100 |
commit | 912df1e8ab61962c29eb4faff17a7d75c4905b84 (patch) | |
tree | 5c9f8aebdb7fd2b79edb3dd1034ef21ba0b9da4e /lib/memory.c | |
parent | [bgpd] Fix number of DoS security issues, restricted to configured peers. (diff) | |
download | frr-912df1e8ab61962c29eb4faff17a7d75c4905b84.tar.xz frr-912df1e8ab61962c29eb4faff17a7d75c4905b84.zip |
[lib] add mising UL qualifier to numerical constant
2008-01-08 Pavol Rusnak <prusnak@suse.cz>
* memory.c: (mtype_memstr) Fix accidental shift past width of type,
constant should have been forced to UL, rather than being left to
default to int.
Diffstat (limited to 'lib/memory.c')
-rw-r--r-- | lib/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/memory.c b/lib/memory.c index eb670722b..9ed5e100a 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -501,7 +501,7 @@ mtype_memstr (char *buf, size_t len, unsigned long bytes) * Just hacked to make it not warn on 'smaller' machines. * Static compiler analysis should mean no extra code */ - if (bytes & (1 << (sizeof (unsigned long) >= 8 ? 39 : 0))) + if (bytes & (1UL << (sizeof (unsigned long) >= 8 ? 39 : 0))) t++; snprintf (buf, len, "%4d TiB", t); } |