diff options
Diffstat (limited to 'gdb/s390-linux-tdep.c')
-rw-r--r-- | gdb/s390-linux-tdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index b83a264..44feee7 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -2484,11 +2484,12 @@ is_float_like (struct type *type) || is_float_singleton (type)); } +/* Determine whether N is a power of two. */ static int is_power_of_two (unsigned int n) { - return ((n & (n - 1)) == 0); + return n && ((n & (n - 1)) == 0); } /* Return non-zero if TYPE should be passed as a pointer to a copy, |