From 34b3f0f225a6f51a548576c37a30671052ef5dd2 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 20 Jun 2004 06:26:20 +0000 Subject: [PATCH] Cambio estetico :) --- src/vfile/vfile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vfile/vfile.c b/src/vfile/vfile.c index 05ef241..444deb2 100644 --- a/src/vfile/vfile.c +++ b/src/vfile/vfile.c @@ -22,7 +22,7 @@ * Autores: Leandro Lucarella *---------------------------------------------------------------------------- * - * $Id: bufford.c 624 2004-05-30 20:18:04Z llucare $ + * $Id$ * */ @@ -127,19 +127,19 @@ int vfputc(int c, VFILE* vfp) size_t vfread(void* ptr, size_t size, size_t nmemb, VFILE* vfp) { - int i; + int i = 0; size_t total = size * nmemb; /* leo uno a uno y si hay error salgo. */ - for (i = 0; i < total && (((char*)ptr)[i] = vfgetc(vfp)) != EOF; ++i); + while (i < total && (((char*)ptr)[i++] = vfgetc(vfp)) != EOF); return i % size; } size_t vfwrite(const void *ptr, size_t size, size_t nmemb, VFILE* vfp) { - int i; + int i = 0; size_t total = size * nmemb; /* escribo uno a uno y si hay error salgo. */ - for (i = 0; i < total && (vfputc(((char*)ptr)[i], vfp)) != EOF; ++i); + while (i < total && (vfputc(((char*)ptr)[i++], vfp)) != EOF); return i % size; } -- 2.43.0