:: Re: [DNG] simple-netaid from scratc…
Kezdőlap
Delete this message
Reply to this message
Szerző: s
Dátum:  
Címzett: aitor_czr
CC: dng
Tárgy: Re: [DNG] simple-netaid from scratch
On Sat, 1 Jun 2019 08:31:49 +0000
aitor_czr <aitor_czr@???> wrote:

Hello aitor,

>
> Look at the "netstat.c" file again. I'm using
>
> status = fgets ( buffer, sizeof(buffer), fp );
>
> instead :)
>
> Aitor.
>
>


I understood that, from the beguining.. :)
You don't need the 'sizeof *buffer', since you have a fixed array size of 512 bytes..
And a byte, is a byte in 32 bits or 64 bits systems ;)

Becasue of that, I suggested changing it to:
#define BUFFER_SIZE 512

and then:
status = fgets ( buffer, BUFFER_SIZE, fp );

It was only a sugestion ;)
Its not wrong, to use it( even tough you are heavilly relying on that unary operator.. for a fixed array size, of n bytes.. )

Best Regards
--
s@po <tuxd3v@???>