Message ID | 20200414014611.295310002@goodmis.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
diff --git a/lib/tracefs/tracefs-instance.c b/lib/tracefs/tracefs-instance.c index a8729406b9fc..012a867038b7 100644 --- a/lib/tracefs/tracefs-instance.c +++ b/lib/tracefs/tracefs-instance.c @@ -263,12 +263,7 @@ static bool check_file_exists(struct tracefs_instance *instance, if (ret < 0) return false; - if (dir && !S_ISDIR(st.st_mode)) - return false; - if (!dir && S_ISDIR(st.st_mode)) - return false; - - return true; + return !dir == !S_ISDIR(st.st_mode); } /**