projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
further unclutter.
[apps/madmutt.git]
/
crypt.c
diff --git
a/crypt.c
b/crypt.c
index
b9a5122
..
2273165
100644
(file)
--- a/
crypt.c
+++ b/
crypt.c
@@
-22,7
+22,6
@@
#include <lib-mx/mx.h>
#include "crypt.h"
#include <lib-mx/mx.h>
#include "crypt.h"
-#include "lib.h"
#include "alias.h"
#include "handler.h"
#include "copy.h"
#include "alias.h"
#include "handler.h"
#include "copy.h"
@@
-561,18
+560,15
@@
static char *encrypt_gpgme_object(gpgme_data_t plaintext, gpgme_key_t *rset,
static int get_micalg(gpgme_ctx_t ctx, char *buf, ssize_t buflen)
{
gpgme_sign_result_t result = NULL;
static int get_micalg(gpgme_ctx_t ctx, char *buf, ssize_t buflen)
{
gpgme_sign_result_t result = NULL;
- const char *alg
orithm_name
= NULL;
+ const char *alg = NULL;
- *buf = '\0';
result = gpgme_op_sign_result(ctx);
result = gpgme_op_sign_result(ctx);
- if (result) {
- algorithm_name = gpgme_hash_algo_name (result->signatures->hash_algo);
- if (algorithm_name) {
- m_strcpy(buf, buflen, algorithm_name);
- }
+ if (result && result->signatures) {
+ alg = gpgme_hash_algo_name(result->signatures->hash_algo);
}
}
+ m_strcpy(buf, buflen, NONULL(alg));
- return
*buf
? 0 : -1;
+ return
alg
? 0 : -1;
}
static void print_time(time_t t, STATE *s)
}
static void print_time(time_t t, STATE *s)