mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-01 18:39:19 +00:00
Add null check in isempty function
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user