[pisa-src] r1327 - trunk/libpisa/log.c

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 15:34:49 +0100

Author: biurrun
Date: Tue Oct 27 15:34:49 2009
New Revision: 1327

Log:
Initialize variables to get rid of the following compiler warnings:
log.c:128: warning: `old_connection_length' may be used uninitialized in this 
function
log.c:127: warning: `old_number_of_bytes' may be used uninitialized in this 
function

Modified:
   trunk/libpisa/log.c

Modified: trunk/libpisa/log.c
==============================================================================
--- trunk/libpisa/log.c Tue Oct 27 15:26:53 2009        (r1326)
+++ trunk/libpisa/log.c Tue Oct 27 15:34:49 2009        (r1327)
@@ -124,8 +124,8 @@
 void log_month_connection(const char *hit,int number_of_bytes,time_t length)
 {
     char path[MAX_PATH];
-    int old_number_of_bytes;
-    time_t old_connection_length;
+    int old_number_of_bytes = 0;
+    time_t old_connection_length = 0;
     int old_values_available = 0;
 
     get_month_log_file_for_hit(path,hit);

Other related posts:

  • » [pisa-src] r1327 - trunk/libpisa/log.c - Diego Biurrun