Commit fabbd8e
committed
Omit a redundant error check if sizeof(HashtableItem) > 10
`sizeof(HashtableItem)` should be always > 10 for all platforms htop
currently supports (32-bit or 64-bit).
If `Hashtable.size > SIZE_MAX / sizeof(HashtableItem)`, the buffer
allocation would fail at xCalloc(), and a conditional for checking `size` overflow would be redundant.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>1 parent 34f822b commit fabbd8e
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
231 | | - | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
0 commit comments