Correct usage of g_read_data() API
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed Nov 30 10:43:01 GMT 2005
In message <438C3672.1010700 at portaone.com>, Maxim Sobolev writes:
>--- 3 ---
>error = random();
>data = g_read_data(..., &error);
>if (buf == NULL)
> handle_error(error);
>---------
This is the correct way.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list