- if (preserve_hard_links) {
- idev_len = (protocol_version < 28 ? S_ISREG(st.st_mode)
- : !S_ISDIR(st.st_mode) && st.st_nlink > 1)
- ? sizeof (struct idev) : 0;
- } else
+ if (preserve_hard_links && st.st_nlink > 1) {
+ if (protocol_version < 28) {
+ if (S_ISREG(st.st_mode))
+ idev_len = sizeof (struct idev);
+ } else {
+ if (!S_ISDIR(st.st_mode))
+ idev_len = sizeof (struct idev);
+ }
+ }