src/rrd_daemon.c: Remove the declaration of strdup.
[rrdtool.git] / src / rrd_daemon.c
index a5d95bf..d446756 100644 (file)
 # define __attribute__(x) /**/
 #endif
 
-#if 0
-/* FIXME: I don't want to declare strdup myself! */
-extern char *strdup (const char *s);
-#endif
-
 /*
  * Types
  */
@@ -167,7 +162,7 @@ static void sig_term_handler (int s __attribute__((unused))) /* {{{ */
  */
 static int enqueue_cache_item (cache_item_t *ci) /* {{{ */
 {
-  RRDD_LOG (LOG_DEBUG, "handle_request_update: Adding %s to the update queue.",
+  RRDD_LOG (LOG_DEBUG, "enqueue_cache_item: Adding %s to the update queue.",
       ci->file);
 
   if (ci == NULL)
@@ -178,6 +173,9 @@ static int enqueue_cache_item (cache_item_t *ci) /* {{{ */
 
   assert (ci->next == NULL);
 
+  if (ci->values_num == 0)
+    return (0);
+
   if (cache_queue_tail == NULL)
     cache_queue_head = ci;
   else
@@ -316,7 +314,7 @@ static void *queue_thread_main (void *args __attribute__((unused))) /* {{{ */
 } /* }}} void *queue_thread_main */
 
 static int handle_request_update (int fd, /* {{{ */
-    char *buffer, int buffer_size)
+    char *buffer, int buffer_size __attribute__((unused)))
 {
   char *file;
   char *value;