summaryrefslogtreecommitdiff
path: root/rpmio/rpmpgp.h
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-07 13:02:18 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-07 13:02:18 +0300
commita3a1a45c5131fd1dd885cd73bb9f6a7ac1ddbfba (patch)
tree711bafbc09f24954167cb13c68cf3c502b65dbdd /rpmio/rpmpgp.h
parenta70823b99814cbef36ccb1a056f9ef1e97bd7ae2 (diff)
downloadlibrpm-tizen-a3a1a45c5131fd1dd885cd73bb9f6a7ac1ddbfba.tar.gz
librpm-tizen-a3a1a45c5131fd1dd885cd73bb9f6a7ac1ddbfba.tar.bz2
librpm-tizen-a3a1a45c5131fd1dd885cd73bb9f6a7ac1ddbfba.zip
Remove static print buffer from pgpHexStr, return malloc'ed memory instead
- inlined to get xmalloc() from system.h for consistent malloc fail behavior - convert callers for new behavior, apart from some debug fprintf()'s
Diffstat (limited to 'rpmio/rpmpgp.h')
-rw-r--r--rpmio/rpmpgp.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/rpmio/rpmpgp.h b/rpmio/rpmpgp.h
index 6f7c50328..96e44ca8a 100644
--- a/rpmio/rpmpgp.h
+++ b/rpmio/rpmpgp.h
@@ -1049,19 +1049,11 @@ char * pgpHexCvt(char *t, const uint8_t *s, size_t nbytes)
/** \ingroup rpmpgp
* Return hex formatted representation of bytes.
- * @todo Remove static buffer.
* @param p bytes
* @param plen no. of bytes
- * @return hex formatted string
+ * @return hex formatted string (malloc'ed)
*/
-static inline
-const char * pgpHexStr(const uint8_t *p, size_t plen)
-{
- static char prbuf[8*BUFSIZ]; /* XXX ick */
- char *t = prbuf;
- t = pgpHexCvt(t, p, plen);
- return prbuf;
-}
+char * pgpHexStr(const uint8_t *p, size_t plen);
/** \ingroup rpmpgp
* Return hex formatted representation of a multiprecision integer.