summary refs log tree commit diff stats
path: root/plugins/sysinfo/pci.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-17 18:49:59 -0500
committerTingPing <tingping@tingping.se>2014-12-28 06:47:23 -0500
commit95febd978c9f5b0c1eb76b3a2c506ef540087ce3 (patch)
tree4a8dedf6edc54cb37a7917548306c4f07cd23a8a /plugins/sysinfo/pci.c
parent3f855f07f5d2e9a08a586436719358c40a46f29d (diff)
Fix building as c89
Diffstat (limited to 'plugins/sysinfo/pci.c')
-rw-r--r--plugins/sysinfo/pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/sysinfo/pci.c b/plugins/sysinfo/pci.c
index d0f8d811..bda4888b 100644
--- a/plugins/sysinfo/pci.c
+++ b/plugins/sysinfo/pci.c
@@ -99,8 +99,8 @@ int pci_find_by_class(u16 *class, char *vendor, char *device)
     		/* Acquire vendor & device ID if the class matches */
     		if(get_conf_word(d, PCI_CLASS_DEVICE) == *class) {
       			nomatch = 0;
-			snprintf(vendor,7,"%04x",p->vendor_id);
-			snprintf(device,7,"%04x",p->device_id);
+			g_snprintf(vendor,7,"%04x",p->vendor_id);
+			g_snprintf(device,7,"%04x",p->device_id);
       			break;
     		}
   	}
@@ -122,7 +122,7 @@ void pci_find_fullname(char *fullname, char *vendor, char *device)
 	fp = fopen (buffer, "r");
 
 	if(fp == NULL) {
-		snprintf(fullname, bsize, "%s:%s", vendor, device);
+		g_snprintf(fullname, bsize, "%s:%s", vendor, device);
 		sysinfo_print_error ("pci.ids file not found! You might want to adjust your pciids setting with /SYSINFO SET pciids (you can query its current value with /SYSINFO LIST).\n");
 		return;
 	}
@@ -151,8 +151,8 @@ void pci_find_fullname(char *fullname, char *vendor, char *device)
  		}
 	}
 	if (cardfound == 1)
-		snprintf(fullname, bsize, "%s %s", vendorname, devicename);
+		g_snprintf(fullname, bsize, "%s %s", vendorname, devicename);
 	else
-		snprintf(fullname, bsize, "%s:%s", vendor, device);	
+		g_snprintf(fullname, bsize, "%s:%s", vendor, device);	
 	fclose(fp);
 }