I'd like to add this pretty obvious patch.
It calls DEBUGMSG before returning instead of after...
Index: agent/mibgroup/hardware/cpu/cpu.c
===================================================================
--- agent/mibgroup/hardware/cpu/cpu.c	(revision 19356)
+++ agent/mibgroup/hardware/cpu/cpu.c	(working copy)
@@ -84,8 +84,8 @@
          */
     cpu = SNMP_MALLOC_TYPEDEF( netsnmp_cpu_info );
     if (!cpu) {
+        DEBUGMSG(("cpu", "(failed)\n"));
         return NULL;
-        DEBUGMSG(("cpu", "(failed)\n"));
     }
     DEBUGMSG(("cpu", "(created)\n"));
     cpu->idx = idx;
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to