From: Jan Altensen Date: Mon, 21 Jun 2021 21:20:26 +0000 (+0200) Subject: dtbTool: fix compile errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=refs%2Fheads%2Flineage-18.1;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_tools_dtbtool.git dtbTool: fix compile errors Change-Id: I23a2df5332e6067392412c119fae0cf564805f04 --- 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;