From: Christian Weisgerber Subject: Re: gotwebd: openat(2) and less params for scraping repo info To: gameoftrees@openbsd.org Date: Tue, 15 Nov 2022 18:56:24 +0100 Omar Polo: > Here's a reiteration of the previous diff. Since i was already using > openat(2) in gotweb_get_repo_{description,clone_url} i thought i could > avoid the FILE handling at all: all we need to do is seek a bit to see > how big the file is and read from it. It also changes len to be off_t > since now it's using lseek instead of fseek. BTW, fseek() and ftell() are poor reasons for *not* using off_t. There are feeko() and ftello() replacements that take off_t. I've been tempted to replace all instances of fseek(), but back when I grepped the got tree the last time, they all took 0 as argument, so the parameter type is moot. -- Christian "naddy" Weisgerber naddy@mips.inka.de