mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 12:44:07 +00:00
Resolve warnings about assignments within conditions.
- Working towards issue #11.
This commit is contained in:
parent
d44d1837bb
commit
61ae195af7
|
@ -157,7 +157,6 @@ static int config_parse(config *cfg, const char *name, const char *value)
|
|||
static const char * const colormatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m",
|
||||
"smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL };
|
||||
|
||||
int i;
|
||||
int error = 0;
|
||||
|
||||
if (!name)
|
||||
|
@ -165,8 +164,9 @@ static int config_parse(config *cfg, const char *name, const char *value)
|
|||
if (!value)
|
||||
value = "true";
|
||||
|
||||
if ((!strncmp(name, "no-", 3) && (i = 3))) {
|
||||
name += i;
|
||||
// Treat "--no-param" as --param 0
|
||||
if ((!strncmp(name, "no-", 3))) {
|
||||
name += 3;
|
||||
value = atobool(value) ? "false" : "true";
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,8 @@ int main(int argc, char *argv[])
|
|||
sprintf(dim_str, "_%dx%d.yuv", cfg->width, cfg->height);
|
||||
left_len = strlen(cfg->debug);
|
||||
right_len = strlen(dim_str);
|
||||
if (!(cfg->debug = realloc(cfg->debug, left_len + right_len + 1))) {
|
||||
cfg->debug = realloc(cfg->debug, left_len + right_len + 1);
|
||||
if (!cfg->debug) {
|
||||
fprintf(stderr, "realloc failed!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue