I have a little confusion about this statement.
if( Ql_StrPrefixMatch(strURC, urcHead) )
{
callback_NTPCMD((char*)strURC);
}
The source code of Ql_StrPrefixMatch is:
s32 Ql_StrPrefixMatch(const char* str, const char *prefix)
{
for ( ; *str != '\0' && *prefix != '\0' ; str++, prefix++)
{
if (*str != *prefix) {
return 0;
}
}
return *prefix == '\0';
}
How is the if-statement evaluated to True or False based on the returns of Ql_StrPrefixMatch function, because it either returns 0 or *prefix == '\0'? Does return of 0 mean False? Please help me to explain this point. Thank you in advance