awk: no need to call getargv() twice to get the value for FILENAME

This commit is contained in:
cinap_lenrek 2019-05-24 17:25:44 +02:00
parent c9a1045d49
commit d7684982e8

View file

@ -88,7 +88,7 @@ void initgetrec(void)
for (i = 1; i < *AARGC; i++) {
if (!isclvar(p = getargv(i))) { /* find 1st real filename */
setsval(lookup("FILENAME", symtab), getargv(i));
setsval(lookup("FILENAME", symtab), p);
return;
}
setclvar(p); /* a commandline assignment before filename */