sign: fix memory leaks and code cleanup

Return `const char *` instead of copy of the string -- this allow to
avoid unneeded copying and memory leaks in some constructions.
Minor code cleanup and optimisations.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
This commit is contained in:
Denis Pynkin committed 2020-03-25 15:23:54 +03:00
1 parent 5fc2ddff30
commit 557f423609
7 files changed
+65 -85

No files matched your search

+3 -3
View File
@@ -46,9 +46,9 @@ gboolean ostree_sign_ed25519_data (OstreeSign *self,
GCancellable *cancellable,
GError **error);
gchar * ostree_sign_ed25519_get_name (OstreeSign *self);
gchar * ostree_sign_ed25519_metadata_key (OstreeSign *self);
gchar * ostree_sign_ed25519_metadata_format (OstreeSign *self);
const gchar * ostree_sign_ed25519_get_name (OstreeSign *self);
const gchar * ostree_sign_ed25519_metadata_key (OstreeSign *self);
const gchar * ostree_sign_ed25519_metadata_format (OstreeSign *self);
gboolean ostree_sign_ed25519_metadata_verify (OstreeSign *self,
GBytes *data,