Re: [PATCH] libxtables: Dont initialize global xt_params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-02-12 at 16:41 +0100, Thomas Jarosch wrote:

> Well, I guess that's a job for the compiler/optimizer. I did a quick test by 
> writing two versions of a small program initializing a static variable with 
> zero and one version that doesn't (=zeroed in .bss). Guess what,
> the size of the resulting executable stays the same.
> 
> When I initialize the variable with a non-zero value, then the program size 
> increases. I tested "-O2", "-O0" and "-Os" and the results where the same.
> Feel free to look at the assembler output, though I guess this optimization
> is not measurable and makes the code harder to read :o)
> 

I have no objection with junking the patch i sent. My initial intent of
NULLing was to use it as a check when first initializing - but now i
realize it actually didnt matter; and the readability arguement sounds
fair.

cheers,
jamal

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux