]> git.sommitrealweird.co.uk Git - onak.git/commitdiff
cscvs to tla changeset 11
authorJonathan McDowell <noodles@earth.li>
Mon, 31 May 2004 23:46:58 +0000 (23:46 +0000)
committerJonathan McDowell <noodles@earth.li>
Mon, 31 May 2004 23:46:58 +0000 (23:46 +0000)
Author: noodles
Date: 2002/09/08 10:36:19
Basic code cleanup.

keydb.c

diff --git a/keydb.c b/keydb.c
index 3ebb0560bf72ab8cb8ecbdfa5a6221c27cceb65e..c5b07c628dfd2040d3152311dc85bec31ce729ad 100644 (file)
--- a/keydb.c
+++ b/keydb.c
@@ -32,7 +32,7 @@ char *keyid2uid(uint64_t keyid)
 {
        struct openpgp_publickey *publickey = NULL;
        struct openpgp_signedpacket_list *curuid = NULL;
 {
        struct openpgp_publickey *publickey = NULL;
        struct openpgp_signedpacket_list *curuid = NULL;
-       static char buf[1024];
+       char buf[1024];
 
        buf[0]=0;
        if (fetch_key(keyid, &publickey, false) && publickey != NULL) {
 
        buf[0]=0;
        if (fetch_key(keyid, &publickey, false) && publickey != NULL) {
@@ -51,7 +51,7 @@ char *keyid2uid(uint64_t keyid)
        if (buf[0] == 0) {
                return NULL;
        } else {
        if (buf[0] == 0) {
                return NULL;
        } else {
-               return buf;
+               return strdup(buf);
        }
 }
 #endif
        }
 }
 #endif
@@ -95,7 +95,7 @@ uint64_t getfullkeyid(uint64_t keyid)
 {
        struct openpgp_publickey *publickey = NULL;
 
 {
        struct openpgp_publickey *publickey = NULL;
 
-       if (keyid < 0x100000000) {
+       if (keyid < 0x100000000LL) {
                fetch_key(keyid, &publickey, false);
                keyid = get_keyid(publickey);
                free_publickey(publickey);
                fetch_key(keyid, &publickey, false);
                keyid = get_keyid(publickey);
                free_publickey(publickey);