Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor fixes

...

This example can be corrected many different ways depending on the intent of the programmer. In this compliant solution, p2 is initialized to NULL rather than the result of bar()found to be extraneous. The call calls to bar() and baz() can be removed if bar() does they do not produce any side-effects.

Code Block
bgColor#ccccff
int *p1 = foo();
bar(); /* Removable if bar() does not produce any side-effects */
baz(); /* Removable if barbaz() does not produce any side-effects */
return p1;

...