]> the.earth.li Git - onak.git/blobdiff - parsekey.c
Try to load backends from current dir if none specified.
[onak.git] / parsekey.c
index 0367e2d1a927dd0f71631e569f5d582b05c8c7eb..687fd9bd8612c6f9a3cd2c41af96e9269368a620 100644 (file)
@@ -4,11 +4,8 @@
  * Jonathan McDowell <noodles@earth.li>
  *
  * Copyright 2002 Project Purple
- *
- * $Id: parsekey.c,v 1.20 2004/05/27 21:55:38 noodles Exp $
  */
 
-#include <assert.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -54,7 +51,7 @@ int parse_keys(struct openpgp_packet_list *packets,
                         * key (it should be a revocation), to the current UID
                         * or the current subkey.
                         */
-                       assert(curkey != NULL);
+                       log_assert(curkey != NULL);
                        if (curkey->subkeys != NULL) {
                                ADD_PACKET_TO_LIST_END(curkey->last_subkey,
                                        sig,
@@ -90,8 +87,8 @@ int parse_keys(struct openpgp_packet_list *packets,
                        /*
                         * It's a UID packet (or a photo id, which is similar).
                         */
-                       assert(curkey != NULL);
-                       assert(curkey->subkeys == NULL);
+                       log_assert(curkey != NULL);
+                       log_assert(curkey->subkeys == NULL);
                        ADD_PACKET_TO_LIST_END(curkey,
                                uid,
                                packet_dup(packets->packet));
@@ -100,7 +97,7 @@ int parse_keys(struct openpgp_packet_list *packets,
                        /*
                         * It's a subkey packet.
                         */
-                       assert(curkey != NULL);
+                       log_assert(curkey != NULL);
                        ADD_PACKET_TO_LIST_END(curkey,
                                subkey,
                                packet_dup(packets->packet));
@@ -166,7 +163,7 @@ int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
        int                              keys = 0;
        bool                             inpacket = false;
 
-       assert(packets != NULL);
+       log_assert(packets != NULL);
        curpacket = *packets;
        if (curpacket != NULL) {
                while (curpacket->next != NULL) {