]> sjero.net Git - wget/blobdiff - src/log.c
[svn] Use new macros xnew, xnew0, xnew_array, and xnew0_array in various places.
[wget] / src / log.c
index 8ef12520e84304e2e700750f07ebe726dd81c87a..4befb998d85ba1c533a9daaac09cda02319d8ce1 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -62,6 +62,7 @@ so, delete this exception statement from your version.  */
 
 #include "wget.h"
 #include "utils.h"
+#include "log.h"
 
 #ifndef errno
 extern int errno;
@@ -232,7 +233,7 @@ saved_append_1 (const char *start, const char *end)
            {
              /* Allocate memory and concatenate the old and the new
                  contents. */
-             ln->malloced_line = xmalloc (old_len + len + 1);
+             ln->malloced_line = (char *)xmalloc (old_len + len + 1);
              memcpy (ln->malloced_line, ln->static_line,
                      old_len);
              memcpy (ln->malloced_line + old_len, start, len);
@@ -499,7 +500,7 @@ logprintf (enum log_options o, const char *fmt, ...)
     return;
   CHECK_VERBOSE (o);
 
-  memset (&lpstate, '\0', sizeof (lpstate));
+  xzero (lpstate);
   do
     {
       VA_START (args, fmt);
@@ -525,7 +526,7 @@ debug_logprintf (const char *fmt, ...)
       if (inhibit_logging)
        return;
 
-      memset (&lpstate, '\0', sizeof (lpstate));
+      xzero (lpstate);
       do
        {
          VA_START (args, fmt);