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; }