summaryrefslogtreecommitdiff
path: root/src/arch/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/instruction.c')
-rw-r--r--src/arch/instruction.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/arch/instruction.c b/src/arch/instruction.c
index d9d7693..c3c32dc 100644
--- a/src/arch/instruction.c
+++ b/src/arch/instruction.c
@@ -663,7 +663,7 @@ bool g_arch_instruction_has_sources(const GArchInstruction *instr)
/******************************************************************************
* *
* Paramètres : instr = instruction dont les informations sont à consulter. *
-* dests = liste des instructions de destination. [OUT] *
+* srcs = liste des instructions d'origine. [OUT] *
* types = liste des types de liens présents. [OUT] *
* *
* Description : Fournit les origines d'une instruction donnée. *
@@ -674,9 +674,10 @@ bool g_arch_instruction_has_sources(const GArchInstruction *instr)
* *
******************************************************************************/
-size_t g_arch_instruction_get_sources(const GArchInstruction *instr, GArchInstruction ***dests, InstructionLinkType **types)
+size_t g_arch_instruction_get_sources(const GArchInstruction *instr, GArchInstruction ***srcs, InstructionLinkType **types)
{
- *dests = instr->from;
+ if (srcs != NULL)
+ *srcs = instr->from;
if (types != NULL)
*types = instr->from_types;
@@ -724,7 +725,8 @@ bool g_arch_instruction_has_destinations(const GArchInstruction *instr)
size_t g_arch_instruction_get_destinations(const GArchInstruction *instr, GArchInstruction ***dests, InstructionLinkType **types, link_extra_info **info)
{
- *dests = instr->to;
+ if (dests != NULL)
+ *dests = instr->to;
if (types != NULL)
*types = instr->to_types;