/**
* convenience routine to return boolean parameters.
*/
-static bool lp_bool(const char *s)
+bool lp_bool(const char *s)
{
bool ret = false;
- if (!s) {
+ if (!s || !*s) {
DEBUG(0,("lp_bool(%s): is called with NULL!\n",s));
return false;
}
#define MISSING_PARAMETER(name) \
DEBUG(0, ("%s(): value is NULL or empty!\n", #name))
-/*******************************************************************
-convenience routine to return boolean parameters.
-********************************************************************/
-static bool lp_bool(const char *s)
-{
- bool ret = false;
-
- if (!s || !*s) {
- MISSING_PARAMETER(lp_bool);
- return false;
- }
-
- if (!set_boolean(s, &ret)) {
- DEBUG(0,("lp_bool(%s): value is not boolean!\n",s));
- return false;
- }
-
- return ret;
-}
-
/*******************************************************************
convenience routine to return enum parameters.
********************************************************************/