Don't call lstat() before readlink() just to see if it's a symlink,
authorguenther <guenther@openbsd.org>
Sun, 28 Aug 2016 04:08:59 +0000 (04:08 +0000)
committerguenther <guenther@openbsd.org>
Sun, 28 Aug 2016 04:08:59 +0000 (04:08 +0000)
commitcd1ef5d3a621d773f553a0acb131abec8a3b18a1
tree03df1b1dadabed895d5612093515870f8ea89a4a
parent2e71478ce4bf706955b5a9d64620675a801f1c9b
Don't call lstat() before readlink() just to see if it's a symlink,
as readlink() will tell you that more cheaply.

ok millert@
lib/libc/stdlib/realpath.c
libexec/ld.so/dl_realpath.c