mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	tools: terminate getopt_long long option arrays properly
The last element of the long options array has to be filled with zeros. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
		
							parent
							
								
									f333981e1a
								
							
						
					
					
						commit
						c252c77dbf
					
				@ -166,7 +166,8 @@ main (int argc, char *argv[])
 | 
				
			|||||||
	static struct option long_options[] = {
 | 
						static struct option long_options[] = {
 | 
				
			||||||
		{"devid", 1, 0, 'd'},
 | 
							{"devid", 1, 0, 'd'},
 | 
				
			||||||
		{"ascii", 0, 0, 'a'},
 | 
							{"ascii", 0, 0, 'a'},
 | 
				
			||||||
		{"binary", 0, 0, 'b'}
 | 
							{"binary", 0, 0, 'b'},
 | 
				
			||||||
 | 
							{ 0 }
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	devid_str = getenv("INTEL_DEVID_OVERRIDE");
 | 
						devid_str = getenv("INTEL_DEVID_OVERRIDE");
 | 
				
			||||||
 | 
				
			|||||||
@ -1101,6 +1101,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
		{ "transcoder" ,        required_argument, NULL, 't' },
 | 
							{ "transcoder" ,        required_argument, NULL, 't' },
 | 
				
			||||||
		{ "infoframe",          required_argument, NULL, 'f' },
 | 
							{ "infoframe",          required_argument, NULL, 'f' },
 | 
				
			||||||
		{ "help",               no_argument,       NULL, 'h' },
 | 
							{ "help",               no_argument,       NULL, 'h' },
 | 
				
			||||||
 | 
							{ 0 }
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	printf("WARNING: This is just a debugging tool! Don't expect it to work"
 | 
						printf("WARNING: This is just a debugging tool! Don't expect it to work"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user