c syntax help - very basic
c, syntax
Solution
Your `if` statement is equivalent to:
if (val != NULL) { ...
The comp.lang.c FAQ contains this question and answer which goes into a bit more detail why this is true.
Problem
If we have ``` char *val = someString; ``` and then say ``` if(val){ .... } ``` what is the `if` statement actually checking here?