[Nut-upsdev] Re: [nut-commits] svn commit r808 - in trunk: . drivers

Arjen de Korte nut+devel at de-korte.org
Fri Feb 16 08:52:21 CET 2007


> Wouldn't it be necessary to check whether there is anything to free or
> not? Vendor, Product and Serial are set conditionally.

You already answered that yourself ahead of me asking, apologies for all
the noise.

All others, 'IEEE Std 1003.1, 2004 Edition' says

"The free() function shall cause the space pointed to by ptr to be
deallocated; that is, made available for further allocation. If ptr is a
null pointer, no action shall occur."

We do use the check for NULL pointers before freeing them throughout the
so I think I have a little task for this weekend (clearing out all
superfluous checks for NULL pointers).

Best regards, Arjen




More information about the Nut-upsdev mailing list