[2/2] wineps.drv: Slightly simplify a PPD parser code snippet.

Dmitry Timoshkov dmitry at baikal.ru
Thu Dec 20 02:24:35 CST 2012


---
 dlls/wineps.drv/ppd.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/dlls/wineps.drv/ppd.c b/dlls/wineps.drv/ppd.c
index 9d529b4..db1e580 100644
--- a/dlls/wineps.drv/ppd.c
+++ b/dlls/wineps.drv/ppd.c
@@ -385,17 +385,11 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple)
         ;
 
     endkey = cp;
-    if(*cp == ':') { /* <key>: */
+    while (isspace(*cp)) cp++;
+    if (*cp == ':') /* <key>: */
         gotoption = FALSE;
-    } else {
-	while(isspace(*cp))
-	    cp++;
-	if(*cp == ':') { /* <key>  : */
-	    gotoption = FALSE;
-	} else { /* <key> <option> */
-	    opt = cp;
-	}
-    }
+    else /* <key> <option> */
+        opt = cp;
 
     tuple->key = HeapAlloc( PSDRV_Heap, 0, endkey - line + 1 );
     if(!tuple->key) return FALSE;
@@ -434,7 +428,7 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple)
     }
 
     /* cp should point to a ':', so we increment past it */
-        cp++;
+    cp++;
 
     while(isspace(*cp))
         cp++;
-- 
1.8.0.2




More information about the wine-patches mailing list