Parameters scParams;
static int put_fd;
-static char *put_file = NULL;
+static char *put_file = nullptr;
static struct stat sb;
int total_bytes = 0;
time_t ims = 0;
int max_forwards = -1;
- const char *host = NULL;
+ const char *host = nullptr;
const char *version = "1.0";
- const char *useragent = NULL;
+ const char *useragent = nullptr;
/* set the defaults */
to_stdout = true;
// options for controlling squidclient
static struct option basicOptions[] = {
/* These are the generic options for squidclient itself */
- {"help", no_argument, 0, '?'},
- {"verbose", no_argument, 0, 'v'},
- {"quiet", no_argument, 0, 's'},
- {"host", required_argument, 0, 'h'},
- {"local", required_argument, 0, 'l'},
- {"port", required_argument, 0, 'p'},
- {"ping", no_argument, 0, '\1'},
- {"https", no_argument, 0, '\3'},
- {0, 0, 0, 0}
+ {"help", no_argument, nullptr, '?'},
+ {"verbose", no_argument, nullptr, 'v'},
+ {"quiet", no_argument, nullptr, 's'},
+ {"host", required_argument, nullptr, 'h'},
+ {"local", required_argument, nullptr, 'l'},
+ {"port", required_argument, nullptr, 'p'},
+ {"ping", no_argument, nullptr, '\1'},
+ {"https", no_argument, nullptr, '\3'},
+ {nullptr, 0, nullptr, 0}
};
int c;
/* Build the HTTP request */
if (strncmp(url, "mgr:", 4) == 0) {
char *t = xstrdup(url + 4);
- const char *at = NULL;
+ const char *at = nullptr;
if (!strrchr(t, '@')) { // ignore any -w password if @ is explicit already.
at = ProxyAuthorization.password;
}
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
- if (sigaction(SIGPIPE, &sa, NULL) < 0) {
+ if (sigaction(SIGPIPE, &sa, nullptr) < 0) {
std::cerr << "ERROR: Cannot set PIPE signal." << std::endl;
exit(EXIT_FAILURE);
}