summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-gpg-verifier.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-07-24 12:25:07 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-07-24 18:43:57 +0000
commit0985158be7cf1529ddb349f0a1e3153600f187ad (patch)
tree2d6e636d7f94cf8e1cc4121c1e73740718a4c672 /src/libostree/ostree-gpg-verifier.c
parent8456fd5057cb3fbef3e27d53d979b8af33cbbbd4 (diff)
downloadostree-0985158be7cf1529ddb349f0a1e3153600f187ad.tar.gz
Update libglnx, port some uses to newer APIs
Mostly for the latest `-Wmaybe-uninitialized` fix, but while here also port some places to newer APIs. Update submodule: libglnx Closes: #1027 Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-gpg-verifier.c')
-rw-r--r--src/libostree/ostree-gpg-verifier.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c
index c008bdaf..77594d9b 100644
--- a/src/libostree/ostree-gpg-verifier.c
+++ b/src/libostree/ostree-gpg-verifier.c
@@ -167,12 +167,8 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self,
glnx_fd_close int fd = -1;
ot_auto_gpgme_data gpgme_data_t kdata = NULL;
- fd = openat (AT_FDCWD, path, O_RDONLY | O_CLOEXEC) ;
- if (fd < 0)
- {
- glnx_set_prefix_error_from_errno (error, "Opening %s", path);
- goto out;
- }
+ if (!glnx_openat_rdonly (AT_FDCWD, path, TRUE, &fd, error))
+ goto out;
gpg_error = gpgme_data_new_from_fd (&kdata, fd);
if (gpg_error != GPG_ERR_NO_ERROR)