Code cleanup

This commit is contained in:
Pierre Pronchery 2018-09-09 19:13:24 +02:00
parent d8cae4caa0
commit 60360d1418

View File

@ -45,19 +45,19 @@ static AsmArchInstruction const _eth_instructions[] =
#include "null.ins" #include "null.ins"
}; };
struct _AsmArchPlugin typedef struct _AsmArchPlugin
{ {
AsmArchPluginHelper * helper; AsmArchPluginHelper * helper;
}; } EthArchPlugin;
/* prototypes */ /* prototypes */
/* plug-in */ /* plug-in */
static AsmArchPlugin * _eth_init(AsmArchPluginHelper * helper); static EthArchPlugin * _eth_init(AsmArchPluginHelper * helper);
static void _eth_destroy(AsmArchPlugin * plugin); static void _eth_destroy(EthArchPlugin * plugin);
static int _eth_decode(AsmArchPlugin * plugin, static int _eth_decode(EthArchPlugin * plugin,
AsmArchInstructionCall * call); AsmArchInstructionCall * call);
static int _eth_encode(AsmArchPlugin * plugin, static int _eth_encode(EthArchPlugin * plugin,
AsmArchPrefix const * prefix, AsmArchPrefix const * prefix,
AsmArchInstruction const * instruction, AsmArchInstruction const * instruction,
AsmArchInstructionCall const * call); AsmArchInstructionCall const * call);
@ -84,9 +84,9 @@ AsmArchPluginDefinition arch_plugin =
/* functions */ /* functions */
/* plug-in */ /* plug-in */
/* eth_init */ /* eth_init */
static AsmArchPlugin * _eth_init(AsmArchPluginHelper * helper) static EthArchPlugin * _eth_init(AsmArchPluginHelper * helper)
{ {
AsmArchPlugin * plugin; EthArchPlugin * plugin;
if((plugin = object_new(sizeof(*plugin))) == NULL) if((plugin = object_new(sizeof(*plugin))) == NULL)
return NULL; return NULL;
@ -96,14 +96,14 @@ static AsmArchPlugin * _eth_init(AsmArchPluginHelper * helper)
/* eth_destroy */ /* eth_destroy */
static void _eth_destroy(AsmArchPlugin * plugin) static void _eth_destroy(EthArchPlugin * plugin)
{ {
object_delete(plugin); object_delete(plugin);
} }
/* eth_decode */ /* eth_decode */
static int _eth_decode(AsmArchPlugin * plugin, static int _eth_decode(EthArchPlugin * plugin,
AsmArchInstructionCall * call) AsmArchInstructionCall * call)
{ {
AsmArchPluginHelper * helper = plugin->helper; AsmArchPluginHelper * helper = plugin->helper;
@ -124,7 +124,7 @@ static int _eth_decode(AsmArchPlugin * plugin,
/* eth_encode */ /* eth_encode */
static int _eth_encode(AsmArchPlugin * plugin, static int _eth_encode(EthArchPlugin * plugin,
AsmArchPrefix const * prefix, AsmArchPrefix const * prefix,
AsmArchInstruction const * instruction, AsmArchInstruction const * instruction,
AsmArchInstructionCall const * call) AsmArchInstructionCall const * call)