Close file and directory descriptors

MFC after:	3 days
This commit is contained in:
Kevin Lo 2010-11-19 10:15:29 +00:00
parent 8385b42c7b
commit f9af8a7b9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215518

View File

@ -524,6 +524,7 @@ list_jobs(long *joblist, int len)
jobno); jobno);
} }
PRIV_END PRIV_END
closedir(spool);
} }
static void static void
@ -594,6 +595,7 @@ process_jobs(int argc, char **argv, int what)
while((ch = getc(fp)) != EOF) { while((ch = getc(fp)) != EOF) {
putchar(ch); putchar(ch);
} }
fclose(fp);
} }
break; break;
@ -604,6 +606,7 @@ process_jobs(int argc, char **argv, int what)
} }
} }
} }
closedir(spool);
} /* delete_jobs */ } /* delete_jobs */
#define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2;