mirror of https://github.com/thesofproject/sof.git
Merge pull request #199 from mwierzbix/rstrcmp_nullTerminatorCheck
lib: rstrcmp: null terminator check
This commit is contained in:
commit
7e5823d8b0
|
@ -119,6 +119,12 @@ int rstrcmp(const char *s1, const char *s2)
|
|||
s2++;
|
||||
}
|
||||
|
||||
/* did both string end */
|
||||
if (*s1 != 0)
|
||||
return 1;
|
||||
if (*s2 != 0)
|
||||
return -1;
|
||||
|
||||
/* match */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue