Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: how to use scandir()? Message-ID: <13677@smoke.BRL.MIL> Date: 28 Aug 90 19:41:43 GMT References: <9008271747.AA02292@ws-38.cae.wisc.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 7 In article katsu@sra.co.jp (WATANABE Katsuhiro) writes: >> n = scandir(".", namelist, NULL, NULL) is a reasonable call, No, it is not "reasonable". The only time you should pass uncast NULL arguments to a function is when there is a prototype for the function in scope, which is not possible in pre-ANSI C. In this particular case the last two arguments should be either (int(*)())NULL or (int(*)())0.