forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit594e61a
committed
Change some test macros to return true booleans
These macros work fine when they are used directly in an "if" test orsimilar, but as soon as the return values are assigned to booleanvariables (or passed as boolean arguments to some function), they becomebugs, hopefully caught by compiler warnings. To avoid future problems,fix the definitions so that they return actual booleans.To further minimize the risk that somebody uses them in back-patchedfixes that only work correctly in branches starting from the currentmaster and not in old ones, back-patch the change to supported branchesas appropriate.See also commitaf4472b, and the longdiscussion (and larger patch) in the thread mentioned in its commitmessage.Discussion:https://postgr.es/m/18672.1483022414@sss.pgh.pa.us1 parentd00ca33 commit594e61a
1 file changed
+5
-5
lines changedLines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
240 |
| - | |
241 |
| - | |
| 240 | + | |
| 241 | + | |
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
| |||
317 | 317 |
| |
318 | 318 |
| |
319 | 319 |
| |
320 |
| - | |
| 320 | + | |
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
| |||
501 | 501 |
| |
502 | 502 |
| |
503 | 503 |
| |
504 |
| - | |
| 504 | + | |
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
| |||
516 | 516 |
| |
517 | 517 |
| |
518 | 518 |
| |
519 |
| - | |
| 519 | + | |
520 | 520 |
| |
521 | 521 |
| |
522 | 522 |
| |
|
0 commit comments
Comments
(0)