summaryrefslogtreecommitdiffstats
path: root/ini/ini_config.c
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2012-12-23 13:49:56 -0500
committerOndrej Kos <okos@redhat.com>2013-01-24 08:34:40 +0100
commit833a46e384828be48c27898e755d6215eb5c4bb8 (patch)
treeeaf34cd463381efc40991151d41d9deec295f704 /ini/ini_config.c
parent57faa64667411a3d8eeeeff62b1e659a94ed29cf (diff)
downloadding-libs-833a46e384828be48c27898e755d6215eb5c4bb8.tar.gz
ding-libs-833a46e384828be48c27898e755d6215eb5c4bb8.tar.xz
ding-libs-833a46e384828be48c27898e755d6215eb5c4bb8.zip
Replacing sprintf with snprintf
Replaced sprintf in the unit test. Defined constants for sizes and used them. Wrpapped lines where noticed that they are longer than 80. Added comments to the places where sprintf is still used but it is safe to use.
Diffstat (limited to 'ini/ini_config.c')
-rw-r--r--ini/ini_config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ini/ini_config.c b/ini/ini_config.c
index 4265f38..c0a908b 100644
--- a/ini/ini_config.c
+++ b/ini/ini_config.c
@@ -911,6 +911,7 @@ int config_for_app_with_metadata(const char *application,
return error;
}
+ /* It is safe to use sprintf() here */
sprintf(file_name, "%s%s%s.conf", config_dir, SLASH, application);
TRACE_INFO_STRING("Opening file:", file_name);
/* Read specific file */