[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.
diff --git a/lib/ChangeLog b/lib/ChangeLog
index bd66f07..bbbdfab 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2007-11-12 Denis Ovsienko
* linklist.c: (listnode_add_after) Don't forget to increment list
diff --git a/lib/memory.c b/lib/memory.c
index eb67072..9ed5e10 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -501,7 +501,7 @@
* 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);
}