Merge authors: Crise (markuwil) ------------------------------------------------------------ revno: 9 [merge] committer: crise <cr...@apexdc.net> branch nick: ExamplePlugin timestamp: Mon 2012-12-31 05:58:02 +0200 message: merge modified: pluginsdk/Config.c
-- lp:~dcplusplus-team/dcpp-plugin-sdk-c/ExamplePlugin https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-c/ExamplePlugin Your team Dcplusplus-team is subscribed to branch lp:~dcplusplus-team/dcpp-plugin-sdk-c/ExamplePlugin. To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcpp-plugin-sdk-c/ExamplePlugin/+edit-subscription
=== modified file 'pluginsdk/Config.c' --- pluginsdk/Config.c 2012-12-27 21:18:53 +0000 +++ pluginsdk/Config.c 2012-12-31 03:47:16 +0000 @@ -27,12 +27,12 @@ char* guid; Bool DCAPI init_cfg(DCCorePtr core, const char* pluginGuid) { - config = (DCConfigPtr)core->query_interface(DCINTF_CONFIG, DCINTF_CONFIG_VER); - - int len = strlen(pluginGuid) + 1; + size_t len = strlen(pluginGuid) + 1; guid = (char*)memset(malloc(len), 0, len); strncpy(guid, pluginGuid, len); + config = (DCConfigPtr)core->query_interface(DCINTF_CONFIG, DCINTF_CONFIG_VER); + return config ? True : False; } @@ -42,7 +42,7 @@ char* DCAPI get_cfg(const char* name) { ConfigStrPtr val = (ConfigStrPtr)config->get_cfg(guid, name, CFG_TYPE_STRING); - int len = strlen(val->value) + 1; + size_t len = strlen(val->value) + 1; char* value = (char*)memset(malloc(len), 0, len); strncpy(value, val->value, len);
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp