From c93e7a95b17d143a9e0ef2f8cd55d577cd9bf80f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 20 Jan 2013 21:07:43 +0000 Subject: add comments --- URPM.xs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/URPM.xs b/URPM.xs index c3f6900..8f19511 100644 --- a/URPM.xs +++ b/URPM.xs @@ -1035,6 +1035,7 @@ parse_line(AV *depslist, HV *provides, HV *obsoletes, URPM__Package pkg, char *b if (obsoletes) update_obsoletes(_pkg, obsoletes); av_push(depslist, sv_pkg); } + // reset package, next line will be for another one memset(pkg, 0, sizeof(struct s_Package)); } else if (!strcmp(tag, "filesize")) pkg->filesize = atoi(data); @@ -2829,6 +2830,7 @@ Urpm_parse_synthesis__XS(urpm, filename, ...) f = Fopen(filename, "r.fdio"); if (!rc && (f = Fdopen(f, t)) != NULL && !Ferror(f)) { + // initialize first package memset(&pkg, 0, sizeof(struct s_Package)); buff[sizeof(buff)-1] = 0; p = buff; -- cgit v1.2.1