[862] in testers
vax 7.0D: libss:help.c
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Thu May 24 10:04:00 1990
Date: Thu, 24 May 90 10:03:32 -0400
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: testers@ATHENA.MIT.EDU
System name: lycus
Type and version: CVAXSTAR 7.0D
Display type: SM
What were you trying to do?
compile libss with an ANSI C compiler.
What's wrong:
help.c has a couple of open()s with only 2 arguments, which is
incorrect; open() requires 3 args.
What should have happened:
The code should have this diff applied:
*** /tmp/,RCSt1014411 Thu May 24 10:01:37 1990
--- help.c Thu May 24 10:01:22 1990
***************
*** 55,63 ****
(void) strcat(buffer, "/");
(void) strcat(buffer, argv[1]);
(void) strcat(buffer, ".info");
! if ((fd = open(&buffer[0], O_RDONLY)) >= 0) goto got_it;
}
! if ((fd = open(&buffer[0], O_RDONLY)) < 0) {
char buf[MAXPATHLEN];
strcpy(buf, "No info found for ");
strcat(buf, argv[1]);
--- 55,63 ----
(void) strcat(buffer, "/");
(void) strcat(buffer, argv[1]);
(void) strcat(buffer, ".info");
! if ((fd = open(&buffer[0], O_RDONLY, 0)) >= 0) goto got_it;
}
! if ((fd = open(&buffer[0], O_RDONLY, 0)) < 0) {
char buf[MAXPATHLEN];
strcpy(buf, "No info found for ");
strcat(buf, argv[1]);
Please describe any relevant documentation references:
open(2)