projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small rewrite.
[apps/madmutt.git]
/
lib-crypt
/
pgppacket.c
diff --git
a/lib-crypt/pgppacket.c
b/lib-crypt/pgppacket.c
index
518c11e
..
0956076
100644
(file)
--- a/
lib-crypt/pgppacket.c
+++ b/
lib-crypt/pgppacket.c
@@
-7,16
+7,6
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
#include <lib-lib/lib-lib.h>
#include <lib-hash/hash.h>
#include <lib-lib/lib-lib.h>
#include <lib-hash/hash.h>
@@
-32,17
+22,7
@@
static size_t plen = 0;
static int read_material (size_t material, size_t * used, FILE * fp)
{
if (*used + material >= plen) {
static int read_material (size_t material, size_t * used, FILE * fp)
{
if (*used + material >= plen) {
- unsigned char *p;
- size_t nplen;
-
- nplen = *used + material + CHUNKSIZE;
-
- if (!(p = realloc (pbuf, nplen))) { /* __MEM_CHECKED__ */
- perror ("realloc");
- return -1;
- }
- plen = nplen;
- pbuf = p;
+ p_realloc(&pbuf, plen = *used + material + CHUNKSIZE);
}
if (fread (pbuf + *used, 1, material, fp) < material) {
}
if (fread (pbuf + *used, 1, material, fp) < material) {