:: Re: [DNG] Pointer error in the back…
Página Inicial
Delete this message
Reply to this message
Autor: KatolaZ
Data:  
Para: aitor_czr
CC: dng
Assunto: Re: [DNG] Pointer error in the backend of Netman
On Thu, Dec 10, 2015 at 01:40:38PM +0100, aitor_czr wrote:
> Hi Katolaz,
>
> (Sorry if i send the same post several times, but many of them are
> being undelivered today)
>
> Try the folling code:
>
> int x = 5;
> int *p,*q;
>
> p=&x; // This is -> *p=5
> q=p;
>
> printf(" The values are:    %d  %d  ", *p,*q);
> printf(" The addresses are: %p  %p  ",  p, q);

>
> So:
>
> 1) active_wifis is the address
> 2) *active_wifis is the value
>


And this is what I learnt once upon a time from the old good
K&R. Which means that active_wifis and &active_wifis are not "the
same" thing, especially when passed to a realloc.

HND

KatolaZ


--
[ Enzo Nicosia aka KatolaZ --- GLUG Catania -- Freaknet Medialab ]
[ me [at] katolaz.homeunix.net -- http://katolaz.homeunix.net -- ]
[ GNU/Linux User:#325780/ICQ UIN: #258332181/GPG key ID 0B5F062F ]
[ Fingerprint: 8E59 D6AA 445E FDB4 A153 3D5A 5F20 B3AE 0B5F 062F ]