From: Jonathan McDowell Date: Mon, 31 May 2004 23:46:58 +0000 (+0000) Subject: cscvs to tla changeset 11 X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/656bb5c3981ae175698ff8782c7ec39e1f6451d1?ds=inline;hp=7388adcea7ebace8d8c299da0e7c2e7e93da9c83 cscvs to tla changeset 11 Author: noodles Date: 2002/09/08 10:36:19 Basic code cleanup. --- diff --git a/keydb.c b/keydb.c index 3ebb056..c5b07c6 100644 --- 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; - static char buf[1024]; + char buf[1024]; 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 { - return buf; + return strdup(buf); } } #endif @@ -95,7 +95,7 @@ uint64_t getfullkeyid(uint64_t keyid) { struct openpgp_publickey *publickey = NULL; - if (keyid < 0x100000000) { + if (keyid < 0x100000000LL) { fetch_key(keyid, &publickey, false); keyid = get_keyid(publickey); free_publickey(publickey);