Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!wugate!uunet!mcsun!hp4nl!star.cs.vu.nl!ast From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: Re: Important new program: cleanit.c Message-ID: <3539@ast.cs.vu.nl> Date: 6 Oct 89 11:28:24 GMT References: <3492@ast.cs.vu.nl> <3498@solo10.cs.vu.nl> Reply-To: ast@cs.vu.nl (Andy Tanenbaum) Organization: VU Informatica, Amsterdam Lines: 22 In article <3498@solo10.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >Bug! clean() isn't a varargs function. Even thou shalt use lint, Mr T.! ^ ^ ^ | | | 1 2 3 1. Yes indeed. add "stdin" as the third argument. Thanks. 2. Correct. clean() is not a varargs function. Even aside from the bug above, it would not be a varargs function. A varargs function is one in which a single formal parameter is used to fetch multiple actual parameters by doing address arithmetic or some such on the address of the actual parameter. This was a case of calling a function that was declared with three formal parameters with two actual parameters, i.e. just leaving out the last actual parameter. Given the C calling sequence of pushing the last parameter first, this is legal, and in any event, is not related to varargs at all. 3. If you promise to write a lint for MINIX, I promise to use it. Andy Tanenbaum (ast@cs.vu.nl)