[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r3703 - in trunk/OpenDNSSEC/signer/src: daemon parser signer util

Matthijs Mekking matthijs at nlnetlabs.nl
Tue Aug 10 13:55:26 CEST 2010


Author: matthijs
Date: 2010-08-10 13:55:26 +0200 (Tue, 10 Aug 2010)
New Revision: 3703

Modified:
   trunk/OpenDNSSEC/signer/src/daemon/cmdhandler.c
   trunk/OpenDNSSEC/signer/src/parser/zonelistparser.c
   trunk/OpenDNSSEC/signer/src/signer/stats.c
   trunk/OpenDNSSEC/signer/src/signer/stats.h
   trunk/OpenDNSSEC/signer/src/signer/tools.c
   trunk/OpenDNSSEC/signer/src/util/file.c
   trunk/OpenDNSSEC/signer/src/util/log.c
Log:
fix build warnings

Modified: trunk/OpenDNSSEC/signer/src/daemon/cmdhandler.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/daemon/cmdhandler.c	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/daemon/cmdhandler.c	2010-08-10 11:55:26 UTC (rev 3703)
@@ -523,7 +523,7 @@
         if (n <= 0) {
             return;
         }
-        se_log_verbose("received command %s[%i]", buf?buf:"(null)", n);
+        se_log_verbose("received command %s[%i]", buf, n);
 
         if (n == 4 && strncmp(buf, "help", n) == 0) {
             se_log_debug("help command");
@@ -592,7 +592,7 @@
             cmdhandler_handle_cmd_unknown(sockfd, buf);
         }
 
-        se_log_debug("done handling command %s[%i]", buf?buf:"(null)", n);
+        se_log_debug("done handling command %s[%i]", buf, n);
         (void)snprintf(buf, SE_CMDH_CMDLEN, "\ncmd> ");
         se_writen(sockfd, buf, strlen(buf));
     }

Modified: trunk/OpenDNSSEC/signer/src/parser/zonelistparser.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/parser/zonelistparser.c	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/parser/zonelistparser.c	2010-08-10 11:55:26 UTC (rev 3703)
@@ -60,8 +60,7 @@
 
     xpathObj = xmlXPathEvalExpression(expr, xpathCtx);
     if (xpathObj == NULL) {
-        se_log_error("unable to evaluate xpath expression %s",
-            expr?expr:"(null)");
+        se_log_error("unable to evaluate xpath expression %s", expr);
         return NULL;
     }
     str = (const char*) xmlXPathCastToString(xpathObj);
@@ -89,8 +88,7 @@
 
     xpathObj = xmlXPathEvalExpression(expr, xpathCtx);
     if (xpathObj == NULL) {
-        se_log_error("unable to evaluate xpath expression %s",
-            expr?expr:"(null)");
+        se_log_error("unable to evaluate xpath expression %s", expr);
         return NULL;
     }
 

Modified: trunk/OpenDNSSEC/signer/src/signer/stats.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/stats.c	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/signer/stats.c	2010-08-10 11:55:26 UTC (rev 3703)
@@ -71,7 +71,7 @@
  *
  */
 void
-stats_log(stats_type* stats, char* name, ldns_rr_type nsec_type)
+stats_log(stats_type* stats, const char* name, ldns_rr_type nsec_type)
 {
     uint32_t avsign = 0;
 

Modified: trunk/OpenDNSSEC/signer/src/signer/stats.h
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/stats.h	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/signer/stats.h	2010-08-10 11:55:26 UTC (rev 3703)
@@ -75,7 +75,7 @@
  * \param[in] nsec_type NSEC or NSEC3
  *
  */
-void stats_log(stats_type* stats, char* name, ldns_rr_type nsec_type);
+void stats_log(stats_type* stats, const char* name, ldns_rr_type nsec_type);
 
 /**
  * Clear statistics.

Modified: trunk/OpenDNSSEC/signer/src/signer/tools.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/tools.c	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/signer/tools.c	2010-08-10 11:55:26 UTC (rev 3703)
@@ -250,7 +250,7 @@
 
     /* log stats */
     se_log_debug("log stats for zone %s", zone->name?zone->name:"(null)");
-    stats_log(zone->stats, (const char*) zone->name, zone->signconf->nsec_type);
+    stats_log(zone->stats, zone->name, zone->signconf->nsec_type);
     stats_clear(zone->stats);
 
     return error;

Modified: trunk/OpenDNSSEC/signer/src/util/file.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/util/file.c	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/util/file.c	2010-08-10 11:55:26 UTC (rev 3703)
@@ -293,7 +293,7 @@
     se_log_assert(file2);
 
     snprintf(str, SYSTEM_MAXLEN, "cp %s %s", file1, file2);
-    se_log_debug("system call: %s", str?str:"(null)");
+    se_log_debug("system call: %s", str);
     return system(str);
 }
 

Modified: trunk/OpenDNSSEC/signer/src/util/log.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/util/log.c	2010-08-10 11:05:04 UTC (rev 3702)
+++ trunk/OpenDNSSEC/signer/src/util/log.c	2010-08-10 11:55:26 UTC (rev 3703)
@@ -202,7 +202,7 @@
 
 #ifdef HAVE_SYSLOG_H
     if (logging_to_syslog) {
-        syslog(priority, "%s", message?message:"(null)");
+        syslog(priority, "%s", message);
         return;
     }
 #endif /* HAVE_SYSLOG_H */




More information about the Opendnssec-commits mailing list