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
<[email protected]> 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
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/nouveau
>
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to