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)) {
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;