aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/model/GpgData.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-12-05 06:25:17 +0000
committerSaturneric <[email protected]>2021-12-05 07:33:00 +0000
commitc6a0a8db19c92a7c9ca0569e2c24a3503071c574 (patch)
tree1b9972e825962dd4b4edaa1ab0111679b450328b /src/gpg/model/GpgData.cpp
parentUpdate Ci Configurre File (diff)
parentMerge branch 'main' of github.com:saturneric/GpgFrontend (diff)
downloadGpgFrontend-c6a0a8db19c92a7c9ca0569e2c24a3503071c574.tar.gz
GpgFrontend-c6a0a8db19c92a7c9ca0569e2c24a3503071c574.zip
Merge branch 'main' into develop
1. Fix issues noticed by codacy. 2. Fix CI Configure Files. 3. Modified Porject Configuration. 4. Fixed Error in Source Code.
Diffstat (limited to 'src/gpg/model/GpgData.cpp')
-rw-r--r--src/gpg/model/GpgData.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpg/model/GpgData.cpp b/src/gpg/model/GpgData.cpp
index 23cdaf2d..c6e9b2ce 100644
--- a/src/gpg/model/GpgData.cpp
+++ b/src/gpg/model/GpgData.cpp
@@ -52,12 +52,10 @@ GpgFrontend::GpgData::GpgData(void* buffer, size_t size, bool copy) {
GpgFrontend::ByteArrayPtr GpgFrontend::GpgData::Read2Buffer() {
gpgme_off_t ret = gpgme_data_seek(*this, 0, SEEK_SET);
- gpgme_error_t err = gpg_error(GPG_ERR_NO_ERROR);
-
ByteArrayPtr out_buffer = std::make_unique<std::string>();
if (ret) {
- err = gpgme_err_code_from_errno(errno);
+ gpgme_error_t err = gpgme_err_code_from_errno(errno);
assert(gpgme_err_code(err) == GPG_ERR_NO_ERROR);
} else {
char buf[BUF_SIZE + 2];
@@ -68,7 +66,7 @@ GpgFrontend::ByteArrayPtr GpgFrontend::GpgData::Read2Buffer() {
memcpy(out_buffer->data() + size, buf, ret);
}
if (ret < 0) {
- err = gpgme_err_code_from_errno(errno);
+ gpgme_error_t err = gpgme_err_code_from_errno(errno);
assert(gpgme_err_code(err) == GPG_ERR_NO_ERROR);
}
}