summaryrefslogtreecommitdiff
path: root/plugin/plugin.c
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2009-06-24 21:51:59 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2010-01-02 22:30:10 +0100
commit20f3db961b88a6f4a65b99b48260a616634e398b (patch)
tree54d107b234e8fb0bed9ec0490e8710d9056cecff /plugin/plugin.c
parent0a00154cc95c1c3238bfba745f2e7427b64aa338 (diff)
downloadfribid-20f3db961b88a6f4a65b99b48260a616634e398b.tar.gz
fribid-20f3db961b88a6f4a65b99b48260a616634e398b.tar.bz2
fribid-20f3db961b88a6f4a65b99b48260a616634e398b.zip
Fixed the return values of GetParam and PerformAction
Diffstat (limited to 'plugin/plugin.c')
-rw-r--r--plugin/plugin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugin/plugin.c b/plugin/plugin.c
index ebf75c8..3dc3e7b 100644
--- a/plugin/plugin.c
+++ b/plugin/plugin.c
@@ -85,12 +85,10 @@ static char **getParamPointer(Plugin *plugin, const char *name) {
}
char *sign_getParam(Plugin *plugin, const char *name) {
- char **valuePtr = getParamPointer(plugin, name);
-
- char *value = NULL;
- if (valuePtr && *valuePtr) value = strdup(*valuePtr);
+ const char **valuePtr = getParamPointer(plugin, name);
- return (value != NULL ? value : strdup(""));
+ if (valuePtr && *valuePtr) return strdup(*valuePtr);
+ else return NULL;
}
bool sign_setParam(Plugin *plugin, const char *name, const char *value) {