You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13 lines
774 B

  1. You need to change only one single line in such a C function. You have to know:
  2. \begin{itemizep}
  3. \item does the order of function calls matter?
  4. \item how does the change effect the memory management? Do we have memory leaks? Do we access invalid memory?
  5. \item does it change the state of static or global variables?
  6. \item does it implicitly change the state of out-parameters?
  7. \item if it changes any of those states, is the function still correct?
  8. \item what happens if the program flow reaches this code-path with variable X in that particular state, while variable Z is NULL, and...
  9. \item did you just nuke a small former Soviet state?
  10. \end{itemizep}
  11. \vspace{\baselineskip}
  12. \slidep
  13. Conclusion: you really need to understand the complete environment of that line/function.