diff src/syslog2iptables.cpp @ 48:ba0259c9e411 stable-1-0-11

Fixes to compile on Fedora 9 and for const correctness
author Carl Byington <carl@five-ten-sg.com>
date Thu, 29 May 2008 11:38:42 -0700
parents 9e9f09cf411c
children f133196b8591
line wrap: on
line diff
--- a/src/syslog2iptables.cpp	Sat Mar 22 11:34:56 2008 -0700
+++ b/src/syslog2iptables.cpp	Thu May 29 11:38:42 2008 -0700
@@ -47,7 +47,7 @@
 ////////////////////////////////////////////////
 // syslog a message
 //
-void my_syslog(char *text) {
+void my_syslog(const char *text) {
     if (use_syslog) {
         pthread_mutex_lock(&syslog_mutex);
             if (!syslog_opened) {
@@ -99,8 +99,8 @@
         time_t then = dc.load_time;
         struct stat st;
         bool reload = false;
-        for (string_set::iterator i=dc.config_files.begin(); i!=dc.config_files.end(); i++) {
-            char *fn = *i;
+        for (string_set::const_iterator i=dc.config_files.begin(); i!=dc.config_files.end(); i++) {
+            const char *fn = *i;
             if (stat(fn, &st))           reload = true; // file disappeared
             else if (st.st_mtime > then) reload = true; // file modified
             if (reload) break;