From 0833aaa64d0a933b3d65d00643f0b737683c2801 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 3 Mar 2010 20:36:35 +0000 Subject: [PATCH] Simplify sscanf format strings and get rid of useless percent variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30821 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/geometry.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libvo/geometry.c b/libvo/geometry.c index ec9e7f0a5f..7576f9feb4 100644 --- a/libvo/geometry.c +++ b/libvo/geometry.c @@ -40,7 +40,6 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh) 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 *widw, int *widh, int scrw, int scrh) 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 *widw, int *widh, int scrw, int scrh) 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; } }