[MPlayer-cvslog] r30821 - trunk/libvo/geometry.c
reimar
subversion at mplayerhq.hu
Wed Mar 3 21:36:35 CET 2010
Author: reimar
Date: Wed Mar 3 21:36:35 2010
New Revision: 30821
Log:
Simplify sscanf format strings and get rid of useless percent variable.
Modified:
trunk/libvo/geometry.c
Modified: trunk/libvo/geometry.c
==============================================================================
--- trunk/libvo/geometry.c Wed Mar 3 21:24:46 2010 (r30820)
+++ trunk/libvo/geometry.c Wed Mar 3 21:36:35 2010 (r30821)
@@ -40,7 +40,6 @@ int geometry(int *xpos, int *ypos, int *
int i;
int ok = 0;
for (i = 0; !ok && i < 8; i++) {
- char percent[2];
width = height = xoff = yoff = xper = yper = INT_MIN;
switch (i) {
case 0:
@@ -53,10 +52,10 @@ int geometry(int *xpos, int *ypos, int *
ok = sscanf(vo_geometry, "+%i+%i", &xoff, &yoff) == 2;
break;
case 3:
- ok = sscanf(vo_geometry, "%i%%:%i%1[%]", &xper, &yper, percent) == 3;
+ ok = sscanf(vo_geometry, "%i%%:%i%%", &xper, &yper) == 2;
break;
case 4:
- ok = sscanf(vo_geometry, "%i:%i%1[%]", &xoff, &yper, percent) == 3;
+ ok = sscanf(vo_geometry, "%i:%i%%", &xoff, &yper) == 2;
break;
case 5:
ok = sscanf(vo_geometry, "%i%%:%i", &xper, &yoff) == 2;
@@ -65,7 +64,7 @@ int geometry(int *xpos, int *ypos, int *
ok = sscanf(vo_geometry, "%i:%i", &xoff, &yoff) == 2;
break;
case 7:
- ok = sscanf(vo_geometry, "%i%1[%]", &xper, percent) == 2;
+ ok = sscanf(vo_geometry, "%i%%", &xper) == 1;
break;
}
}
More information about the MPlayer-cvslog
mailing list