summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-05 16:45:49 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-14 14:04:51 +0200
commitda89d53e9abb971d3e2898597362f8886159868b (patch)
tree11b1820c4de72313479892487dbbbd32468b2439
parentc720d0ed2d95b6f73a6e26bfda1ef853cd41be25 (diff)
AFBClient: fix port sanity check
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--AFBClient.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/AFBClient.cpp b/AFBClient.cpp
index fbffb2c..1677509 100644
--- a/AFBClient.cpp
+++ b/AFBClient.cpp
@@ -172,7 +172,7 @@ int AFBClient::Impl::init(int port, char const *token) {
}
}
- if (port < 1 && port > 0xffff) {
+ if (port < 1 || port > 0xffff) {
fputs("Port is invalid\n", stderr);
rc = -EINVAL;
goto fail;