]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - logging.c
I _think_ this should fix the problem reported by `Stacey': failure
[PuTTY.git] / logging.c
index 499747c743dbd9765b8a7bf927a3bdd9fe8ab653..f32e9cae4c993c90bbad9edad4618e1928fbc73d 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -43,7 +43,7 @@ void logtraffic(void *handle, unsigned char c, int logmode)
  * platforms. Platforms which don't have a meaningful stderr can
  * just avoid defining FLAG_STDERR.
  */
-void log_eventlog(void *handle, char *event)
+void log_eventlog(void *handle, const char *event)
 {
     struct LogContext *ctx = (struct LogContext *)handle;
     if ((flags & FLAG_STDERR) && (flags & FLAG_VERBOSE)) {
@@ -163,7 +163,7 @@ void logfclose(void *handle)
 
 void *log_init(void *frontend, Config *cfg)
 {
-    struct LogContext *ctx = smalloc(sizeof(struct LogContext));
+    struct LogContext *ctx = snew(struct LogContext);
     ctx->lgfp = NULL;
     ctx->frontend = frontend;
     ctx->cfg = *cfg;                  /* STRUCTURE COPY */