summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-09-25 15:01:32 -0400
committerAdam Jackson <ajax@redhat.com>2017-09-25 15:37:59 -0400
commit0888b22fea71118b1a9a238134b3b8d1dc659734 (patch)
tree5ccb957dbbee127b1540e6fcc504a382c7850876
parent84e3b96b531363e47f6789aacfcae4aa60135e2e (diff)
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>
-rw-r--r--test/simple-xinit.c2
1 files changed, 1 insertions, 1 deletions
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);