Fix issues detected by static analysis

This commit is contained in:
Stéphane Lesimple
2025-04-11 19:21:28 +02:00
parent d01aae080e
commit 64f31a8e5d
15 changed files with 36 additions and 24 deletions

View File

@@ -367,9 +367,9 @@ int main(int argc, char *argv[])
}
break;
}
case 'o': if(!strcmp(optarg, "file"))
case 'o': if(optarg && !strcmp(optarg, "file"))
Closure->eccTarget = ECC_FILE;
else if(!strcmp(optarg, "image"))
else if(optarg && !strcmp(optarg, "image"))
Closure->eccTarget = ECC_IMAGE;
else Stop(_("-o/--ecc-target expects 'file' or 'image'"));
break;