X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_cgi.c;h=0bb326f3c12a5587146ead6cc13192a92498a835;hb=f33dd0fcc721e4efb1ce3be0d672e00e587d7491;hp=75dabf4a7eecf5000518282d7e54a4c2b05b5dec;hpb=58a8f90229ee1625e0270256683b048da1b1df24;p=rrdtool.git diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 75dabf4..0bb326f 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -221,7 +221,7 @@ static size_t varheap_size = 0; /* allocate and initialize variable heap */ static int initvar( - ) + void) { varheap = (vardata *) malloc(sizeof(vardata) * INIT_VARSTORE_SIZE); if (varheap == NULL) { @@ -235,7 +235,7 @@ static int initvar( /* cleanup: free allocated memory */ static void donevar( - ) + void) { int i; @@ -288,13 +288,13 @@ static const char *putvar( if (0 == strcmp(name, varheap[i].name)) { /* overwrite existing entry */ if (varheap[i].is_const) { -#ifdef DEBUG_VARS +#ifdef DEBUG_VARS printf("\n", name, value); -# endif +#endif return varheap[i].value; } -#ifdef DEBUG_VARS +#ifdef DEBUG_VARS printf("\n", name, value, varheap[i].value); #endif @@ -398,6 +398,10 @@ int main( char *server_url = NULL; long i; long filter = 0; + struct option long_options[] = { + {"filter", no_argument, 0, 'f'}, + {0, 0, 0, 0} + }; #ifdef MUST_DISABLE_SIGFPE signal(SIGFPE, SIG_IGN); @@ -412,10 +416,6 @@ int main( for (i=0;i