forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd9c366f
committed
Code review for pg_verify_checksums.c.
Use postgres_fe.h, since this is frontend code. Pretend that we've heardof project style guidelines for, eg, #include order. Use BlockNumber notint arithmetic for block numbers, to avoid misbehavior with relationsexceeding 2^31 blocks. Avoid an unnecessary strict-aliasing warning(per report from Michael Banck). Const-ify assorted stuff. Avoidscribbling on the output of readdir() -- perhaps that's safe in practice,but POSIX forbids it, and this code has so far earned exactly zerocredibility portability-wise. Editorialize on an ambiguously-wordedmessage.I did not touch the problem of the "buf" local variable being possiblyinsufficiently aligned; that's not specific to this code, and seems likeit should be fixed as part of a different, larger patch.Discussion:https://postgr.es/m/1535618100.1286.3.camel@credativ.de1 parentf919c16 commitd9c366f
1 file changed
+23
-24
lines changedLines changed: 23 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 |
| - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 |
| |
13 |
| - | |
14 | 16 |
| |
15 | 17 |
| |
16 | 18 |
| |
| 19 | + | |
17 | 20 |
| |
18 | 21 |
| |
19 | 22 |
| |
20 | 23 |
| |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 | 24 |
| |
28 | 25 |
| |
29 | 26 |
| |
| |||
36 | 33 |
| |
37 | 34 |
| |
38 | 35 |
| |
39 |
| - | |
| 36 | + | |
40 | 37 |
| |
41 | 38 |
| |
42 | 39 |
| |
| |||
52 | 49 |
| |
53 | 50 |
| |
54 | 51 |
| |
55 |
| - | |
| 52 | + | |
56 | 53 |
| |
57 | 54 |
| |
58 | 55 |
| |
| |||
61 | 58 |
| |
62 | 59 |
| |
63 | 60 |
| |
64 |
| - | |
| 61 | + | |
65 | 62 |
| |
66 |
| - | |
| 63 | + | |
67 | 64 |
| |
68 | 65 |
| |
69 | 66 |
| |
| |||
76 | 73 |
| |
77 | 74 |
| |
78 | 75 |
| |
79 |
| - | |
| 76 | + | |
80 | 77 |
| |
81 | 78 |
| |
82 | 79 |
| |
83 | 80 |
| |
84 |
| - | |
| 81 | + | |
85 | 82 |
| |
86 | 83 |
| |
87 | 84 |
| |
| |||
102 | 99 |
| |
103 | 100 |
| |
104 | 101 |
| |
105 |
| - | |
| 102 | + | |
106 | 103 |
| |
107 | 104 |
| |
108 | 105 |
| |
109 | 106 |
| |
110 | 107 |
| |
111 | 108 |
| |
112 |
| - | |
| 109 | + | |
113 | 110 |
| |
114 | 111 |
| |
115 | 112 |
| |
116 | 113 |
| |
117 | 114 |
| |
118 | 115 |
| |
119 |
| - | |
| 116 | + | |
120 | 117 |
| |
121 | 118 |
| |
122 | 119 |
| |
| |||
130 | 127 |
| |
131 | 128 |
| |
132 | 129 |
| |
133 |
| - | |
| 130 | + | |
134 | 131 |
| |
135 | 132 |
| |
136 | 133 |
| |
| |||
146 | 143 |
| |
147 | 144 |
| |
148 | 145 |
| |
149 |
| - | |
| 146 | + | |
150 | 147 |
| |
151 | 148 |
| |
152 | 149 |
| |
| |||
161 | 158 |
| |
162 | 159 |
| |
163 | 160 |
| |
| 161 | + | |
164 | 162 |
| |
165 | 163 |
| |
166 |
| - | |
| 164 | + | |
167 | 165 |
| |
168 | 166 |
| |
169 | 167 |
| |
170 | 168 |
| |
171 | 169 |
| |
172 | 170 |
| |
173 | 171 |
| |
174 |
| - | |
| 172 | + | |
| 173 | + | |
175 | 174 |
| |
176 | 175 |
| |
177 | 176 |
| |
| |||
184 | 183 |
| |
185 | 184 |
| |
186 | 185 |
| |
187 |
| - | |
| 186 | + | |
188 | 187 |
| |
189 | 188 |
| |
190 | 189 |
| |
191 |
| - | |
| 190 | + | |
192 | 191 |
| |
193 | 192 |
| |
194 | 193 |
| |
| |||
247 | 246 |
| |
248 | 247 |
| |
249 | 248 |
| |
250 |
| - | |
| 249 | + | |
251 | 250 |
| |
252 | 251 |
| |
253 | 252 |
| |
|
0 commit comments
Comments
(0)