From 2774291f381ddb6b46fcb30ffebf4fac0893b237 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Mon, 21 Jun 2021 23:20:26 +0200 Subject: [PATCH] dtbTool: fix compile errors Change-Id: I23a2df5332e6067392412c119fae0cf564805f04 --- dtbTool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtbTool.c b/dtbTool.c index 32d46c4..d217a10 100644 --- a/dtbTool.c +++ b/dtbTool.c @@ -373,7 +373,7 @@ int main(int argc, char **argv) extract "amlogic-dt-id" parameter */ while ((dp = readdir(dir)) != NULL) { - if ((dp->d_type == DT_REG)) { + if (dp->d_type == DT_REG) { flen = strlen(dp->d_name); if ((flen > 4) && (strncmp(&dp->d_name[flen-4], ".dtb", 4) == 0)) { @@ -440,7 +440,7 @@ int main(int argc, char **argv) log_info("\nGenerating master DTB... "); out_fd = open(output_file, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); - if (!out_fd < 0) { + if (out_fd == -1) { log_err("Cannot create '%s'\n", output_file); rc = RC_ERROR; goto cleanup; -- 2.20.1