static int vnc_set_x509_credential(VncDisplay *vd,

                                   const char *certdir,

                                   const char *filename,

                                   char **cred,

                                   int ignoreMissing)

{

    struct stat sb;



    g_free(*cred);

    *cred = g_malloc(strlen(certdir) + strlen(filename) + 2);



    strcpy(*cred, certdir);

    strcat(*cred, "/");

    strcat(*cred, filename);



    VNC_DEBUG("Check %s\n", *cred);

    if (stat(*cred, &sb) < 0) {

        g_free(*cred);

        *cred = NULL;

        if (ignoreMissing && errno == ENOENT)

            return 0;

        return -1;

    }



    return 0;

}

static int vnc_set_x509_credential(VncDisplay *vd,

                                   const char *certdir,

                                   const char *filename,

                                   char **cred,

                                   int ignoreMissing)

{

    struct stat sb;



    g_free(*cred);

    *cred = g_malloc(strlen(certdir) + strlen(filename) + 2);



    strcpy(*cred, certdir);

    strcat(*cred, "/");

    strcat(*cred, filename);



    VNC_DEBUG("Check %s\n", *cred);

    if (stat(*cred, &sb) < 0) {

        g_free(*cred);

        *cred = NULL;

        if (ignoreMissing && errno == ENOENT)

            return 0;

        return -1;

    }



    return 0;

}

        return -1;         return -1;         return -1;         return -1;         return -1;         return -1;         return -1;     return 0;         return -1;     return 0;         return -1;         return -1;         return -1;     return 0;         return -1;     return 0; static int vnc_set_x509_credential(VncDisplay *vd,                                    const char *certdir,                                    const char *filename,                                    char **cred,                                    int ignoreMissing)     struct stat sb;     g_free(*cred);     *cred = g_malloc(strlen(certdir) + strlen(filename) + 2);     strcpy(*cred, certdir);     strcat(*cred, "/");     strcat(*cred, filename);     VNC_DEBUG("Check %s\n", *cred);     if (stat(*cred, &sb) < 0) {         g_free(*cred);         *cred = NULL;         if (ignoreMissing && errno == ENOENT)             return 0;         return -1;     return 0;     return 0;             return 0;         return -1;
static int FUNC_0(VncDisplay *VAR_0,

                                   const char *VAR_1,

                                   const char *VAR_2,

                                   char **VAR_3,

                                   int VAR_4)

{

    struct stat VAR_5;



    g_free(*VAR_3);

    *VAR_3 = g_malloc(strlen(VAR_1) + strlen(VAR_2) + 2);



    strcpy(*VAR_3, VAR_1);

    strcat(*VAR_3, "/");

    strcat(*VAR_3, VAR_2);



    VNC_DEBUG("Check %s\n", *VAR_3);

    if (stat(*VAR_3, &VAR_5) < 0) {

        g_free(*VAR_3);

        *VAR_3 = NULL;

        if (VAR_4 && errno == ENOENT)

            return 0;

        return -1;

    }



    return 0;

}

static int FUNC_0(VncDisplay *VAR_0,
const char *VAR_1,
const char *VAR_2,
char **VAR_3,
int VAR_4)
{ struct stat VAR_5; g_free(*VAR_3); *VAR_3 = g_malloc(strlen(VAR_1) + strlen(VAR_2) + 2); strcpy(*VAR_3, VAR_1); strcat(*VAR_3, "/"); strcat(*VAR_3, VAR_2); VNC_DEBUG("Check %s\n", *VAR_3); if (stat(*VAR_3, &VAR_5) < 0) { g_free(*VAR_3); *VAR_3 = NULL; if (VAR_4 && errno == ENOENT)
return 0; return -1; } return 0; }