forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6b74f5e
committed
Avoid unnecessary use of strncpy in a couple of places in ecpg.
Use of strncpy with a length limit based on the source, rather thanthe destination, is non-idiomatic and draws warnings from gcc 8.Replace with memcpy, which does exactly the same thing in these cases,but with less chance for confusion.Backpatch to all supported branches.Discussion:https://postgr.es/m/21789.1529170195@sss.pgh.pa.us1 parent5d923eb commit6b74f5e
2 files changed
+3
-5
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
| 221 | + | |
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
|
Lines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
| 45 | + | |
| 46 | + | |
49 | 47 |
| |
50 | 48 |
| |
51 | 49 |
| |
|
0 commit comments
Comments
(0)