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