diff options
author | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
commit | f0de78bd4f29fa688c5df116f3f9cd43543a76d0 (patch) | |
tree | 856b0dee3f2764c13a32dad5ffe2424fab7fef41 /regress/unittests/sshkey/common.c | |
parent | 4213eec74e74de6310c27a40c3e9759a08a73996 (diff) | |
parent | 8aa3455b16fddea4c0144a7c4a1edb10ec67dcc8 (diff) |
Import openssh_8.2p1.orig.tar.gz
Diffstat (limited to 'regress/unittests/sshkey/common.c')
-rw-r--r-- | regress/unittests/sshkey/common.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/regress/unittests/sshkey/common.c b/regress/unittests/sshkey/common.c index e21638093..effea578c 100644 --- a/regress/unittests/sshkey/common.c +++ b/regress/unittests/sshkey/common.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: common.c,v 1.3 2018/09/13 09:03:20 djm Exp $ */ | 1 | /* $OpenBSD: common.c,v 1.4 2020/01/26 00:09:50 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Helpers for key API tests | 3 | * Helpers for key API tests |
4 | * | 4 | * |
@@ -43,13 +43,10 @@ | |||
43 | struct sshbuf * | 43 | struct sshbuf * |
44 | load_file(const char *name) | 44 | load_file(const char *name) |
45 | { | 45 | { |
46 | int fd; | 46 | struct sshbuf *ret = NULL; |
47 | struct sshbuf *ret; | ||
48 | 47 | ||
49 | ASSERT_PTR_NE(ret = sshbuf_new(), NULL); | 48 | ASSERT_INT_EQ(sshbuf_load_file(test_data_file(name), &ret), 0); |
50 | ASSERT_INT_NE(fd = open(test_data_file(name), O_RDONLY), -1); | 49 | ASSERT_PTR_NE(ret, NULL); |
51 | ASSERT_INT_EQ(sshkey_load_file(fd, ret), 0); | ||
52 | close(fd); | ||
53 | return ret; | 50 | return ret; |
54 | } | 51 | } |
55 | 52 | ||