diff options
author | Martin Baulig <martin@src.gnome.org> | 1999-05-06 21:35:36 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1999-05-06 21:35:36 +0000 |
commit | 6120c5e4a8ce2b53d19650e0d545d5ee49676ada (patch) | |
tree | 930bf82bf67a870d1507e5a0b68621bbb2ccb8e7 /sysdeps/linux/shm_limits.c | |
parent | b252a80b7ed8954beeb28c0be3df20bdd83015e5 (diff) | |
download | libgtop-6120c5e4a8ce2b53d19650e0d545d5ee49676ada.tar.gz |
Use `(1L << feature)' instead of `(1 << feature)' to avoid problems
with integer overflows when we add more fields.
Diffstat (limited to 'sysdeps/linux/shm_limits.c')
-rw-r--r-- | sysdeps/linux/shm_limits.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/linux/shm_limits.c b/sysdeps/linux/shm_limits.c index da6ec92d..859160f1 100644 --- a/sysdeps/linux/shm_limits.c +++ b/sysdeps/linux/shm_limits.c @@ -27,9 +27,9 @@ #include <sys/shm.h> static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) + -(1 << GLIBTOP_IPC_SHMALL); +(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) + +(1L << GLIBTOP_IPC_SHMMNI) + (1L << GLIBTOP_IPC_SHMSEG) + +(1L << GLIBTOP_IPC_SHMALL); /* Init function. */ |