From: David van Moolenbroek Date: Wed, 23 Nov 2011 14:56:13 +0000 (+0100) Subject: gcore: uninitialized variable fix and cleanup X-Git-Tag: v3.2.0~227 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-coverage.html?a=commitdiff_plain;h=5a70f42ab65cf06c2781e23faa2dce2889f64d58;p=minix.git gcore: uninitialized variable fix and cleanup --- diff --git a/commands/gcore/gcore.c b/commands/gcore/gcore.c index 8fa98e652..d07d9c0b2 100644 --- a/commands/gcore/gcore.c +++ b/commands/gcore/gcore.c @@ -1,15 +1,9 @@ /* gcore - create core file of running process */ -#include -#include -#include -#include -#include -#include +#include #include #include #include -#include #include #include #include @@ -18,7 +12,7 @@ int main(int argc, char *argv[]) { pid_t pid; - int r, status; + int status; if(argc != 2) { printf("usage: %s \n", argv[0]); @@ -53,14 +47,12 @@ int main(int argc, char *argv[]) } if (ptrace(T_DUMPCORE, pid, 0, 0)) { - fprintf(stderr, "warning, dumpcore failed (%s)\n", - strerror(errno)); + fprintf(stderr, "warning, dumpcore failed (%s)\n", strerror(errno)); } if (ptrace(T_DETACH, pid, 0, 0)) { - fprintf(stderr, "warning, detaching failed (%s)\n", - strerror(errno)); + fprintf(stderr, "warning, detaching failed (%s)\n", strerror(errno)); } - return r; + return 0; }