Re: Correct usage of g_read_data() API

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Wed, 30 Nov 2005 11:42:57 +0100
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.
Received on Wed Nov 30 2005 - 09:43:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:48 UTC