if (quiet==0)
error_msg( "%s: no process killed", *argv);
} else {
- for(; *pidList!=0; pidList++) {
- if (*pidList==myPid)
- continue;
- if (kill(*pidList, sig) != 0) {
- errors++;
- if (quiet==0)
- perror_msg( "Could not kill pid '%d'", *pidList);
+ long *pl;
+
+ for(pl = pidList; *pl !=0 ; pl++) {
+ if (*pl==myPid)
+ continue;
+ if (kill(*pl, sig) != 0) {
+ errors++;
+ if (quiet==0)
+ perror_msg( "Could not kill pid '%d'", *pl);
+ }
}
- }
}
free(pidList);
argv++;
/* Looks like everything is set to go. */
while(optind < argc) {
- long* pidList;
+ long *pidList;
+ long *pl;
pidList = find_pid_by_name(argv[optind]);
- for(; *pidList > 0; pidList++) {
- printf("%s%ld", (n++ ? " " : ""), (long)*pidList);
+ for(pl = pidList; *pl > 0; pl++) {
+ printf("%s%ld", (n++ ? " " : ""), *pl);
fail = 0;
if (single_flag)
break;