~7-luca/skylable/master

« back to all changes in this revision

Viewing changes to libsxclient/src/clustcfg.c

  • Committer: Alberto Wu
  • Date: 2015-10-29 16:39:50 UTC
  • Revision ID: git-v1:4d0837a887d92ed148e87a6e7bb7f4096046dc98
Allow building with valgrind hints (--enable-vghints)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2787
2787
        memcpy(buf, old, AUTHTOK_BIN_LEN);
2788
2788
    } else if(generate_key) {
2789
2789
        /* Generate random key */
2790
 
        if (sxi_rand_bytes(key, AUTH_KEY_LEN) != 1) {
 
2790
        if (sxi_rand_bytes(key, AUTH_KEY_LEN)) {
2791
2791
            cluster_err(SXE_ECRYPT, "Unable to produce a random key");
2792
2792
            return NULL;
2793
2793
        }
2958
2958
        memcpy(key, &old[AUTH_UID_LEN], AUTH_KEY_LEN);
2959
2959
    } else if(generate_key) {
2960
2960
        /* Generate random key */
2961
 
        if (sxi_rand_bytes(key, AUTH_KEY_LEN) != 1) {
 
2961
        if (sxi_rand_bytes(key, AUTH_KEY_LEN)) {
2962
2962
            cluster_err(SXE_ECRYPT, "Unable to produce a random key");
2963
2963
            return NULL;
2964
2964
        }