summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/df.c b/src/df.c
index 357dca547..14f07905d 100644
--- a/src/df.c
+++ b/src/df.c
@@ -611,9 +611,9 @@ get_dev (char const *disk, char const *mount_point,
/* Don't print the first directory name in MOUNT_POINT if it's an
artifact of an automounter. This is a bit too aggressive to be
the default. */
- if (strncmp ("/auto/", mount_point, 6) == 0)
+ if (STRNCMP_LIT (mount_point, "/auto/") == 0)
mount_point += 5;
- else if (strncmp ("/tmp_mnt/", mount_point, 9) == 0)
+ else if (STRNCMP_LIT (mount_point, "/tmp_mnt/") == 0)
mount_point += 8;
#endif
cell = xstrdup (mount_point);
@@ -682,7 +682,7 @@ get_point (const char *point, const struct stat *statp)
if (best_match_len <= len && len <= resolved_len
&& (len == 1 /* root file system */
|| ((len == resolved_len || resolved[len] == '/')
- && strncmp (me->me_mountdir, resolved, len) == 0)))
+ && STREQ_LEN (me->me_mountdir, resolved, len))))
{
best_match = me;
best_match_len = len;