summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/tfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/net/tfo.c')
-rw-r--r--tools/testing/selftests/net/tfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tfo.c b/tools/testing/selftests/net/tfo.c
index eb3cac5e583c..8d82140f0f76 100644
--- a/tools/testing/selftests/net/tfo.c
+++ b/tools/testing/selftests/net/tfo.c
@@ -81,7 +81,8 @@ static void run_server(void)
if (getsockopt(connfd, SOL_SOCKET, SO_INCOMING_NAPI_ID, &opt, &len) < 0)
error(1, errno, "getsockopt(SO_INCOMING_NAPI_ID)");
- read(connfd, buf, 64);
+ if (read(connfd, buf, 64) < 0)
+ perror("read()");
fprintf(outfile, "%d\n", opt);
fclose(outfile);