tools: replace sprintf with snprintf where applicable

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
This commit is contained in:
Keir Fraser committed 2008-06-12 15:41:15 +01:00
1 parent 697376dd73
commit 461990971f
11 files changed
+56 -38

No files matched your search

+6 -2
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.