**** Merged from HEAD ****

Use `(1L << feature)' instead of `(1 << feature)' to avoid problems
with integer overflows when we add more fields.
This commit is contained in:
Martin Baulig
1999-05-27 23:30:11 +00:00
parent 6a7c289305
commit 929a025f53
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ main (int argc, char *argv [])
unsigned device, device_major, device_minor; unsigned device, device_major, device_minor;
char perm [5]; char perm [5];
if (maps [i].flags & (1 << GLIBTOP_MAP_ENTRY_FILENAME)) if (maps [i].flags & (1L << GLIBTOP_MAP_ENTRY_FILENAME))
filename = maps [i].filename; filename = maps [i].filename;
#ifdef GLIBTOP_INODEDB #ifdef GLIBTOP_INODEDB

View File

@@ -128,7 +128,7 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
sizeof (glibtop_sysdeps)); sizeof (glibtop_sysdeps));
resp->u.sysdeps.features = glibtop_server_features; resp->u.sysdeps.features = glibtop_server_features;
resp->u.sysdeps.flags = glibtop_server_features | resp->u.sysdeps.flags = glibtop_server_features |
(1 << GLIBTOP_SYSDEPS_FEATURES); (1L << GLIBTOP_SYSDEPS_FEATURES);
resp->offset = _offset_union (sysdeps); resp->offset = _offset_union (sysdeps);
break; break;
#if GLIBTOP_SUID_CPU #if GLIBTOP_SUID_CPU