[Asterisk-Dev] sensible buffer size management

Luigi Rizzo rizzo at icir.org
Wed May 4 04:03:29 MST 2005


it is not in mine or i believe anyone's interest to find exactly
if the occurrences are 1672 or 1596 or 1733.

Rough counts are what matter, and visual inspection of the output
(which i did before adding the '| wc') shows that indeed this is
the case. Then replacement needs manual intervention anyways
(if nothing else to find out which is the right constant to use)

	cheers
	luigi


On Wed, May 04, 2005 at 03:54:37AM -0700, Andrew Edem wrote:
> > > find . -name \*.\[ch\] -exec grep -H char \{\} \; | egrep '\[[0-9]+' | wc -l
> >     1672
> > > find . -name \*.\[ch\] -exec grep -H char \{\} \; | egrep '\[[A-Z]+' | wc -l
> >      590
> 
> 
> I really disagree with this methodology for finding definitions. First
> of, this doesn't identify definitions, it identifies any instance where
> an integer is inside of square brackets, so, it counts:
> 
> unsigned char data[24];
> byte = data[1+i];
> byte = data[7];
> 
> As the same, but won't count:
> 
> unsigned char data[ 24 ];
> 
> The point is taken, however. Perhaps it would be good for you to write a
> minimal utility to find array definitions whose size is devined by
> integer constants instead of named constants.
> 
> -Andrew
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list