From: Florian Forster Date: Sun, 14 Sep 2008 07:52:16 +0000 (+0200) Subject: src/rrd_daemon.c: Remove a goto. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ed65aba55e2cdcd5ea2d8e83fd03a3cbc2fe1a2a;p=rrdtool.git src/rrd_daemon.c: Remove a goto. It takes two more lines, both of which are parenthesis. It's worth it ;) --- diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index a5e8e55..abb2ace 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -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 */