posix.cfg: Ensure null pointer input is correctly handled for strcasecmp().
This commit is contained in:
parent
a8a821a9c7
commit
7cbdea9b81
|
@ -216,6 +216,16 @@ char * overlappingWriteFunction_stpcpy(char *src, char *dest)
|
||||||
return stpcpy(src, src);
|
return stpcpy(src, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int nullPointer_strcasecmp(char *a, char *b)
|
||||||
|
{
|
||||||
|
// No warning shall be shown:
|
||||||
|
(void) strcasecmp(a, b);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void) strcasecmp(a, NULL);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
return strcasecmp(NULL, b);
|
||||||
|
}
|
||||||
|
|
||||||
int nullPointer_strncasecmp(char *a, char *b, size_t n)
|
int nullPointer_strncasecmp(char *a, char *b, size_t n)
|
||||||
{
|
{
|
||||||
// No warning shall be shown:
|
// No warning shall be shown:
|
||||||
|
|
Loading…
Reference in New Issue