forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdec9184
committed
I guess I'd vote for changing the code to be
sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1); if (!sys) return false; sprintf(sys, "exec '%s' '%s'", editorName, fname);(note the added quotes to provide a little protection against spacesand such). Then it's perfectly obvious what the calculation is doing.I don't care about wasting 20-some bytes, but confusing readers of thecode is worth avoiding. regards, tom lane1 parent538b101 commitdec9184
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
1510 | 1510 | | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | | - | |
| 1513 | + | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | | - | |
| 1516 | + | |
1517 | 1517 | | |
1518 | 1518 | | |
1519 | 1519 | | |
| |||
0 commit comments
Comments
(0)