forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit653b55b
committed
Return ssize_t in fd.c I/O functions.
In the past, FileRead() and FileWrite() used types based on the Unixread() and write() functions from before C and POSIX standardization,though not exactly (we had int for amount instead of unsigned). Incommit2d4f1ba we changed to the appropriate standard C types, justlike the modern POSIX functions they wrap, but again not exactly: thereturn type stayed as int. In theory, a ssize_t value could be returnedby the underlying call that is too large for an int.That wasn't really a live bug, because we don't expect PostgreSQL codeto perform reads or writes of gigabytes, and OSes probably applyinternal caps smaller than that anyway. This change is done on theprinciple that the return might as well follow the standard interfacesconsistently.Reported-by: Tom Lane <tgl@sss.pgh.pa.us>Reviewed-by: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/1672202.1703441340%40sss.pgh.pa.us1 parent655dc31 commit653b55b
2 files changed
+8
-8
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2132 | 2132 |
| |
2133 | 2133 |
| |
2134 | 2134 |
| |
2135 |
| - | |
| 2135 | + | |
2136 | 2136 |
| |
2137 | 2137 |
| |
2138 | 2138 |
| |
2139 |
| - | |
| 2139 | + | |
2140 | 2140 |
| |
2141 | 2141 |
| |
2142 | 2142 |
| |
| |||
2188 | 2188 |
| |
2189 | 2189 |
| |
2190 | 2190 |
| |
2191 |
| - | |
| 2191 | + | |
2192 | 2192 |
| |
2193 | 2193 |
| |
2194 | 2194 |
| |
2195 |
| - | |
| 2195 | + | |
2196 | 2196 |
| |
2197 | 2197 |
| |
2198 | 2198 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
111 |
| - | |
| 110 | + | |
| 111 | + | |
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
| |||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
195 |
| - | |
| 195 | + | |
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
| |||
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
207 |
| - | |
| 207 | + | |
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
|
0 commit comments
Comments
(0)