small fix checknodefalgs

This commit is contained in:
Alexey Khromov 2025-03-23 20:36:07 +03:00
parent 8db2ee4260
commit de6ef3936b

View File

@ -57,7 +57,7 @@ int nodelist_checkflag(const char *nodeflags, const char *flag)
char *q;
DEB((D_NODELIST, "nodelist: checking flag \"%s\" in flags \"%s\"", flag, nodeflags));
if ( nodeflags ) {
while( p = strcasestr(searchbase, flag) ) // p - found flag
{
if( (p == searchbase) || (p != searchbase && *(p-1) == ',') )
@ -74,6 +74,7 @@ int nodelist_checkflag(const char *nodeflags, const char *flag)
searchbase = p + 1; // avoid finding again the same
}
}
return 1;
}