Fix some warnings
[vlendec/samba-autobuild/.git] / source3 / param / loadparm.c
index 4d067af5a50e770048a207ca00ce554b9dc59d25..86446d5b75f73c91759aaeeb0d90155a44073c24 100644 (file)
@@ -2251,8 +2251,7 @@ static param_opt_struct *get_parametrics(int snum, const char *type, const char
                data = ServicePtrs[snum]->param_opt;
        }
     
-       asprintf(&param_key, "%s:%s", type, option);
-       if (!param_key) {
+       if (asprintf(&param_key, "%s:%s", type, option) == -1) {
                DEBUG(0,("asprintf failed!\n"));
                return NULL;
        }