src/rrd_daemon.c: Remove a goto.
authorFlorian Forster <octo@leeloo.home.verplant.org>
Sun, 14 Sep 2008 07:52:16 +0000 (09:52 +0200)
committerFlorian Forster <octo@leeloo.home.verplant.org>
Sun, 14 Sep 2008 07:52:16 +0000 (09:52 +0200)
It takes two more lines, both of which are parenthesis. It's worth it ;)

src/rrd_daemon.c

index a5e8e55..abb2ace 100644 (file)
@@ -1156,7 +1156,10 @@ static int handle_request_wrote (int fd __attribute__((unused)), /* {{{ */
 
   ci = g_tree_lookup(cache_tree, file);
   if (ci == NULL)
-    goto out;
+  {
+    pthread_mutex_unlock(&cache_lock);
+    return (0);
+  }
 
   if (ci->values)
   {
@@ -1168,9 +1171,8 @@ static int handle_request_wrote (int fd __attribute__((unused)), /* {{{ */
 
   _wipe_ci_values(ci, time(NULL));
 
-out:
   pthread_mutex_unlock(&cache_lock);
-  return 0;
+  return (0);
 }
 
 /* if fd < 0, we are in journal replay mode */