On Wed, 2011-03-02 at 12:03 +0100, Bart Van Assche wrote:
> On Wed, Mar 2, 2011 at 12:07 AM, Magnus Fromreide
> <ma...@lysator.liu.se> wrote:
>         On Tue, 2011-03-01 at 21:10 +0100, Bart Van Assche wrote:
>         > On Mon, Feb 28, 2011 at 11:11 PM, Magnus Fromreide
>         > <ma...@lysator.liu.se> wrote:
>         >         Hello.
>         
>         >
>         
>         >         One could make the functions return 1 on success on
>         0 on
>         >         failure, but that is a bigger ABI change.
>         
>         
>         Bah, I misread the code. This is what it does.
>         
>         > How about the patch below (not tested) ?
>         
>         That was my first approach :-)
>         
>         My current patch instead removes all the uses of the return
>         values as
>         they are of limited value (do not write a debug log stating
>         that the
>         statistics aggregation failed).
> 
> That will also work of course.

I have committed that.

>         Now, the big one is what to do with the replacement macro,
>         your solution is the obvious way to do it but the drawback is
>         that it trigger compiler warnings about unused values in the
>         code.
> 
> Maybe changing the macro definitions into inline functions that return
> 1 helps to avoid the compiler warning ?

I think it would but then the problem shifts to the fact that we can't
count on inline being available.

I have been thinking of an netsnmp_returns_1() that could be used for
situations like this one, but that is just plain ugly.

/MF



------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to