use countof()
This commit is contained in:
@@ -58,7 +58,8 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
|||||||
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
||||||
return TNC_RESULT_ALREADY_INITIALIZED;
|
return TNC_RESULT_ALREADY_INITIALIZED;
|
||||||
}
|
}
|
||||||
imc_os = imc_agent_create(imc_name, msg_types, 1, imc_id, actual_version);
|
imc_os = imc_agent_create(imc_name, msg_types, countof(msg_types),
|
||||||
|
imc_id, actual_version);
|
||||||
if (!imc_os)
|
if (!imc_os)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
|||||||
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
||||||
return TNC_RESULT_ALREADY_INITIALIZED;
|
return TNC_RESULT_ALREADY_INITIALIZED;
|
||||||
}
|
}
|
||||||
imc_scanner = imc_agent_create(imc_name, msg_types, 1, imc_id, actual_version);
|
imc_scanner = imc_agent_create(imc_name, msg_types, countof(msg_types),
|
||||||
|
imc_id, actual_version);
|
||||||
if (!imc_scanner)
|
if (!imc_scanner)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
|||||||
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
DBG1(DBG_IMC, "IMC \"%s\" has already been initialized", imc_name);
|
||||||
return TNC_RESULT_ALREADY_INITIALIZED;
|
return TNC_RESULT_ALREADY_INITIALIZED;
|
||||||
}
|
}
|
||||||
imc_test = imc_agent_create(imc_name, msg_types, 1, imc_id, actual_version);
|
imc_test = imc_agent_create(imc_name, msg_types, countof(msg_types),
|
||||||
|
imc_id, actual_version);
|
||||||
if (!imc_test)
|
if (!imc_test)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
|||||||
DBG1(DBG_IMV, "IMV \"%s\" has already been initialized", imv_name);
|
DBG1(DBG_IMV, "IMV \"%s\" has already been initialized", imv_name);
|
||||||
return TNC_RESULT_ALREADY_INITIALIZED;
|
return TNC_RESULT_ALREADY_INITIALIZED;
|
||||||
}
|
}
|
||||||
imv_os = imv_agent_create(imv_name, msg_types, 1, imv_id, actual_version);
|
imv_os = imv_agent_create(imv_name, msg_types, countof(msg_types),
|
||||||
|
imv_id, actual_version);
|
||||||
if (!imv_os)
|
if (!imv_os)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -126,7 +126,8 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
|||||||
DBG1(DBG_IMV, "IMV \"%s\" has already been initialized", imv_name);
|
DBG1(DBG_IMV, "IMV \"%s\" has already been initialized", imv_name);
|
||||||
return TNC_RESULT_ALREADY_INITIALIZED;
|
return TNC_RESULT_ALREADY_INITIALIZED;
|
||||||
}
|
}
|
||||||
imv_scanner = imv_agent_create(imv_name, msg_types, 1, imv_id, actual_version);
|
imv_scanner = imv_agent_create(imv_name, msg_types, countof(msg_types),
|
||||||
|
imv_id, actual_version);
|
||||||
if (!imv_scanner)
|
if (!imv_scanner)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
|||||||
DBG1(DBG_IMV, "IMV \"%s\" has already been initialized", imv_name);
|
DBG1(DBG_IMV, "IMV \"%s\" has already been initialized", imv_name);
|
||||||
return TNC_RESULT_ALREADY_INITIALIZED;
|
return TNC_RESULT_ALREADY_INITIALIZED;
|
||||||
}
|
}
|
||||||
imv_test = imv_agent_create(imv_name, msg_types, 1, imv_id, actual_version);
|
imv_test = imv_agent_create(imv_name, msg_types, countof(msg_types),
|
||||||
|
imv_id, actual_version);
|
||||||
if (!imv_test)
|
if (!imv_test)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include <imc/imc_agent.h>
|
#include <imc/imc_agent.h>
|
||||||
#include <imc/imc_msg.h>
|
#include <imc/imc_msg.h>
|
||||||
#include <pa_tnc/pa_tnc_msg.h>
|
|
||||||
#include <ietf/ietf_attr.h>
|
#include <ietf/ietf_attr.h>
|
||||||
#include <ietf/ietf_attr_pa_tnc_error.h>
|
#include <ietf/ietf_attr_pa_tnc_error.h>
|
||||||
#include <ietf/ietf_attr_product_info.h>
|
#include <ietf/ietf_attr_product_info.h>
|
||||||
@@ -77,8 +76,8 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
|||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
}
|
}
|
||||||
imc_attestation = imc_agent_create(imc_name, msg_types, 1, imc_id,
|
imc_attestation = imc_agent_create(imc_name, msg_types, countof(msg_types),
|
||||||
actual_version);
|
imc_id, actual_version);
|
||||||
if (!imc_attestation)
|
if (!imc_attestation)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <imv/imv_agent.h>
|
#include <imv/imv_agent.h>
|
||||||
#include <imv/imv_msg.h>
|
#include <imv/imv_msg.h>
|
||||||
#include <pa_tnc/pa_tnc_msg.h>
|
|
||||||
#include <ietf/ietf_attr.h>
|
#include <ietf/ietf_attr.h>
|
||||||
#include <ietf/ietf_attr_pa_tnc_error.h>
|
#include <ietf/ietf_attr_pa_tnc_error.h>
|
||||||
#include <ietf/ietf_attr_product_info.h>
|
#include <ietf/ietf_attr_product_info.h>
|
||||||
@@ -96,8 +95,8 @@ TNC_Result TNC_IMV_Initialize(TNC_IMVID imv_id,
|
|||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
}
|
}
|
||||||
imv_attestation = imv_agent_create(imv_name, msg_types, 2, imv_id,
|
imv_attestation = imv_agent_create(imv_name, msg_types, countof(msg_types),
|
||||||
actual_version);
|
imv_id, actual_version);
|
||||||
if (!imv_attestation)
|
if (!imv_attestation)
|
||||||
{
|
{
|
||||||
return TNC_RESULT_FATAL;
|
return TNC_RESULT_FATAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user