-improve UDP logging
[oweals/gnunet.git] / src / mysql / mysql.c
index e4f095396f430d6e8db1319e5debddae931c4851..6ee685b34ded16f9bb9ee1c4176e61b5164b7cc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -125,6 +125,7 @@ struct GNUNET_MYSQL_StatementHandle
  * Obtain the location of ".my.cnf".
  *
  * @param cfg our configuration
+ * @param section the section
  * @return NULL on error
  */
 static char *
@@ -291,7 +292,7 @@ GNUNET_MYSQL_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
 {
   struct GNUNET_MYSQL_Context *mc;
 
-  mc = GNUNET_malloc (sizeof (struct GNUNET_MYSQL_Context));
+  mc = GNUNET_new (struct GNUNET_MYSQL_Context);
   mc->cfg = cfg;
   mc->section = section;
   mc->cnffile = get_my_cnf_path (cfg, section);
@@ -364,7 +365,7 @@ GNUNET_MYSQL_statement_prepare (struct GNUNET_MYSQL_Context *mc,
 {
   struct GNUNET_MYSQL_StatementHandle *sh;
 
-  sh = GNUNET_malloc (sizeof (struct GNUNET_MYSQL_StatementHandle));
+  sh = GNUNET_new (struct GNUNET_MYSQL_StatementHandle);
   sh->query = GNUNET_strdup (query);
   GNUNET_CONTAINER_DLL_insert (mc->shead, mc->stail, sh);
   return sh;