]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Clean up and fix comments of Check_ArgIsTrue()
authorAlexander Barton <alex@barton.de>
Thu, 3 Nov 2011 08:54:28 +0000 (09:54 +0100)
committerAlexander Barton <alex@barton.de>
Thu, 3 Nov 2011 08:54:28 +0000 (09:54 +0100)
Thanks to kaFux for pointing this out!
And fix code formatting as well ...

src/ngircd/conf.c

index 4991918d54ade6d843e249bc61205e867d2ab497..97634af919e609259922d82138208afb4f8043ec 100644 (file)
@@ -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;
 }