[Nouveau] nouveau.c

Ilia Mirkin imirkin at alum.mit.edu
Wed Mar 26 13:58:08 PDT 2014


struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev));

calloc sets the entire structure to 0. so that field is implicitly set
to 0 on allocation.

On Wed, Mar 26, 2014 at 4:37 PM, Daniel Melo Jorge da Cunha
<dmjcunha at gmail.com> wrote:
> Hi, I am inspecting the file nouveau.c...
> In the function nouveau_client_new there is the
> following:
>
> for (i = 0; i < nvdev->nr_client; i++) {
>
> but "nr_client" has no previous assignment
>
> so it has scrambled data. Is this expected behaviour
> or am I missing something (the most probable :)?
>
> And someone please tell me where do I find that ffs function.
>
> Thanks in advance!!
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
>


More information about the Nouveau mailing list