Some days ago I asked this on the mailing list, in a function like:

static gboolean xunsetenv (char *varname) {

        if (unsetenv(varname) != 0) {

                return TRUE;

        }

        return FALSE;

}

How do replace if (unsetenv(varname) != 0) ? since OpenBSD's unsetenv is void.

Jim Razmus answered that one can do:

static gboolean xunsetenv (char *varname) {

        unsetenv (varname);

        return getenv (varname) == NULL ? TRUE : FALSE;

}

But, if I understand correctly, Thorsten Glaser rejected that answer,
because getenv fails for different reasons.

So, what is the proper wat to do this? Thanks

--
Andrés Delfino

Reply via email to