* but it is not specified in the current command.
* Daemon is only implied in this case if set in ENV
*/
- if (addr != NULL && ! strcmp(addr,""))
+ if (addr != NULL && strcmp(addr,"") != 0)
return 1;
else
return 0;
{
int status = 0;
- if (addr == NULL)
+ if (addr == NULL) {
addr = getenv (ENV_RRDCACHED_ADDRESS);
+ }
- if (addr == NULL || ! strcmp(addr,""))
+ if (addr == NULL || strcmp(addr,"") == 0) {
addr = NULL;
return 0;
+ }
pthread_mutex_lock(&lock);
break;
case RD_I_STR:
chomp(s);
- info.u_str = (char*)malloc(sizeof(char) * (strlen(s) + 1));
- strcpy(info.u_str,s);
+ info.u_str = strdup(s);
break;
case RD_I_BLO:
rrd_set_error ("rrdc_info: BLOB objects are not supported");
response_free (res);
if (head == NULL)
+#ifdef EPROTO
return (EPROTO);
+#else
+ return (EINVAL);
+#endif
*ret_stats = head;
return (0);