Paul Cercueil / libiio

Dependencies:   libserialport libxml2

Revision:
3:d147beabba0e
Parent:
2:9eb0a9a1f958
Child:
4:ad69b39bf124
--- a/utilities.c	Tue Sep 20 15:34:31 2016 +0000
+++ b/utilities.c	Mon Jan 30 13:00:39 2017 +0000
@@ -67,7 +67,7 @@
 		return -ENOMEM;
 
 	setlocale(LC_NUMERIC, "C");
-	snprintf(buf, len, "%f", val);
+	iio_snprintf(buf, len, "%f", val);
 	setlocale(LC_NUMERIC, old_locale);
 	free(old_locale);
 	return 0;
@@ -135,7 +135,7 @@
 
 	old_locale = uselocale(new_locale);
 
-	snprintf(buf, len, "%f", val);
+	iio_snprintf(buf, len, "%f", val);
 
 	uselocale(old_locale);
 	freelocale(new_locale);
@@ -165,7 +165,7 @@
 #ifdef LOCALE_SUPPORT
 	return write_double_locale(buf, len, val);
 #else
-	snprintf(buf, len, "%f", val);
+	iio_snprintf(buf, len, "%f", val);
 	return 0;
 #endif
 }
@@ -194,7 +194,7 @@
 	int ret = 0xf7de;
 #endif
 	if (ret != 0)
-		snprintf(buf, len, "Unknown error %i", err);
+		iio_snprintf(buf, len, "Unknown error %i", err);
 }
 
 char *iio_strdup(const char *str)