D Unleashed - The Blooper List


Chapter 8 - Managing Memory



Type Page Error Correction Reported By
Typographical 260 'morethan' 'more than'
Typographical 261 'notequivalent' 'not equivalent'
Poor word choice 262 'a system' (first paragraph on gets() function) Change to 'an account'
Technical 266 The first buffer allocation is inadequate. The initial size should be 1, not 0, and the strcpy should read strcpy(p + size - 1, buffer); Jacob Navia
Technical 266 In the event of a reallocation failure, the function keeps reading the file until the end, which is a bit silly. The loop condition should be while(*Error == 0 && fgets(buffer, sizeof buffer, fp)) Jacob Navia
Typographical 267 'soldthe' 'sold the'
Typographical 267 'notyour' 'not your'
Technical 271 static size_t bufsize = 0; (both occurrences) static size_t bufsize = 1; (in each case) J F Lemaire
Technical 280 In the sidebar, "a particular set of data" isn't quite right. The word 'kind' would be better than 'set' here. 'Set' has a mathematical meaning that is irrelevant and distracting in this context.
Typographical 285 'onlyifthe' Should be 'only if the'
Technical 286 &(void *)p A cast expression doesn't yield an lvalue, so you can't take its address. Kevin Easton
Terrible English! 289 "These two functions look very similar. All that differs is the constants." Change to: "These two functions look very similar, except for the values of the constants." Bob Wightman
Dire writing again, I'm afraid 292 'intolerably complex' How about 'intolerably tedious' or 'intolerably error-prone' or even 'intolerably fiddly'?




Back to index