Change uses of sprintf to snprintf

git-svn-id: svn://coreboot.org/openbios/openbios-devel@277 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-11-30 13:44:38 +00:00
parent ad4a1b3af0
commit c77259ec3a
18 changed files with 45 additions and 38 deletions

View File

@@ -1098,7 +1098,7 @@ static int macio_config_cb (const pci_config_t *config)
phandle_t ph;
cell props[2];
sprintf(buf, "%s/interrupt-controller", config->path);
snprintf(buf, sizeof(buf), "%s/interrupt-controller", config->path);
REGISTER_NAMED_NODE(ob_pci_node, buf);
ph = find_dev(buf);
@@ -1505,9 +1505,11 @@ static void ob_scan_pci_bus(int bus, unsigned long *mem_base,
dbus=get_cur_dev();
if (pci_dev == NULL || pci_dev->name == NULL)
sprintf(config.path, "%s/pci%x,%x", path, vid, did);
snprintf(config.path, sizeof(config.path),
"%s/pci%x,%x", path, vid, did);
else
sprintf(config.path, "%s/%s", path, pci_dev->name);
snprintf(config.path, sizeof(config.path),
"%s/%s", path, pci_dev->name);
#ifdef CONFIG_DEBUG_PCI
printk("%s - ", config.path);
#endif