On 05/12/2011 05:13 AM, Kurt Van Dijck wrote:
> 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?

Doh, missed that. - You can set it_value in C99 initializer, but that
makes the code less readable IMHO.

>>
>>> +
>>> +           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.

ic

regards, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to