SCCS-vsn: usr.bin/learn/learn/selsub.c 4.5
-static char sccsid[] = "@(#)selsub.c 4.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)selsub.c 4.5 (Berkeley) %G%";
#endif not lint
#include "stdio.h"
#include "sys/types.h"
#endif not lint
#include "stdio.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "lrnref.h"
#include "sys/stat.h"
#include "lrnref.h"
}
/* after this point, we have a working directory. */
/* have to call wrapup to clean up */
}
/* after this point, we have a working directory. */
/* have to call wrapup to clean up */
- if (access(sprintf(ans1, "%s/%s/Init", direct, sname), 04)==0)
- if (system(sprintf(ans1, "%s/%s/Init %s", direct, sname, level)) != 0) {
+ (void)sprintf(ans1, "%s/%s/Init", direct, sname);
+ if (access(ans1, R_OK)==0) {
+ (void)sprintf(ans1, "%s/%s/Init %s", direct, sname, level);
+ if (system(ans1) != 0) {
printf("Leaving learn.\n");
wrapup(1);
}
printf("Leaving learn.\n");
wrapup(1);
}