tree-wide: use memstream-util

This commit is contained in:
Yu Watanabe
2023-06-01 06:48:47 +09:00
parent abe72100cf
commit 2485b7e2b8
29 changed files with 302 additions and 479 deletions
+4 -4
View File
@@ -11,6 +11,7 @@
#include "hexdecoct.h"
#include "json.h"
#include "main-func.h"
#include "memstream-util.h"
#include "openssl-util.h"
#include "parse-argument.h"
#include "parse-util.h"
@@ -779,13 +780,12 @@ static int verb_sign(int argc, char *argv[], void *userdata) {
if (!pubkey)
return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to parse public key '%s'.", arg_public_key);
} else {
_cleanup_free_ char *data = NULL;
_cleanup_fclose_ FILE *tf = NULL;
size_t sz;
_cleanup_(memstream_done) MemStream m = {};
FILE *tf;
/* No public key was specified, let's derive it automatically, if we can */
tf = open_memstream_unlocked(&data, &sz);
tf = memstream_init(&m);
if (!tf)
return log_oom();