mirror of
				https://git.haproxy.org/git/haproxy.git/
				synced 2025-10-31 00:21:00 +01:00 
			
		
		
		
	This was previously ignored in "DEV: coccinelle: Fix incorrect replacement in ist.cocci", but is now properly replaced by a simple `ist()` call.
		
			
				
	
	
		
			87 lines
		
	
	
		
			843 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			87 lines
		
	
	
		
			843 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| @@
 | |
| struct ist i;
 | |
| expression p, l;
 | |
| @@
 | |
| 
 | |
| (
 | |
| - i.ptr = p;
 | |
| - i.len = strlen(i.ptr);
 | |
| + i = ist(p);
 | |
| |
 | |
| - i.ptr = p;
 | |
| - i.len = l;
 | |
| + i = ist2(p, l);
 | |
| )
 | |
| 
 | |
| @@
 | |
| @@
 | |
| 
 | |
| - ist2(NULL, 0)
 | |
| + IST_NULL
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| expression e;
 | |
| @@
 | |
| 
 | |
| - i.ptr += e;
 | |
| - i.len -= e;
 | |
| + i = istadv(i, e);
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| @@
 | |
| 
 | |
| - i = istadv(i, 1);
 | |
| + i = istnext(i);
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| @@
 | |
| 
 | |
| - i.ptr++;
 | |
| - i.len--;
 | |
| + i = istnext(i);
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| @@
 | |
| 
 | |
| - (\(i.ptr\|istptr(i)\) + \(i.len\|istlen(i)\))
 | |
| + istend(i)
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| expression e;
 | |
| @@
 | |
| 
 | |
| - if (\(i.len\|istlen(i)\) > e) { i.len = e; }
 | |
| + i = isttrim(i, e);
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| struct buffer *b;
 | |
| @@
 | |
| 
 | |
| - chunk_memcat(b, \(i.ptr\|istptr(i)\) , \(i.len\|istlen(i)\));
 | |
| + chunk_istcat(b, i);
 | |
| 
 | |
| @@
 | |
| struct ist i;
 | |
| @@
 | |
| 
 | |
| - i.ptr != NULL
 | |
| + isttest(i)
 | |
| 
 | |
| @@
 | |
| char *s;
 | |
| @@
 | |
| 
 | |
| (
 | |
| - ist2(s, strlen(s))
 | |
| + ist(s)
 | |
| |
 | |
| - ist2(strdup(s), strlen(s))
 | |
| + ist(strdup(s))
 | |
| )
 |