diff -urN ./plugins/check_by_ssh.c ../plugins/plugins/check_by_ssh.c --- ./plugins/check_by_ssh.c 2005-01-05 21:53:11.000000000 +0100 +++ ../plugins/plugins/check_by_ssh.c 2005-02-17 13:19:35.000000000 +0100 @@ -59,9 +59,9 @@ time_t local_time; FILE *fp = NULL; - remotecmd = strdup (""); - comm = strdup (SSH_COMMAND); - result_text = strdup (""); + remotecmd = ""; + comm = SSH_COMMAND; + result_text = ""; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); @@ -137,7 +137,7 @@ printf ("%s", result_text); return result; } - asprintf (&output, "%s", result_text); + output = result_text; result_text = strnl (status_text); eol = strpbrk (output, "\r\n"); if (eol != NULL) diff -urN ./plugins/check_dig.c ../plugins/plugins/check_dig.c --- ./plugins/check_dig.c 2005-01-28 15:00:58.000000000 +0100 +++ ../plugins/plugins/check_dig.c 2005-02-17 13:55:05.000000000 +0100 @@ -59,7 +59,7 @@ double elapsed_time; int result = STATE_UNKNOWN; - output = strdup (""); + output = ""; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); @@ -293,7 +293,7 @@ } } else { - dns_server = strdup ("127.0.0.1"); + dns_server = "127.0.0.1"; } } diff -urN ./plugins/check_disk.c ../plugins/plugins/check_disk.c --- ./plugins/check_disk.c 2005-01-05 21:53:12.000000000 +0100 +++ ../plugins/plugins/check_disk.c 2005-02-17 13:12:09.000000000 +0100 @@ -153,9 +153,9 @@ struct fs_usage fsp; struct name_list *temp_list; - output = strdup (" - free space:"); - details = strdup (""); - perf = strdup (""); + output = " - free space:"; + details = ""; + perf = ""; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); @@ -283,7 +283,7 @@ return ERROR; se = (struct name_list *) malloc (sizeof (struct name_list)); - se->name = strdup ("iso9660"); + se->name = "iso9660"; se->name_next = NULL; *fstail = se; fstail = &se->name_next; @@ -346,19 +346,19 @@ free(units); if (! strcmp (optarg, "bytes")) { mult = (uintmax_t)1; - units = strdup ("B"); + units = "B"; } else if (! strcmp (optarg, "kB")) { mult = (uintmax_t)1024; - units = strdup ("kB"); + units = "kB"; } else if (! strcmp (optarg, "MB")) { mult = (uintmax_t)1024 * 1024; - units = strdup ("MB"); + units = "MB"; } else if (! strcmp (optarg, "GB")) { mult = (uintmax_t)1024 * 1024 * 1024; - units = strdup ("GB"); + units = "GB"; } else if (! strcmp (optarg, "TB")) { mult = (uintmax_t)1024 * 1024 * 1024 * 1024; - units = strdup ("TB"); + units = "TB"; } else { die (STATE_UNKNOWN, _("unit type %s not known\n"), optarg); } @@ -369,13 +369,13 @@ mult = 1024; if (units) free(units); - units = strdup ("kB"); + units = "kB"; break; case 'm': /* display mountpoint */ mult = 1024 * 1024; if (units) free(units); - units = strdup ("MB"); + units = "MB"; break; case 'l': show_local_fs = 1; @@ -518,7 +518,7 @@ } if (units == NULL) { - units = strdup ("MB"); + units = "MB"; mult = (uintmax_t)1024 * 1024; } return OK; diff -urN ./plugins/check_game.c ../plugins/plugins/check_game.c --- ./plugins/check_game.c 2005-01-05 21:53:13.000000000 +0100 +++ ../plugins/plugins/check_game.c 2005-02-17 13:12:09.000000000 +0100 @@ -110,7 +110,7 @@ /* initialize the returned data buffer */ for (i = 0; i < QSTAT_MAX_RETURN_ARGS; i++) - ret[i] = strdup(""); + ret[i] = ""; i = 0; p = (char *) strtok (input_buffer, QSTAT_DATA_DELIMITER); diff -urN ./plugins/check_http.c ../plugins/plugins/check_http.c --- ./plugins/check_http.c 2005-01-24 08:29:53.000000000 +0100 +++ ../plugins/plugins/check_http.c 2005-02-17 15:34:59.000000000 +0100 @@ -60,7 +60,6 @@ #ifdef HAVE_SSL int check_cert = FALSE; int days_till_exp; -char *randbuff; SSL_CTX *ctx; SSL *ssl; X509 *server_cert; @@ -357,7 +356,7 @@ break; case 'P': /* HTTP POST data in URL encoded format */ if (http_method || http_post_data) break; - http_method = strdup("POST"); + http_method = "POST"; http_post_data = strdup (optarg); break; case 's': /* string or substring */ @@ -473,7 +472,7 @@ socket_timeout = (int)critical_time + 1; if (http_method == NULL) - http_method = strdup ("GET"); + http_method = "GET"; return TRUE; } @@ -869,7 +868,7 @@ #endif /* fetch the page */ - full_page = strdup(""); + full_page = ""; while ((i = my_recv ()) > 0) { buffer[i] = '\0'; asprintf (&full_page, "%s%s", full_page, buffer); @@ -1250,8 +1249,9 @@ int connect_SSL (void) { SSL_METHOD *meth; - - asprintf (&randbuff, "%s", "qwertyuiopasdfghjklqwertyuiopasdfghjkl"); + char *randbuff; + + randbuff = "qwertyuiopasdfghjklqwertyuiopasdfghjkl"; RAND_seed (randbuff, (int)strlen(randbuff)); if (verbose) printf(_("SSL seeding: %s\n"), (RAND_status()==1 ? _("OK") : _("Failed")) ); diff -urN ./plugins/check_mrtg.c ../plugins/plugins/check_mrtg.c --- ./plugins/check_mrtg.c 2005-01-05 21:53:15.000000000 +0100 +++ ../plugins/plugins/check_mrtg.c 2005-02-17 15:58:02.000000000 +0100 @@ -113,7 +113,7 @@ /* if we couldn't read enough data, return an unknown error */ if (line <= 2) { result = STATE_UNKNOWN; - asprintf (&message, _("Unable to process MRTG log file\n")); + message = _("Unable to process MRTG log file\n"); } /* make sure the MRTG data isn't too old */ @@ -122,8 +122,8 @@ if (expire_minutes > 0 && (current_time - timestamp) > (expire_minutes * 60)) { result = STATE_WARNING; - asprintf (&message, _("MRTG data has expired (%d minutes old)\n"), - (int) ((current_time - timestamp) / 60)); + message = _("MRTG data has expired (%d minutes old)\n"), + (int) ((current_time - timestamp) / 60)); } } @@ -294,10 +294,10 @@ usage4 (_("You must supply the variable number")); if (label == NULL) - label = strdup ("value"); + label = "value"; if (units == NULL) - units = strdup (""); + units = ""; return OK; } diff -urN ./plugins/check_nt.c ../plugins/plugins/check_nt.c --- ./plugins/check_nt.c 2005-02-17 13:01:02.000000000 +0100 +++ ../plugins/plugins/check_nt.c 2005-02-17 16:18:53.000000000 +0100 @@ -153,7 +153,7 @@ /* -l parameters is present with only integers */ return_code=STATE_OK; temp_string = strdup (_("CPU Load")); - temp_string_perf = strdup (" "); + temp_string_perf = " "; /* loop until one of the parameters is wrong or not present */ while (lvalue_list[0+offset]> (unsigned long)0 && @@ -327,7 +327,7 @@ asprintf (&output_message, "%.f", counter_value); else if (isPercent) { - counter_unit = strdup ("%"); + counter_unit = "%"; allRight = TRUE; } diff -urN ./plugins/check_nwstat.c ../plugins/plugins/check_nwstat.c --- ./plugins/check_nwstat.c 2005-01-05 21:53:17.000000000 +0100 +++ ../plugins/plugins/check_nwstat.c 2005-02-17 16:24:36.000000000 +0100 @@ -135,18 +135,18 @@ /* get OS version string */ if (check_netware_version==TRUE) { - send_buffer = strdup ("S19\r\n"); + send_buffer = "S19\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; if (!strcmp(recv_buffer,"-1\n")) - netware_version = strdup(""); + netware_version = ""; else { recv_buffer[strlen(recv_buffer)-1]=0; asprintf (&netware_version,_("NetWare %s: "),recv_buffer); } } else - netware_version = strdup(""); + netware_version = ""; /* check CPU load */ @@ -154,13 +154,13 @@ switch(vars_to_check) { case LOAD1: - temp_buffer = strdup ("1"); + temp_buffer = "1"; break; case LOAD5: - temp_buffer = strdup ("5"); + temp_buffer = "5"; break; default: - temp_buffer = strdup ("15"); + temp_buffer = "15"; break; } @@ -169,7 +169,7 @@ if (result!=STATE_OK) return result; utilization=strtoul(recv_buffer,NULL,10); - send_buffer = strdup ("UPTIME\r\n"); + send_buffer = "UPTIME\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -191,7 +191,7 @@ /* check number of user connections */ } else if (vars_to_check==CONNS) { - send_buffer = strdup ("CONNECT\r\n"); + send_buffer = "CONNECT\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -210,7 +210,7 @@ /* check % long term cache hits */ } else if (vars_to_check==LTCH) { - send_buffer = strdup ("S1\r\n"); + send_buffer = "S1\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -229,7 +229,7 @@ /* check cache buffers */ } else if (vars_to_check==CBUFF) { - send_buffer = strdup ("S2\r\n"); + send_buffer = "S2\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -248,7 +248,7 @@ /* check dirty cache buffers */ } else if (vars_to_check==CDBUFF) { - send_buffer = strdup ("S3\r\n"); + send_buffer = "S3\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -267,7 +267,7 @@ /* check LRU sitting time in minutes */ } else if (vars_to_check==LRUM) { - send_buffer = strdup ("S5\r\n"); + send_buffer = "S5\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -344,7 +344,7 @@ /* check to see if DS Database is open or closed */ } else if (vars_to_check==DSDB) { - send_buffer = strdup ("S11\r\n"); + send_buffer = "S11\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -353,7 +353,7 @@ else result=STATE_WARNING; - send_buffer = strdup ("S13\r\n"); + send_buffer = "S13\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); temp_buffer=strtok(recv_buffer,"\r\n"); @@ -362,7 +362,7 @@ /* check to see if logins are enabled */ } else if (vars_to_check==LOGINS) { - send_buffer = strdup ("S12\r\n"); + send_buffer = "S12\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -617,7 +617,7 @@ /* check LRU sitting time in secondss */ } else if (vars_to_check==LRUS) { - send_buffer = strdup ("S4\r\n"); + send_buffer = "S4\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -633,7 +633,7 @@ /* check % dirty cacheobuffers as a percentage of the total*/ } else if (vars_to_check==DCB) { - send_buffer = strdup ("S6\r\n"); + send_buffer = "S6\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -648,7 +648,7 @@ /* check % total cache buffers as a percentage of the original*/ } else if (vars_to_check==TCB) { - send_buffer = strdup ("S7\r\n"); + send_buffer = "S7\r\n"; result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); if (result!=STATE_OK) return result; @@ -695,7 +695,7 @@ } else { - output_message = strdup (_("Nothing to check!\n")); + output_message = _("Nothing to check!\n"); result=STATE_UNKNOWN; } @@ -806,15 +806,15 @@ vars_to_check=LRUS; else if (strncmp(optarg,"VPF",3)==0) { vars_to_check=VPF; - volume_name = strdup (optarg+3); + volume_name = optarg+3; if (!strcmp(volume_name,"")) - volume_name = strdup ("SYS"); + volume_name = "SYS"; } else if (strncmp(optarg,"VKF",3)==0) { vars_to_check=VKF; - volume_name = strdup (optarg+3); + volume_name = optarg+3; if (!strcmp(volume_name,"")) - volume_name = strdup ("SYS"); + volume_name = "SYS"; } else if (!strcmp(optarg,"DSDB")) vars_to_check=DSDB; @@ -835,27 +835,27 @@ vars_to_check=OFILES; else if (strncmp(optarg,"VKP",3)==0) { vars_to_check=VKP; - volume_name = strdup (optarg+3); + volume_name = optarg+3; if (!strcmp(volume_name,"")) - volume_name = strdup ("SYS"); + volume_name = "SYS"; } else if (strncmp(optarg,"VPP",3)==0) { vars_to_check=VPP; - volume_name = strdup (optarg+3); + volume_name = optarg+3; if (!strcmp(volume_name,"")) - volume_name = strdup ("SYS"); + volume_name = "SYS"; } else if (strncmp(optarg,"VKNP",4)==0) { vars_to_check=VKNP; - volume_name = strdup (optarg+4); + volume_name = optarg+4; if (!strcmp(volume_name,"")) - volume_name = strdup ("SYS"); + volume_name = "SYS"; } else if (strncmp(optarg,"VPNP",4)==0) { vars_to_check=VPNP; - volume_name = strdup (optarg+4); + volume_name = optarg+4; if (!strcmp(volume_name,"")) - volume_name = strdup("SYS"); + volume_name = "SYS"; } else if (!strcmp(optarg,"ABENDS")) vars_to_check=ABENDS; @@ -869,7 +869,7 @@ vars_to_check=UPTIME; else if (strncmp(optarg,"NLM:",4)==0) { vars_to_check=NLM; - nlm_name=strdup (optarg+4); + nlm_name = optarg+4; } else return ERROR; diff -urN ./plugins/check_ping.c ../plugins/plugins/check_ping.c --- ./plugins/check_ping.c 2005-01-05 21:53:17.000000000 +0100 +++ ../plugins/plugins/check_ping.c 2005-02-17 16:29:41.000000000 +0100 @@ -93,11 +93,11 @@ #ifdef PING6_COMMAND if (is_inet6_addr(addresses[i]) && address_family != AF_INET) - rawcmd = strdup(PING6_COMMAND); + rawcmd = PING6_COMMAND; else - rawcmd = strdup(PING_COMMAND); + rawcmd = PING_COMMAND; #else - rawcmd = strdup(PING_COMMAND); + rawcmd = PING_COMMAND; #endif /* does the host address of number of packets argument come first? */ @@ -452,7 +452,7 @@ result = max_state (result, STATE_WARNING); if (warn_text == NULL) - warn_text = strdup(""); + warn_text = ""; return result; } @@ -473,7 +473,7 @@ if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) { if (warn_text == NULL) - warn_text = strdup (_(WARN_DUPLICATES)); + warn_text = _(WARN_DUPLICATES); else if (! strstr (warn_text, _(WARN_DUPLICATES)) && asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1) die (STATE_UNKNOWN, _("Unable to realloc warn_text")); diff -urN ./plugins/check_procs.c ../plugins/plugins/check_procs.c --- ./plugins/check_procs.c 2005-01-05 21:53:18.000000000 +0100 +++ ../plugins/plugins/check_procs.c 2005-02-17 16:35:49.000000000 +0100 @@ -117,7 +117,7 @@ input_buffer = malloc (MAX_INPUT_BUFFER); procprog = malloc (MAX_INPUT_BUFFER); - asprintf (&metric_name, "PROCS"); + metric_name = "PROCS"; metric = METRIC_PROCS; if (process_arguments (argc, argv) == ERROR) @@ -147,8 +147,8 @@ while ( input_buffer[strlen(input_buffer)-1] != '\n' ) fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process); + input_line = ""; while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) { - asprintf (&input_line, "%s", input_buffer); while ( input_buffer[strlen(input_buffer)-1] != '\n' ) { fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process); asprintf (&input_line, "%s%s", input_line, input_buffer); @@ -157,8 +157,8 @@ if (verbose >= 3) printf ("%s", input_line); - strcpy (procprog, ""); - asprintf (&procargs, "%s", ""); + *procprog = '\x0'; + procargs = ""; cols = sscanf (input_line, PS_FORMAT, PS_VARLIST); @@ -493,7 +493,7 @@ if (cmax == -1 && argv[c]) cmax = atoi (argv[c++]); if (statopts == NULL && argv[c]) { - asprintf (&statopts, "%s", argv[c++]); + statopts = argv[c++]; asprintf (&fmt, _("%s%sSTATE = %s"), (fmt ? fmt : ""), (options ? ", " : ""), statopts); options |= STAT; } @@ -531,19 +531,19 @@ options = ALL; if (statopts==NULL) - statopts = strdup(""); + statopts = ""; if (prog==NULL) - prog = strdup(""); + prog = ""; if (args==NULL) - args = strdup(""); + args = ""; if (fmt==NULL) - fmt = strdup(""); + fmt = ""; if (fails==NULL) - fails = strdup(""); + fails = ""; return options; } diff -urN ./plugins/check_radius.c ../plugins/plugins/check_radius.c --- ./plugins/check_radius.c 2005-01-05 21:53:18.000000000 +0100 +++ ../plugins/plugins/check_radius.c 2005-02-17 13:12:10.000000000 +0100 @@ -116,7 +116,7 @@ if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); - str = strdup ("dictionary"); + str = "dictionary"; if ((config_file && rc_read_config (config_file)) || rc_read_dictionary (rc_conf_str (str))) die (STATE_UNKNOWN, _("Config file error")); diff -urN ./plugins/check_real.c ../plugins/plugins/check_real.c --- ./plugins/check_real.c 2005-01-05 21:53:18.000000000 +0100 +++ ../plugins/plugins/check_real.c 2005-02-17 16:36:39.000000000 +0100 @@ -369,7 +369,7 @@ usage4 (_("You must provide a server to check")); if (host_name==NULL) - host_name = strdup (server_address); + host_name = server_address; if (server_expect == NULL) server_expect = strdup(EXPECT); diff -urN ./plugins/check_smtp.c ../plugins/plugins/check_smtp.c --- ./plugins/check_smtp.c 2005-01-05 21:53:18.000000000 +0100 +++ ../plugins/plugins/check_smtp.c 2005-02-17 16:38:24.000000000 +0100 @@ -486,18 +486,18 @@ usage2 (_("Invalid hostname/address"), argv[c]); } else { - asprintf (&server_address, "127.0.0.1"); + server_address = "127.0.0.1"; } } if (server_expect == NULL) - server_expect = strdup (SMTP_EXPECT); + server_expect = SMTP_EXPECT; if (mail_command == NULL) - mail_command = strdup("MAIL "); + mail_command = "MAIL "; if (from_arg==NULL) - from_arg = strdup(" "); + from_arg = " "; return validate_arguments (); } diff -urN ./plugins/check_swap.c ../plugins/plugins/check_swap.c --- ./plugins/check_swap.c 2005-01-24 08:29:54.000000000 +0100 +++ ../plugins/plugins/check_swap.c 2005-02-17 16:56:09.000000000 +0100 @@ -85,9 +85,9 @@ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - status = strdup (""); - tmp_status = strdup (""); - perf = strdup (""); + status = ""; + tmp_status = ""; + perf = ""; if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); @@ -128,15 +128,15 @@ free_swap = dskfree; #else # ifdef HAVE_SWAP - asprintf(&swap_command, "%s", SWAP_COMMAND); - asprintf(&swap_format, "%s", SWAP_FORMAT); + swap_command = SWAP_COMMAND; + swap_format = SWAP_FORMAT; /* These override the command used if a summary (and thus ! allswaps) is required */ /* The summary flag returns more accurate information about swap usage on these OSes */ # ifdef _AIX if (!allswaps) { - asprintf(&swap_command, "%s", "/usr/sbin/lsps -s"); - asprintf(&swap_format, "%s", "%f%*s %f"); + swap_command = "/usr/sbin/lsps -s"; + swap_format = "%f%*s %f"; conv_factor = 1; } # endif diff -urN ./plugins/check_udp.c ../plugins/plugins/check_udp.c --- ./plugins/check_udp.c 2005-01-05 21:53:21.000000000 +0100 +++ ../plugins/plugins/check_udp.c 2005-02-17 13:12:10.000000000 +0100 @@ -207,7 +207,7 @@ usage4 (_("Hostname was not supplied")); if (server_send == NULL) - server_send = strdup(""); + server_send = ""; return c; } diff -urN ./plugins/check_ups.c ../plugins/plugins/check_ups.c --- ./plugins/check_ups.c 2005-01-05 21:53:22.000000000 +0100 +++ ../plugins/plugins/check_ups.c 2005-02-17 18:21:59.000000000 +0100 @@ -106,9 +106,9 @@ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - ups_status = strdup ("N/A"); - data = strdup (""); - message = strdup (""); + ups_status = "N/A"; + data = ""; + message = ""; if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); @@ -124,16 +124,16 @@ return STATE_CRITICAL; if (supported_options & UPS_STATUS) { - ups_status = strdup (""); + ups_status = ""; result = STATE_OK; if (status & UPSSTATUS_OFF) { - asprintf (&ups_status, "Off"); + ups_status = "Off"; result = STATE_CRITICAL; } else if ((status & (UPSSTATUS_OB | UPSSTATUS_LB)) == (UPSSTATUS_OB | UPSSTATUS_LB)) { - asprintf (&ups_status, _("On Battery, Low Battery")); + ups_status = _("On Battery, Low Battery"); result = STATE_CRITICAL; } else { @@ -203,15 +203,13 @@ else if (check_warn==TRUE && ups_utility_deviation>=warning_value) { result = max_state (result, STATE_WARNING); } - asprintf (&data, "%s", - perfdata ("voltage", (long)(1000*ups_utility_voltage), "mV", - check_warn, (long)(1000*warning_value), - check_crit, (long)(1000*critical_value), - TRUE, 0, FALSE, 0)); + data = perfdata ("voltage", (long)(1000*ups_utility_voltage), "mV", + check_warn, (long)(1000*warning_value), + check_crit, (long)(1000*critical_value), + TRUE, 0, FALSE, 0)); } else { - asprintf (&data, "%s", - perfdata ("voltage", (long)(1000*ups_utility_voltage), "mV", - FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); + data = perfdata ("voltage", (long)(1000*ups_utility_voltage), "mV", + FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); } } @@ -560,7 +558,7 @@ } if (server_address == NULL) - server_address = strdup("127.0.0.1"); + server_address = "127.0.0.1"; return validate_arguments(); } diff -urN ./plugins/check_users.c ../plugins/plugins/check_users.c --- ./plugins/check_users.c 2005-01-05 21:53:22.000000000 +0100 +++ ../plugins/plugins/check_users.c 2005-02-17 18:22:57.000000000 +0100 @@ -48,7 +48,7 @@ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - perf = strdup(""); + perf = ""; if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); @@ -100,11 +100,8 @@ if (result == STATE_UNKNOWN) printf (_("Unable to read output\n")); else { - asprintf(&perf, "%s", perfdata ("users", users, "", - TRUE, wusers, - TRUE, cusers, - TRUE, 0, - FALSE, 0)); + perf = perfdata ("users", users, "", TRUE, wusers, TRUE, cusers, + TRUE, 0, FALSE, 0)); printf (_("USERS %s - %d users currently logged in |%s\n"), state_text (result), users, perf); } diff -urN ./plugins/negate.c ../plugins/plugins/negate.c --- ./plugins/negate.c 2005-01-05 21:53:22.000000000 +0100 +++ ../plugins/plugins/negate.c 2005-02-17 18:24:35.000000000 +0100 @@ -192,7 +192,7 @@ } } - asprintf (&command_line, "%s", argv[optind]); + command_line = argv[optind]; for (c = optind+1; c < argc; c++) { asprintf (&command_line, "%s %s", command_line, argv[c]); } diff -urN ./plugins/popen.c ../plugins/plugins/popen.c --- ./plugins/popen.c 2005-01-05 21:53:22.000000000 +0100 +++ ../plugins/plugins/popen.c 2005-02-17 13:12:11.000000000 +0100 @@ -87,7 +87,7 @@ setrlimit (RLIMIT_CORE, &limit); #endif - env[0] = strdup("LC_ALL=C"); + env[0] = "LC_ALL=C"; env[1] = '\0'; /* if no command was passed, return with no error */ diff -urN ./plugins/urlize.c ../plugins/plugins/urlize.c --- ./plugins/urlize.c 2005-01-05 21:53:23.000000000 +0100 +++ ../plugins/plugins/urlize.c 2005-02-17 18:28:19.000000000 +0100 @@ -67,7 +67,7 @@ exit (EXIT_SUCCESS); break; case 'u': - url = strdup (argv[optind]); + url = argv[optind]; break; case '?': default: @@ -76,9 +76,9 @@ } if (url == NULL) - url = strdup (argv[optind++]); + url = argv[optind++]; - cmd = strdup (argv[optind++]); + cmd = argv[optind++]; for (c = optind; c < argc; c++) { asprintf (&cmd, "%s %s", cmd, argv[c]); }