Change scope to always check the correct return value

This commit is contained in:
lostd 2015-01-28 12:47:11 +02:00
parent 3c45733f47
commit 0aefc2f496

View file

@ -748,7 +748,7 @@ moretyping:
if (r == 1) if (r == 1)
nowtyping = 0; nowtyping = 0;
/* Check regex errors */ /* Check regex errors */
if (tmp != NULL) if (tmp != NULL) {
r = setfilter(&re, tmp); r = setfilter(&re, tmp);
if (r != 0) if (r != 0)
if (nowtyping) { if (nowtyping) {
@ -757,6 +757,7 @@ moretyping:
free(tmp); free(tmp);
goto nochange; goto nochange;
} }
}
/* Copy or reset filter */ /* Copy or reset filter */
free(filter); free(filter);
if (tmp != NULL) if (tmp != NULL)