kmackay/android-ifaddrs — pull request #2 by scolphoy (2013-11-19 10:21:57+00:00)
Title: Check mallocs, propagate error to caller.

I used your ifaddr.c in a project and to fit our guidelines I needed checks that the mallocs were successful. Here's my changes back, if you're interested.

After each malloc, the first thing this does is checks if it was successful, and returns a value appropriate to the function's return type.

interpretLink, interpretAddr and interpret were changed to return an int, so that they can propagate the error back to getifaddr, and onward to the caller. Upon success, they return 0.