test: Fix a thinko in simple-xinit

Spotted by clang courtesy of the shiny new OSX Travis target:

simple-xinit.c:90:65: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [10]' [-Wsizeof-array-decay]
    ret = read(displayfd, display_string, sizeof(display_string - 1));

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Adam Jackson 2017-09-25 15:01:32 -04:00
parent 84e3b96b53
commit 0888b22fea
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ get_display(int displayfd)
char display_string[10];
ssize_t ret;
ret = read(displayfd, display_string, sizeof(display_string - 1));
ret = read(displayfd, display_string, sizeof(display_string) - 1);
if (ret <= 0) {
fprintf(stderr, "Failed reading displayfd: %s\n", strerror(errno));
exit(1);