miext: replace xallocarray() by calloc()
Only key difference that calloc(), in contrast to rellocarray(),
is zero-initializing. The overhead is hard to measure on today's
machines, and it's safer programming practise to always allocate
zero-initialized, so one can't forget to do it explicitly.
Cocci rule:
    @@
    expression COUNT;
    expression LEN;
    @@
    - xallocarray(COUNT,LEN)
    + calloc(COUNT,LEN)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
			
			
This commit is contained in:
		
							parent
							
								
									c7fb5c25bc
								
							
						
					
					
						commit
						d819be0df9
					
				| 
						 | 
					@ -1325,7 +1325,7 @@ damageText(DrawablePtr pDrawable,
 | 
				
			||||||
    if (!checkGCDamage(pDrawable, pGC))
 | 
					    if (!checkGCDamage(pDrawable, pGC))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    charinfo = xallocarray(count, sizeof(CharInfoPtr));
 | 
					    charinfo = calloc(count, sizeof(CharInfoPtr));
 | 
				
			||||||
    if (!charinfo)
 | 
					    if (!charinfo)
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue