mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
Add null check in isempty function
This commit is contained in:
parent
daccdaeeae
commit
c76eb67883
@ -341,8 +341,12 @@ EXTERNC int isspace(int c)
|
||||
|
||||
EXTERNC int isempty(char *str)
|
||||
{
|
||||
if (str == NULL)
|
||||
return 1;
|
||||
|
||||
if (strlen(str) == 0)
|
||||
return 1;
|
||||
|
||||
while (*str != '\0')
|
||||
{
|
||||
if (!isspace(*str))
|
||||
|
Loading…
x
Reference in New Issue
Block a user