diff options
| author | Paul Eggert | 2011-04-18 23:42:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-18 23:42:12 -0700 |
| commit | fa3c87e1f21cd100ccb257d5dd41047d0c9a732b (patch) | |
| tree | 5c39f978d5b0cec246c902418a94c0c8393d3efa /src/process.c | |
| parent | 2172544bcd6f38bc7c0888a148a6dc8a903314c0 (diff) | |
| download | emacs-fa3c87e1f21cd100ccb257d5dd41047d0c9a732b.tar.gz emacs-fa3c87e1f21cd100ccb257d5dd41047d0c9a732b.zip | |
* process.c (Fnetwork_interface_info): Avoid left-shift undefined
behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index 8fbd8ac92e2..f25d10dbd67 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3723,9 +3723,9 @@ FLAGS is the current flags of the interface. */) | |||
| 3723 | flags -= fp->flag_bit; | 3723 | flags -= fp->flag_bit; |
| 3724 | } | 3724 | } |
| 3725 | } | 3725 | } |
| 3726 | for (fnum = 0; flags && fnum < 32; fnum++) | 3726 | for (fnum = 0; flags && fnum < 32; flags >>= 1, fnum++) |
| 3727 | { | 3727 | { |
| 3728 | if (flags & (1 << fnum)) | 3728 | if (flags & 1) |
| 3729 | { | 3729 | { |
| 3730 | elt = Fcons (make_number (fnum), elt); | 3730 | elt = Fcons (make_number (fnum), elt); |
| 3731 | } | 3731 | } |