File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ struct libmnt_fs *mnt_table_find_srcpath(struct libmnt_table *tb, const char *pa
506
506
507
507
if (path == NULL && src == NULL )
508
508
return fs ; /* source is "none" */
509
- if (p && strcmp (p , path ) == 0 )
509
+ if (path && p && strcmp (p , path ) == 0 )
510
510
return fs ;
511
511
if (!p && src )
512
512
ntags ++ ; /* mnt_fs_get_srcpath() returs nothing, it's TAG */
@@ -845,7 +845,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
845
845
846
846
tgt = mnt_fs_get_target (fstab_fs );
847
847
848
- if (tgt || src || root ) {
848
+ if (tgt && src && root ) {
849
849
struct libmnt_iter itr ;
850
850
struct libmnt_fs * fs ;
851
851
@@ -856,8 +856,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
856
856
* t = mnt_fs_get_target (fs ),
857
857
* r = mnt_fs_get_root (fs );
858
858
859
- if (s && t && r && ! strcmp ( t , tgt ) &&
860
- !strcmp (s , src ) && !strcmp (r , root ))
859
+ if (t && s && r &&
860
+ !strcmp (t , tgt ) && ! strcmp ( s , src ) && !strcmp (r , root ))
861
861
break ;
862
862
}
863
863
if (fs )
You can’t perform that action at this time.
0 commit comments