[Olsr-dev] freebsd fixes for src/bsd/net.c

Gianni Costanzi (spam-protected)
Fri Sep 7 11:10:56 CEST 2007


> > But this is just my opinion... furthermore, I almost always use
> > sizeof(struct my_struct) if src is a pointer to a "struct my_struct"
> > data structure.
>
> And if someone changes the definition of the variable to "struct
> other_struct"?
> Of course one *should* check everything on such changes but we all are
> human too.
> But I believe more in the compiler and other tools to check BTW.

Its more a matter of personal opinions I think.. .there is a long
discussion about this thing on [1], if someone is interested... I
mainly do it for a matter of readability..

[1] http://kerneltrap.org/node/5687

Sorry for my "intrusion" in the discussion :)

>
> Yes, the other solution doesn't catch the case where one changes from
> "struct foo x"
> to "struct foo *x" (except if sizeof(structfoo) == 4) - so that is not
> 100% foolproof
> either but I consider it the smaller problem (if only quantity-wise).
>
>         Bernd
> --
> Firmix Software GmbH                   http://www.firmix.at/
> mobil: +43 664 4416156                 fax: +43 1 7890849-55
>           Embedded Linux Development and Services
>
>
>
> --
> Olsr-dev mailing list
> (spam-protected)
> http://lists.olsr.org/mailman/listinfo/olsr-dev
>


-- 
--------------------------------------------------------------------------------------------------------------
|  Gianni Costanzi ((spam-protected))
|       (http://utenti.lycos.it/giannicostanzi/)
|
|  Gentoo Documentation Project (GDP) Member - Italian Translator
|       (http://www.gentoo.org/proj/en/gdp/)
|
|  Free Software Foundation Member #3844 (www.fsf.org)
|       "Free Software is a matter of Liberty not price"
|
|  Sun Valley in Rock Staff Member (www.sunvalleyinrock.net/forum)
--------------------------------------------------------------------------------------------------------------




More information about the Olsr-dev mailing list