samples/enclave-tls-server: code style cleanup
@@ -53,8 +53,9 @@ typedef struct {
int sgx_create_report(sgx_report_t *report)
{
- int sgx_fd;
- if ((sgx_fd = open("/dev/sgx", O_RDONLY)) < 0) {
+ int sgx_fd = open("/dev/sgx", O_RDONLY);
+
+ if (sgx_fd < 0) {
fprintf(stderr, "open sgx device error\n");
return -1;
}
