From 929a025f5349a958209e9cbb9efda63edc0a8150 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Thu, 27 May 1999 23:30:11 +0000 Subject: [PATCH] **** Merged from HEAD **** Use `(1L << feature)' instead of `(1 << feature)' to avoid problems with integer overflows when we add more fields. --- examples/procmap.c | 2 +- src/daemon/slave.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/procmap.c b/examples/procmap.c index 4277e5b0..5b68cce1 100644 --- a/examples/procmap.c +++ b/examples/procmap.c @@ -97,7 +97,7 @@ main (int argc, char *argv []) unsigned device, device_major, device_minor; 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; #ifdef GLIBTOP_INODEDB diff --git a/src/daemon/slave.c b/src/daemon/slave.c index 91d97879..ffec70c6 100644 --- a/src/daemon/slave.c +++ b/src/daemon/slave.c @@ -128,7 +128,7 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp, sizeof (glibtop_sysdeps)); resp->u.sysdeps.features = glibtop_server_features; resp->u.sysdeps.flags = glibtop_server_features | - (1 << GLIBTOP_SYSDEPS_FEATURES); + (1L << GLIBTOP_SYSDEPS_FEATURES); resp->offset = _offset_union (sysdeps); break; #if GLIBTOP_SUID_CPU