From: claudio Date: Sun, 10 Apr 2022 14:08:35 +0000 (+0000) Subject: Print the strerror of the expected error. errno is not valid here since X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=93aefe23b3a72ebdbbf1c04ba4c059ad97c0f884;p=openbsd Print the strerror of the expected error. errno is not valid here since bind(2) succeeded. --- diff --git a/regress/sys/netinet/in_pcbbind/runtest.c b/regress/sys/netinet/in_pcbbind/runtest.c index 2842a2c7b7d..c9715662020 100644 --- a/regress/sys/netinet/in_pcbbind/runtest.c +++ b/regress/sys/netinet/in_pcbbind/runtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: runtest.c,v 1.6 2020/12/30 18:56:56 benno Exp $ */ +/* $OpenBSD: runtest.c,v 1.7 2022/04/10 14:08:35 claudio Exp $ */ /* * Copyright (c) 2015 Vincent Gross * @@ -99,7 +99,7 @@ runtest(int *sockp, struct addrinfo *ai, int reuseaddr, int reuseport, if (error == 0 && expected != 0) { warnx("bind(%s,%s,%s) succeeded, expected : %s", ai->ai_canonname, reuseaddr ? "REUSEADDR" : "", reuseport ? "REUSEPORT" : "", - strerror(errno)); + strerror(expected)); return (1); }