Convert call sites to the proper method for setting the name.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
This commit is contained in:
		
							parent
							
								
									47982fb8c8
								
							
						
					
					
						commit
						d471a57aa8
					
				
							
								
								
									
										5
									
								
								clock.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								clock.c
									
									
									
									
									
								
							@ -850,6 +850,7 @@ struct clock *clock_create(enum clock_type type, struct config *config,
 | 
				
			|||||||
	int fadj = 0, max_adj = 0, sw_ts;
 | 
						int fadj = 0, max_adj = 0, sw_ts;
 | 
				
			||||||
	int phc_index, required_modes = 0;
 | 
						int phc_index, required_modes = 0;
 | 
				
			||||||
	struct clock *c = &the_clock;
 | 
						struct clock *c = &the_clock;
 | 
				
			||||||
 | 
						const char *uds_ifname;
 | 
				
			||||||
	struct port *p;
 | 
						struct port *p;
 | 
				
			||||||
	unsigned char oui[OUI_LEN];
 | 
						unsigned char oui[OUI_LEN];
 | 
				
			||||||
	char phc[32], *tmp;
 | 
						char phc[32], *tmp;
 | 
				
			||||||
@ -999,8 +1000,8 @@ struct clock *clock_create(enum clock_type type, struct config *config,
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Configure the UDS. */
 | 
						/* Configure the UDS. */
 | 
				
			||||||
	snprintf(udsif->name, sizeof(udsif->name), "%s",
 | 
						uds_ifname = config_get_string(config, NULL, "uds_address");
 | 
				
			||||||
		 config_get_string(config, NULL, "uds_address"));
 | 
						interface_set_name(udsif, uds_ifname);
 | 
				
			||||||
	if (config_set_section_int(config, interface_name(udsif),
 | 
						if (config_set_section_int(config, interface_name(udsif),
 | 
				
			||||||
				   "announceReceiptTimeout", 0)) {
 | 
									   "announceReceiptTimeout", 0)) {
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								config.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								config.c
									
									
									
									
									
								
							@ -835,7 +835,7 @@ struct interface *config_create_interface(const char *name, struct config *cfg)
 | 
				
			|||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	strncpy(iface->name, name, MAX_IFNAME_SIZE);
 | 
						interface_set_name(iface, name);
 | 
				
			||||||
	STAILQ_INSERT_TAIL(&cfg->interfaces, iface, list);
 | 
						STAILQ_INSERT_TAIL(&cfg->interfaces, iface, list);
 | 
				
			||||||
	cfg->n_interfaces++;
 | 
						cfg->n_interfaces++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -350,7 +350,7 @@ struct pmc *pmc_create(struct config *cfg, enum transport_type transport_type,
 | 
				
			|||||||
		goto failed;
 | 
							goto failed;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	strncpy(iface.name, iface_name, MAX_IFNAME_SIZE);
 | 
						interface_set_name(&iface, iface_name);
 | 
				
			||||||
	interface_ensure_tslabel(&iface);
 | 
						interface_ensure_tslabel(&iface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (transport_open(pmc->transport, &iface,
 | 
						if (transport_open(pmc->transport, &iface,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user