mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-19 03:52:52 +00:00
Clean up and fix comments of Check_ArgIsTrue()
Thanks to kaFux for pointing this out! And fix code formatting as well ...
This commit is contained in:
parent
07dbb73c92
commit
d2f54abbed
@ -978,17 +978,21 @@ Read_Config( bool ngircd_starting )
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether an string argument is true or false.
|
||||
* Check whether a string argument is "true" or "false".
|
||||
*
|
||||
* @param Arg Input string.
|
||||
* @returns true if string has been parsed as "yes"/"true"/"on".
|
||||
* @returns true if the input string has been parsed as "yes", "true"
|
||||
* (case insensitive) or a non-zero integer value.
|
||||
*/
|
||||
static bool
|
||||
Check_ArgIsTrue( const char *Arg )
|
||||
Check_ArgIsTrue(const char *Arg)
|
||||
{
|
||||
if( strcasecmp( Arg, "yes" ) == 0 ) return true;
|
||||
if( strcasecmp( Arg, "true" ) == 0 ) return true;
|
||||
if( atoi( Arg ) != 0 ) return true;
|
||||
if (strcasecmp(Arg, "yes") == 0)
|
||||
return true;
|
||||
if (strcasecmp(Arg, "true") == 0)
|
||||
return true;
|
||||
if (atoi(Arg) != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user