aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenmon
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-12 15:41:15 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-12 15:41:15 +0100
commit461990971f96763861501483b0316fb13b670fa4 (patch)
treefc40bc1aa8c67a4a3e1c7bfef3b75f2a4559c339 /tools/xenmon
parent697376dd738b51c7046e00267a1844e0d02bbf62 (diff)
downloadxen-461990971f96763861501483b0316fb13b670fa4.tar.gz
xen-461990971f96763861501483b0316fb13b670fa4.tar.bz2
xen-461990971f96763861501483b0316fb13b670fa4.zip
tools: replace sprintf with snprintf where applicable
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'tools/xenmon')
-rw-r--r--tools/xenmon/xenbaked.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c
index 35ba8e40e9..4adc69ebc4 100644
--- a/tools/xenmon/xenbaked.c
+++ b/tools/xenmon/xenbaked.c
@@ -749,9 +749,13 @@ void qos_init_domain(int domid, int idx)
new_qos->domain_info[idx].blocked_start_time = 0;
new_qos->domain_info[idx].id = domid;
if (domid == IDLE_DOMAIN_ID)
- sprintf(new_qos->domain_info[idx].name, "Idle Task%d", global_cpu);
+ snprintf(new_qos->domain_info[idx].name,
+ sizeof(new_qos->domain_info[idx].name),
+ "Idle Task%d", global_cpu);
else
- sprintf(new_qos->domain_info[idx].name, "Domain#%d", domid);
+ snprintf(new_qos->domain_info[idx].name,
+ sizeof(new_qos->domain_info[idx].name),
+ "Domain#%d", domid);
for (i=0; i<NSAMPLES; i++) {
new_qos->qdata[i].ns_gotten[idx] = 0;