Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 4c7057729c0f6fcd6e2c3edc69eb8305 > files > 4

itcl-3.4-4.mga5.src.rpm

diff -Naur incrtcl-20071231cvs.orig/generic/itcl_methods.c incrtcl-20071231cvs.new/generic/itcl_methods.c
--- incrtcl-20071231cvs.orig/generic/itcl_methods.c	2007-10-23 00:58:29.000000000 +0200
+++ incrtcl-20071231cvs.new/generic/itcl_methods.c	2009-11-21 01:18:43.000000000 +0100
@@ -622,12 +622,7 @@
      *  Allocate some space to hold the implementation.
      */
     mcode = (ItclMemberCode*)ckalloc(sizeof(ItclMemberCode));
-    mcode->flags        = 0;
-    mcode->argcount     = 0;
-    mcode->arglist      = NULL;
-    mcode->procPtr      = NULL;
-    mcode->cfunc.objCmd = NULL;
-    mcode->clientData   = NULL;
+    memset(mcode, 0, sizeof(ItclMemberCode));
 
     if (arglist) {
         if (Itcl_CreateArgList(interp, arglist, &argc, &args)
@@ -656,6 +651,7 @@
     procPtr->iPtr = (Interp*)interp;
     procPtr->refCount = 1;
     procPtr->cmdPtr = (Command*)ckalloc(sizeof(Command));
+    memset(procPtr->cmdPtr, 0, sizeof(Command));
     procPtr->cmdPtr->nsPtr = (Namespace*)cdefn->namesp;
 
     if (body) {