Page MenuHomePhabricator

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

Authored by mgorny on Sat, Dec 29, 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

Repository
rL LLVM

Event Timeline

mgorny created this revision.Sat, Dec 29, 9:27 AM
mgorny updated this revision to Diff 179696.Sat, Dec 29, 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.Sat, Dec 29, 9:30 AM
This revision is now accepted and ready to land.Sat, Dec 29, 9:30 AM
mgorny updated this revision to Diff 179707.Sat, Dec 29, 1:32 PM

Updated variable style.

This revision was automatically updated to reflect the committed changes.