diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-14 19:53:10 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-17 10:27:15 +0100 |
commit | b0c22c2f34a6bc51a70bef138f211d30ca085d0b (patch) | |
tree | 6fadb7d8bf77d481f5954dd1d3207db9e47c44cc /fs | |
parent | 336ad5ce68f387e60b8862c709782a3e4cd7ee1e (diff) | |
download | barebox-b0c22c2f34a6bc51a70bef138f211d30ca085d0b.tar.gz barebox-b0c22c2f34a6bc51a70bef138f211d30ca085d0b.tar.xz |
fs: remove only once used variable
dev is used only once, so make the code a tiny bit simpler by
not using an extra variable but dereference it when needed directly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -718,7 +718,7 @@ int mount(const char *device, const char *fsname, const char *_path) struct fs_driver_d *fs_drv = NULL, *f; struct mtab_entry *entry; struct fs_device_d *fsdev; - struct device_d *dev, *parent_device = NULL; + struct device_d *parent_device = NULL; struct cdev *cdev = NULL; int ret; char *path = normalise_path(_path); @@ -789,12 +789,10 @@ int mount(const char *device, const char *fsname, const char *_path) if (parent_device) dev_add_child(parent_device, &fsdev->dev); - dev = &fsdev->dev; - /* add mtab entry */ entry = &fsdev->mtab; entry->path = xstrdup(path); - entry->dev = dev; + entry->dev = &fsdev->dev; entry->parent_device = parent_device; list_add_tail(&entry->list, &mtab_list); |