1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
--- src/job.c.orig Sat May 15 01:03:09 1999
+++ src/job.c Sat May 15 01:08:30 1999
@@ -248,12 +248,9 @@
}
sprintf(pat, "%s/[0-9][0-9][0-9].status", sd);
i = glob (pat, 0, NULL, &globbuf);
- if (i != 0) {
- if (i != GLOB_NOMATCH) {
+ if (i != 0) return (NULL);
/* Unknown error (or on some systems, no match) */
- return (NULL);
- }
- } else {
+ else {
if (globbuf.gl_pathc == 0) {
/* No match */
return (NULL);
@@ -385,14 +382,10 @@
i = glob (pat, 0, NULL, &globbuf);
free (pat);
if (i != 0) {
- if (i != GLOB_NOMATCH) {
fprintf (stderr, "Unknown error globbing for job id.\n");
perror (NULL);
fprintf (stderr, "Failed to purge old jobs.\n");
my_exit (1);
- } else {
- /* No match */
- }
} else {
if (globbuf.gl_pathc == 0) {
return;
@@ -432,14 +425,10 @@
i = glob (pat, 0, NULL, &globbuf);
free (pat);
if (i != 0) {
- if (i != GLOB_NOMATCH) {
fprintf (stderr, "Unknown error globbing for job id.\n");
perror (NULL);
fprintf (stderr, "Failed to purge old jobs.\n");
my_exit (1);
- } else {
- /* No match */
- }
} else {
if (globbuf.gl_pathc == 0) {
return;
@@ -495,11 +484,9 @@
i = glob (pat, 0, NULL, &globbuf);
free (pat);
if (i != 0) {
- if (i != GLOB_NOMATCH) {
- fprintf (stderr, "Unknown error globbing for job id.\n");
- perror (NULL);
- my_exit (1);
- }
+ fprintf (stderr, "Unknown error globbing for job id.\n");
+ perror (NULL);
+ my_exit (1);
claim_try = 1;
} else {
if (globbuf.gl_pathc == 0) {
|