On Thu, 18 Mar 2010 10:43:59 +0000 Dave wrote: DS> On 18 March 2010 10:50, sanjaykumar <[email protected]> wrote: DS> > I am not telling to remove the validation but update it DS> > eg: DS> > In below code udpEndpointLocalAddress is an array hence "(NULL == DS> > tbl_idx->udpEndpointLocalAddress) " will be never VALID. DS> DS> With the current code, that appears to be true. DS> The existing data structure seems to use a fixed array buffer, DS> so the buffer pointer will indeed never be NULL. DS> DS> So that particular test is not strictly necessary DS> (and may well be optimised away by the compiler).
This is generated code, so it's being cautious. I agree with Dave that it's probably optimized out, and there is no harm in leaving it in, for exactly the reason he states. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
