tyls: don't call strlen()

This commit is contained in:
Jean Guyomarc'h 2016-01-30 22:36:34 +01:00 committed by Jean Guyomarc'h
parent a6d698a550
commit e13f5f19e4
1 changed files with 3 additions and 3 deletions

View File

@ -759,9 +759,9 @@ main(int argc, char **argv)
evas = ecore_evas_get(ee);
echo_off();
snprintf(buf, sizeof(buf), "%c}qs", 0x1b);
len = strlen(buf);
if (write(STDIN_FILENO, buf, len + 1) < (signed)len + 1) perror("write");
len = snprintf(buf, sizeof(buf), "%c}qs", 0x1b);
len++;
if (write(STDIN_FILENO, buf, len) < len) perror("write");
if ((scanf("%i;%i;%i;%i", &tw, &th, &cw, &ch) != 4)
|| (tw <= 0) || (th <= 0) || (cw <= 1) || (ch <= 1))
{