- Notifications
You must be signed in to change notification settings - Fork28
Commit86d226a
committed
Minor cleanup/future-proofing for pg_saslprep().
Ensure that pg_saslprep() initializes its output argument to NULL inall failure paths, and then remove the redundant initialization thatsome (not all) of its callers did. This does not fix any live bug,but it reduces the odds of future bugs of omission.Also add a comment about why the existing failure-path coding isadequate.Back-patch so as to keep the function's API consistent across branches,again to forestall future bug introduction.Patch by me, reviewed by Michael PaquierDiscussion:https://postgr.es/m/16558.1536407783@sss.pgh.pa.us1 parent825f10f commit86d226a
File tree
3 files changed
+12
-7
lines changed- src
- backend/libpq
- common
- interfaces/libpq
3 files changed
+12
-7
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
453 | 453 |
| |
454 | 454 |
| |
455 | 455 |
| |
456 |
| - | |
| 456 | + | |
457 | 457 |
| |
458 | 458 |
| |
459 | 459 |
| |
| |||
499 | 499 |
| |
500 | 500 |
| |
501 | 501 |
| |
502 |
| - | |
| 502 | + | |
503 | 503 |
| |
504 | 504 |
| |
505 | 505 |
| |
|
Lines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1081 | 1081 |
| |
1082 | 1082 |
| |
1083 | 1083 |
| |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1084 | 1087 |
| |
1085 | 1088 |
| |
1086 | 1089 |
| |
| |||
1112 | 1115 |
| |
1113 | 1116 |
| |
1114 | 1117 |
| |
1115 |
| - | |
1116 |
| - | |
1117 | 1118 |
| |
1118 |
| - | |
1119 | 1119 |
| |
1120 | 1120 |
| |
1121 | 1121 |
| |
| |||
1246 | 1246 |
| |
1247 | 1247 |
| |
1248 | 1248 |
| |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1249 | 1254 |
| |
1250 | 1255 |
| |
1251 | 1256 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
477 | 477 |
| |
478 | 478 |
| |
479 | 479 |
| |
480 |
| - | |
| 480 | + | |
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
| |||
747 | 747 |
| |
748 | 748 |
| |
749 | 749 |
| |
750 |
| - | |
| 750 | + | |
751 | 751 |
| |
752 | 752 |
| |
753 | 753 |
| |
|
0 commit comments
Comments
(0)