From 0888b22fea71118b1a9a238134b3b8d1dc659734 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 25 Sep 2017 15:01:32 -0400 Subject: [PATCH] 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 Reviewed-by: Alan Coopersmith --- test/simple-xinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple-xinit.c b/test/simple-xinit.c index 1fc31be26..26ff12bf7 100644 --- a/test/simple-xinit.c +++ b/test/simple-xinit.c @@ -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);