aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-06-30 14:15:07 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-06-30 14:37:04 +0200
commit21962dd154e6f5e02d29706db5ddd43722ffae5c (patch)
treec597d6df27ef318fa5c7167d486a33a5aa124424
parent8917b8484059691bd0b013516ab909eef0869d5d (diff)
downloadlibssh-21962dd154e6f5e02d29706db5ddd43722ffae5c.tar.gz
libssh-21962dd154e6f5e02d29706db5ddd43722ffae5c.tar.xz
libssh-21962dd154e6f5e02d29706db5ddd43722ffae5c.zip
known_hosts: Simplify invalid tokens check
CID 1393677 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/known_hosts.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/known_hosts.c b/src/known_hosts.c
index bef71200..acc88487 100644
--- a/src/known_hosts.c
+++ b/src/known_hosts.c
@@ -138,13 +138,7 @@ static char **ssh_get_knownhost_line(FILE **file, const char *filename,
}
*found_type = tokens[1];
- if (tokens[3]) {
- if (tokens[4]) {
- /* that's never valid */
- tokens_free(tokens);
- continue;
- }
- /* 3 tokens only, not four */
+ if (tokens[3] || tokens[4]) {
tokens_free(tokens);
continue;
}