[PATCH v6 4/8] ntdll: Return BIOS info from NtQuerySystemInformation on Linux
Alex Henrie
alexhenrie24 at gmail.com
Mon Jun 18 06:07:22 CDT 2018
On Mon, Jun 18, 2018 at 2:17 AM Huw Davies <huw at codeweavers.com> wrote:
>
> On Sun, Jun 17, 2018 at 11:38:10PM -0600, Alex Henrie wrote:
> > +static void get_smbios_string(const char *path, char *s, size_t *len)
> > +{
> > + FILE *file = fopen(path, "r");
> > + if (!file)
> > + {
> > + *len = 0;
> > + return;
> > + }
> > +
> > + *len = fread(s, 1, 127, file);
>
> You could pass the size of the buffer using len as an [in,out]
> parameter, then you wouldn't need the magic number.
Let's just make it a #define.
-Alex
More information about the wine-devel
mailing list