This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer_common] Fix devname_r() return type on !NetBSD
ClosedPublic

Authored by mgorny on Dec 29 2018, 9:27 AM.

Details

Summary

Update the interceptor for devname_r() to account for correct return
types on different platforms. This function returns int on NetBSD
but char* on FreeBSD/OSX. Noticed by @krytarowski.

Diff Detail

Event Timeline

mgorny created this revision.Dec 29 2018, 9:27 AM
mgorny updated this revision to Diff 179696.Dec 29 2018, 9:28 AM

Fixed lint.

Looks fine, but according to newer style of newer interceptors we prefer: DEVNAME_R_RETTYPE res = REAL(devname_r)(dev, type, path, len);

krytarowski accepted this revision.Dec 29 2018, 9:30 AM
This revision is now accepted and ready to land.Dec 29 2018, 9:30 AM
mgorny updated this revision to Diff 179707.Dec 29 2018, 1:32 PM

Updated variable style.

This revision was automatically updated to reflect the committed changes.