On Thu, May 12, 2011 at 12:56:12AM +0200, Marc Kleine-Budde wrote:

> > +static void schedule_repeating_itimer(int msec)
> > +{
> > +   int ret;
> > +   struct itimerval val = {};
> > +
> > +   val.it_value.tv_sec = msec / 1000;
> > +   val.it_value.tv_usec = (msec % 1000) * 1000;
> > +   val.it_interval = val.it_value;
> 
> C99 initializer?
???
val.it_value is just stuffed aboved. What did I miss that could be done
with C99 initialize?
> 
> > +
> > +           ret = recv(sock, dat, sizeof(dat), 0);
> 
> You send 8 byte but receive 9. Is this a j1939 thing speciality?

I ask to receive up to 9. I don't know how much I will get ...

currently, 3 would be enough. In case the 'Date/Time Adjust' PGN would be
evaluated, 8 will be proper (and 8 is most of the times a proper number).

So, this is lazyness, not j1939 speciality.

Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to