X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincctl.c;h=dccd49d88fd08a29449d03d579217f38190f44fa;hp=93c5b320b6e963b2719c102a4f921e6c3fb00b1d;hb=b0ffeb7eeb21920842382c302ca15ec0d758e9b6;hpb=1c475ecb575367a6b3f9328b0f643ad636155341 diff --git a/src/tincctl.c b/src/tincctl.c index 93c5b320..dccd49d8 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -2735,11 +2735,11 @@ static int cmd_fsck(int argc, char *argv[]) { static void *readfile(FILE *in, size_t *len) { size_t count = 0; - size_t alloced = 4096; - char *buf = xmalloc(alloced); + size_t bufsize = 4096; + char *buf = xmalloc(bufsize); while(!feof(in)) { - size_t read = fread(buf + count, 1, alloced - count, in); + size_t read = fread(buf + count, 1, bufsize - count, in); if(!read) { break; @@ -2747,9 +2747,9 @@ static void *readfile(FILE *in, size_t *len) { count += read; - if(count >= alloced) { - alloced *= 2; - buf = xrealloc(buf, alloced); + if(count >= bufsize) { + bufsize *= 2; + buf = xrealloc(buf, bufsize); } }