mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	samples/bpf: Use %lu format specifier for unsigned long values
Currently %ld format specifiers are being used for unsigned long values. Fix this by using %lu instead. Cleans up cppcheck warnings: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/bpf/20231219152307.368921-1-colin.i.king@gmail.com
This commit is contained in:
		
							parent
							
								
									441c725ed5
								
							
						
					
					
						commit
						32f24938a1
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -66,10 +66,10 @@ static void cpu_stat_print(void) | |||
| 
 | ||||
| 		printf("CPU-%-6d ", j); | ||||
| 		for (i = 0; i < MAX_CSTATE_ENTRIES; i++) | ||||
| 			printf("%-11ld ", data->cstate[i] / 1000000); | ||||
| 			printf("%-11lu ", data->cstate[i] / 1000000); | ||||
| 
 | ||||
| 		for (i = 0; i < MAX_PSTATE_ENTRIES; i++) | ||||
| 			printf("%-11ld ", data->pstate[i] / 1000000); | ||||
| 			printf("%-11lu ", data->pstate[i] / 1000000); | ||||
| 
 | ||||
| 		printf("\n"); | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Colin Ian King
						Colin Ian King