Fixed a core dump with signed/unsigned and an error in converting from
subsystem text to subsystem number This version compiles and runs under rhel7
This commit is contained in:
4
logv2.c
4
logv2.c
@ -221,7 +221,7 @@ int subsystemFromText(const char *text)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return SINVALID;
|
||||||
}
|
}
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
void formatSubsystem(unsigned int sub, char *buffer, unsigned int bufferLength)
|
void formatSubsystem(unsigned int sub, char *buffer, unsigned int bufferLength)
|
||||||
@ -265,7 +265,7 @@ unsigned int logFilter(unsigned int severity, const char *subsystem, const char
|
|||||||
If it is in the list of enabled subsystems, everything is logged
|
If it is in the list of enabled subsystems, everything is logged
|
||||||
*/
|
*/
|
||||||
sub = subsystemFromText(subsystem);
|
sub = subsystemFromText(subsystem);
|
||||||
if(sub >= 0 && severity <= logEnabledArray[sub]){
|
if((sub >= 0 && sub <= SINVALID) && severity <= logEnabledArray[sub]){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user