summaryrefslogtreecommitdiff
path: root/devel/ftjam/files/patch-variable.c
blob: a8b20e626efb1e7fc898dc218c0b1b1d83a5182e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- variable.c.orig	2006-06-05 12:52:08.000000000 +0200
+++ variable.c	2014-08-07 15:43:50.000000000 +0200
@@ -88,7 +88,7 @@
 	
 	    if( ( val = strchr( *e, '=' ) ) || ( val = *e + strlen( *e ) ) )
 # else
-	    if( val = strchr( *e, '=' ) )
+	    if( ( val = strchr( *e, '=' ) ) )
 # endif
 	    {
 		LIST *l = L0;
@@ -112,11 +112,11 @@
 
 		/* Do the split */
 
-		for( pp = val + 1; p = strchr( pp, split ); pp = p + 1 )
+		for( pp = val + 1; ( p = strchr( pp, split ) ); pp = p + 1 )
 		{
-		    int  len = p - pp;
+		    size_t len = p - pp;
 
-		    if ( len >= sizeof(buf) )
+		    if ( ( len >= sizeof(buf) ) )
 		      len = sizeof(buf)-1;
 
 		    strncpy( buf, pp, len );
@@ -203,7 +203,7 @@
 
 		    /* Separate with space */
 
-		    if( l = list_next( l ) )
+		    if( ( l = list_next( l ) ) )
 		    *out++ = ' ';
 		}