char smack_label[1024] = {'\0',};
if (!p_cynara) {
- return false;
+ return false;
}
fp = fopen(label_path, "r");
if (fp != NULL) {
- if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0)
- SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread");
+ if (sizeof(smack_label) != fread(smack_label, 1, sizeof(smack_label), fp))
+ SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread");
- fclose(fp);
+ fclose(fp);
}
pid_t pid = getpid();
}
if (ret != CYNARA_API_ACCESS_ALLOWED)
- return false;
+ return false;
return true;
}