svn commit: trunk/busybox/util-linux

vda at busybox.net vda at busybox.net
Sun Sep 17 15:09:48 UTC 2006


Author: vda
Date: 2006-09-17 08:09:48 -0700 (Sun, 17 Sep 2006)
New Revision: 16138

Log:
mount: mount_it_now() - char *dir is not really needed.


Modified:
   trunk/busybox/util-linux/mount.c


Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c	2006-09-17 15:08:12 UTC (rev 16137)
+++ trunk/busybox/util-linux/mount.c	2006-09-17 15:09:48 UTC (rev 16138)
@@ -253,7 +253,7 @@
 	 * mtab file by hand, add the new entry to it now. */
 
 	if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) {
-		char *dir,*fsname;
+		char *fsname;
 		FILE *mountTable = setmntent(bb_path_mtab_file, "a+");
 		int i;
 
@@ -273,7 +273,7 @@
 
 		// Convert to canonical pathnames as needed
 
-		mp->mnt_dir = dir = bb_simplify_path(mp->mnt_dir);
+		mp->mnt_dir = bb_simplify_path(mp->mnt_dir);
 		fsname = 0;
 		if (!mp->mnt_type || !*mp->mnt_type) { /* bind mount */
 			mp->mnt_fsname = fsname = bb_simplify_path(mp->mnt_fsname);
@@ -286,7 +286,7 @@
 		addmntent(mountTable, mp);
 		endmntent(mountTable);
 		if (ENABLE_FEATURE_CLEAN_UP) {
-			free(dir);
+			free(mp->mnt_dir);
 			free(fsname);
 		}
 	}




More information about the busybox-cvs mailing list