how to use scandir()?

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Aug 29 05:41:43 AEST 1990


In article <KATSU.90Aug28105457 at sran14.sra.co.jp> katsu at 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.



More information about the Comp.unix.questions mailing list