Patchwork [v3,4/5] makedevs: Avoid unnecessary timestamp calculation

login
register
mail settings
Submitter Peter Kjellerstedt
Date May 30, 2013, 12:18 p.m.
Message ID <acbf7929f56933bca73123fcd77084c36c5b7a07.1369916015.git.pkj@axis.com>
Download mbox | patch
Permalink /patch/50819/
State New
Headers show

Comments

Peter Kjellerstedt - May 30, 2013, 12:18 p.m.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
index 4cfb1d5..4bb316b 100644
--- a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c
@@ -116,7 +116,6 @@  static void add_new_device(char *name, char *path, unsigned long uid,
 {
 	int status;
 	struct stat sb;
-	time_t timestamp = time(NULL);
 
 	memset(&sb, 0, sizeof(struct stat));
 	status = lstat(path, &sb);
@@ -127,7 +126,6 @@  static void add_new_device(char *name, char *path, unsigned long uid,
 		 * better match the actual file or strange things will happen.... */
 		if ((mode & S_IFMT) != (sb.st_mode & S_IFMT))
 			error_msg_and_die("%s: file type does not match specified type!", path);
-		timestamp = sb.st_mtime;
 	}
 
 	mknod(path, mode, rdev);