aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/giststrat.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-04-04 11:13:17 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-04-04 11:13:43 -0400
commitb1b6aa88b146e0e7ca9b2eb5911d1f56064ccabb (patch)
tree6db8d97b8b618b0dfcd6a7072d4969c996d9277b /src/backend/access/gist/giststrat.c
parent6cd30292bfc38edcae0c1d9c127265cfe665a569 (diff)
downloadpostgresql-b1b6aa88b146e0e7ca9b2eb5911d1f56064ccabb.tar.gz
postgresql-b1b6aa88b146e0e7ca9b2eb5911d1f56064ccabb.zip
Fix latent portability issue in pgwin32_dispatch_queued_signals().
The first iteration of the signal-checking loop would compute sigmask(0) which expands to 1<<(-1) which is undefined behavior according to the C standard. The lack of field reports of trouble suggest that it evaluates to 0 on all existing Windows compilers, but that's hardly something to rely on. Since signal 0 isn't a queueable signal anyway, we can just make the loop iterate from 1 instead, and save a few cycles as well as avoiding the undefined behavior. In passing, avoid evaluating the volatile expression UNBLOCKED_SIGNAL_QUEUE twice in a row; there's no reason to waste cycles like that. Noted by Aleksander Alekseev, though this isn't his proposed fix. Back-patch to all supported branches.
Diffstat (limited to 'src/backend/access/gist/giststrat.c')
0 files changed, 0 insertions, 0 deletions