openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/dbus/dbus-sysdeps-unix.c
const char* _dbus_get_tmpdir(void)
{
    /* Protected by _DBUS_LOCK_sysdeps */
    static const char* tmpdir = NULL;

    if (!_DBUS_LOCK(sysdeps))
        return NULL;

    if (tmpdir == NULL)
    {
        /* TMPDIR is what glibc uses, then
         * glibc falls back to the P_tmpdir macro which
         * just expands to "/tmp"
         */
        if (tmpdir == NULL)
            tmpdir = getenv("TMPDIR");

        /* These two env variables are probably
         * broken, but maybe some OS uses them?
         */
        if (tmpdir == NULL)
            tmpdir = getenv("TMP");
        if (tmpdir == NULL)
            tmpdir = getenv("TEMP");

        /* And this is the sane fallback. */
        if (tmpdir == NULL)
            tmpdir = "/tmp";
    }

    _DBUS_UNLOCK(sysdeps);

    _dbus_assert(tmpdir != NULL);

    return tmpdir;
}
/**
 * Gets the temporary files directory by inspecting the environment variables
 * TMPDIR, TMP, and TEMP in that order. If none of those are set "/tmp" is
 * returned
 *
 * @returns location of temp directory, or #NULL if no memory for locking
 */
Gets the temporary files directory by inspecting the environment variables
TMPDIR, TMP, and TEMP in that order. If none of those are set "/tmp" is
returned

@returns location of temp directory, or #NULL if no memory for locking
Gets the temporary files directory by inspecting the environment variables TMPDIR TMP and TEMP in that order . If none of those are set " / tmp " is returned @returns location of temp directory or #NULL if no memory for locking
const char* _dbus_get_tmpdir(void)
{
    static const char* tmpdir = NULL;
    if (!_DBUS_LOCK(sysdeps))
        return NULL;
    if (tmpdir == NULL)
    {
        if (tmpdir == NULL)
            tmpdir = getenv("TMPDIR");
        if (tmpdir == NULL)
            tmpdir = getenv("TMP");
        if (tmpdir == NULL)
            tmpdir = getenv("TEMP");
        if (tmpdir == NULL)
            tmpdir = "/tmp";
    }
    _DBUS_UNLOCK(sysdeps);
    _dbus_assert(tmpdir != NULL);
    return tmpdir;
}
const char * _dbus_get_tmpdir ( void ) { static const char * tmpdir = NULL ; if ( ! _DBUS_LOCK ( sysdeps ) ) return NULL ; if ( tmpdir == NULL ) { if ( tmpdir == NULL ) tmpdir = getenv ( " " ) ; if ( tmpdir == NULL ) tmpdir = getenv ( " " ) ; if ( tmpdir == NULL ) tmpdir = getenv ( " " ) ; if ( tmpdir == NULL ) tmpdir = " " ; } _DBUS_UNLOCK ( sysdeps ) ; _dbus_assert ( tmpdir != NULL ) ; return tmpdir ; }
Gets the temporary files directory by inspecting the environment variables
 TMPDIR, TMP, and TEMP in that order.
Gets the temporary files directory by inspecting the environment variables TMPDIR TMP and TEMP in that order .
/* Protected by _DBUS_LOCK_sysdeps */ /* TMPDIR is what glibc uses, then
         * glibc falls back to the P_tmpdir macro which
         * just expands to "/tmp"
         */ /* These two env variables are probably
         * broken, but maybe some OS uses them?
         */ /* And this is the sane fallback. */