Vladimir Grigoriev
2008-07-22 17:04:13 UTC
Is NULL a valid parameter for the strcmp() function according to the C
standard?
I found the following code and I have doubts that it is valid
char *parm = NULL;
....
if (strcmp(parm, NULL))
bla,bla,bla
I think that it would be simpler and more correctly to write
if ( parm == NULL )
bla,bla,bla
MS Visual C++ 2005 EE abnormally terminates if the original if statement is
used.
Vladimir Grigoriev
standard?
I found the following code and I have doubts that it is valid
char *parm = NULL;
....
if (strcmp(parm, NULL))
bla,bla,bla
I think that it would be simpler and more correctly to write
if ( parm == NULL )
bla,bla,bla
MS Visual C++ 2005 EE abnormally terminates if the original if statement is
used.
Vladimir Grigoriev