changeset 36759:8f3dc4467047

vo_aa: Move variables to appropriate scope, remove unused ones.
author reimar
date Sun, 16 Feb 2014 15:44:31 +0000
parents 0fa1993a31c3
children 6ec928ab8112
files libvo/vo_aa.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_aa.c	Sun Feb 16 14:47:37 2014 +0000
+++ b/libvo/vo_aa.c	Sun Feb 16 15:44:31 2014 +0000
@@ -668,10 +668,6 @@
 static int preinit(const char *arg)
 {
     char * hidis = NULL;
-    struct stat sbuf;
-    int fd, vt, major, minor;
-    FILE * fp;
-    char fname[12];
 
     if(arg)
     {
@@ -683,12 +679,16 @@
 
     hidis=aa_getfirst(&aa_displayrecommended);
     if ( hidis==NULL ){
+	struct stat sbuf;
+	char fname[12];
+	FILE *fp;
+	int fd, vt;
 	/* check /dev/vcsa<vt> */
 	/* check only, if no driver is explicit set */
 	fd = dup (fileno (stderr));
 	fstat (fd, &sbuf);
-	major = sbuf.st_rdev >> 8;
-	vt = minor = sbuf.st_rdev & 0xff;
+	// vt number stored in device minor
+	vt = sbuf.st_rdev & 0xff;
 	close (fd);
 	sprintf (fname, "/dev/vcsa%2.2i", vt);
 	fp = fopen (fname, "w+");