qemu-option: Replace pointless use of g_malloc0() by g_malloc()
get_opt_value() takes a write-only buffer, so zeroing it is pointless. We don't do it elsewhere, either. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
		
							parent
							
								
									b41112c46b
								
							
						
					
					
						commit
						96c044afdf
					
				| @ -213,7 +213,7 @@ void parse_option_size(const char *name, const char *value, | ||||
| bool has_help_option(const char *param) | ||||
| { | ||||
|     size_t buflen = strlen(param) + 1; | ||||
|     char *buf = g_malloc0(buflen); | ||||
|     char *buf = g_malloc(buflen); | ||||
|     const char *p = param; | ||||
|     bool result = false; | ||||
| 
 | ||||
| @ -237,7 +237,7 @@ out: | ||||
| bool is_valid_option_list(const char *param) | ||||
| { | ||||
|     size_t buflen = strlen(param) + 1; | ||||
|     char *buf = g_malloc0(buflen); | ||||
|     char *buf = g_malloc(buflen); | ||||
|     const char *p = param; | ||||
|     bool result = true; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Markus Armbruster
						Markus Armbruster