projects
/
rrdtool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c5f2427
)
src/rrd_dump.c: Rename the `rrdcached' variable to `opt_daemon'.
author
Florian Forster
<octo@leeloo.home.verplant.org>
Sun, 13 Jul 2008 14:08:50 +0000
(16:08 +0200)
committer
Florian Forster
<octo@leeloo.home.verplant.org>
Sun, 13 Jul 2008 14:08:50 +0000
(16:08 +0200)
src/rrd_dump.c
patch
|
blob
|
history
diff --git
a/src/rrd_dump.c
b/src/rrd_dump.c
index
093e7d2
..
12ab204
100644
(file)
--- a/
src/rrd_dump.c
+++ b/
src/rrd_dump.c
@@
-442,7
+442,7
@@
int rrd_dump(
{
int rc;
int opt_noheader = 0;
{
int rc;
int opt_noheader = 0;
- char *
rrdcached
= NULL;
+ char *
opt_daemon
= NULL;
/* init rrd clean */
/* init rrd clean */
@@
-465,10
+465,10
@@
int rrd_dump(
switch (opt) {
case 'd':
switch (opt) {
case 'd':
- if (
rrdcached
!= NULL)
- free (
rrdcached
);
-
rrdcached
= strdup (optarg);
- if (
rrdcached
== NULL)
+ if (
opt_daemon
!= NULL)
+ free (
opt_daemon
);
+
opt_daemon
= strdup (optarg);
+ if (
opt_daemon
== NULL)
{
rrd_set_error ("strdup failed.");
return (-1);
{
rrd_set_error ("strdup failed.");
return (-1);
@@
-493,15
+493,15
@@
int rrd_dump(
return (-1);
}
return (-1);
}
- if (
rrdcached
== NULL)
+ if (
opt_daemon
== NULL)
{
char *temp;
temp = getenv (ENV_RRDCACHED_ADDRESS);
if (temp != NULL)
{
{
char *temp;
temp = getenv (ENV_RRDCACHED_ADDRESS);
if (temp != NULL)
{
-
rrdcached
= strdup (temp);
- if (
rrdcached
== NULL)
+
opt_daemon
= strdup (temp);
+ if (
opt_daemon
== NULL)
{
rrd_set_error("strdup failed.");
return (-1);
{
rrd_set_error("strdup failed.");
return (-1);
@@
-509,11
+509,11
@@
int rrd_dump(
}
}
}
}
- if (
rrdcached
!= NULL)
+ if (
opt_daemon
!= NULL)
{
int status;
{
int status;
- status = rrdc_connect (
rrdcached
);
+ status = rrdc_connect (
opt_daemon
);
if (status != 0)
{
rrd_set_error ("rrdc_connect failed with status %i.", status);
if (status != 0)
{
rrd_set_error ("rrdc_connect failed with status %i.", status);
@@
-529,7
+529,7
@@
int rrd_dump(
}
rrdc_disconnect ();
}
rrdc_disconnect ();
- } /* if (
rrdcached
) */
+ } /* if (
opt_daemon
) */
if ((argc - optind) == 2) {
rc = rrd_dump_opt_r(argv[optind], argv[optind + 1], opt_noheader);
if ((argc - optind) == 2) {
rc = rrd_dump_opt_r(argv[optind], argv[optind + 1], opt_noheader);