gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/lib/src


From: gsasl-commit
Subject: CVS gsasl/lib/src
Date: Fri, 17 Sep 2004 22:57:56 +0200

Update of /home/cvs/gsasl/lib/src
In directory dopio:/tmp/cvs-serv25541

Modified Files:
        init.c 
Log Message:
Cleanup.


--- /home/cvs/gsasl/lib/src/init.c      2004/09/17 20:44:27     1.4
+++ /home/cvs/gsasl/lib/src/init.c      2004/09/17 20:57:56     1.5
@@ -45,14 +45,11 @@
   if (gc_init () != GC_OK)
     return GSASL_CRYPTO_ERROR;
 
-  *ctx = (Gsasl *) malloc (sizeof (**ctx));
+  *ctx = (Gsasl *) calloc (1, sizeof (**ctx));
   if (*ctx == NULL)
     return GSASL_MALLOC_ERROR;
 
-  memset (*ctx, 0, sizeof (**ctx));
-
-  i = 0;
-  while (_gsasl_all_mechanisms[i].name)
+  for (i = 0; _gsasl_all_mechanisms[i].name; i++)
     {
 #ifdef USE_CLIENT
       if (_gsasl_all_mechanisms[i].client.init == NULL ||
@@ -103,8 +100,6 @@
          (*ctx)->n_server_mechs++;
        }
 #endif
-
-      i++;
     }
 
   return GSASL_OK;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]