Dave Shield <[email protected]> writes: > On 18 June 2012 23:10, Wes Hardaker <[email protected]> wrote: > It's a bit more complex than ideally I'd like at this stage, > but in general I'm tempted to say yes. > But there are a couple of points of concern: > > - in the various compatibility routines, there's a statement > > *Index = returnIndex; > > Is it safe to assign an 'int' value to a 'short*' without masking > the value to 16bits?
Ah, that's probably what Niels meant too. I'm not sure that masking will do anything that won't happen anyway. Though masking to 15bits will prevent it from going negative, which might be a wise option. Or maybe the routine returning a short should actually check that the int value is < 2^15 and return -1 if so? > - in the header file, mibII/interfaces.h, the declaration of > Interface_Scan_NextInt has a first parameter of type 'Int' > Shouldn't this be 'int' ? Whoops. I guess gcc thinks that's ok because it's close to C++? -- Wes Hardaker Please mail all replies to [email protected] ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
