diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-05 20:16:24 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-04-05 20:16:24 +0000 |
commit | 07ff988ba1510087391daf7f2c459af6f3548eb2 (patch) | |
tree | 37ef9f5514c5ef4487309b50f2d8f80349691905 /ace/Sched_Params.cpp | |
parent | 80cd5a4e4c38c1eb2233862e4485d4577bbb6011 (diff) | |
download | ATCD-07ff988ba1510087391daf7f2c459af6f3548eb2.tar.gz |
moved memsets of pcinfo so that entire pcinfo structure is zeroed out, to _really_ avoid Purify warnings
Diffstat (limited to 'ace/Sched_Params.cpp')
-rw-r--r-- | ace/Sched_Params.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ace/Sched_Params.cpp b/ace/Sched_Params.cpp index dbc83e0a55d..adca11a096f 100644 --- a/ace/Sched_Params.cpp +++ b/ace/Sched_Params.cpp @@ -44,10 +44,10 @@ ACE_Sched_Params::priority_min (const Policy policy, { // Get the priority class ID and attributes. pcinfo_t pcinfo; - ACE_OS::strcpy (pcinfo.pc_clname, "TS"); // The following is just to avoid Purify warnings about unitialized // memory reads. - ACE_OS::memset (pcinfo.pc_clinfo, 0, PC_CLINFOSZ); + ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); + ACE_OS::strcpy (pcinfo.pc_clname, "TS"); if (::priocntl (P_ALL /* ignored */, P_MYID /* ignored */, @@ -126,11 +126,11 @@ ACE_Sched_Params::priority_max (const Policy policy, // Get the priority class ID and attributes. pcinfo_t pcinfo; - ACE_OS::strcpy (pcinfo.pc_clname, - policy == ACE_SCHED_OTHER ? "TS" : "RT"); // The following is just to avoid Purify warnings about unitialized // memory reads. - ACE_OS::memset (pcinfo.pc_clinfo, 0, PC_CLINFOSZ); + ACE_OS::memset (&pcinfo, 0, sizeof pcinfo); + ACE_OS::strcpy (pcinfo.pc_clname, + policy == ACE_SCHED_OTHER ? "TS" : "RT"); if (::priocntl (P_ALL /* ignored */, P_MYID /* ignored */, |