forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8c92485
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 parent1893326 commit8c92485
2 files changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| 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)