#if 0 /* PSSCAN_CMD is not used */
if (flags & (PSSCAN_CMD|PSSCAN_ARGV0)) {
- if (sp->argv0) {
- free(sp->argv0);
- sp->argv0 = NULL;
- }
- if (sp->cmd) {
- free(sp->cmd);
- sp->cmd = NULL;
- }
+ free(sp->argv0);
+ sp->argv0 = NULL;
+ free(sp->cmd);
+ sp->cmd = NULL;
strcpy(filename_tail, "/cmdline");
/* TODO: to get rid of size limits, read into malloc buf,
* then realloc it down to real size. */
}
#else
if (flags & PSSCAN_ARGV0) {
- if (sp->argv0) {
- free(sp->argv0);
- sp->argv0 = NULL;
- }
+ free(sp->argv0);
+ sp->argv0 = NULL;
strcpy(filename_tail, "/cmdline");
n = read_to_buf(filename, buf);
if (n <= 0)