summaryrefslogtreecommitdiff
path: root/src/plugins/php
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-04-10 19:34:31 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-04-10 19:34:31 +0200
commit9d83cefdbf1c48d721bdf4f9b51dc894b1ca18c7 (patch)
tree82c9617bf60242e011c73d49e8800ef6d79acc56 /src/plugins/php
parentab61ddd4abfd379c16427e6a41dc5cb7553dd6d9 (diff)
downloadweechat-9d83cefdbf1c48d721bdf4f9b51dc894b1ca18c7.zip
php: fix return code of functions config_write_option and config_write_line
Diffstat (limited to 'src/plugins/php')
-rw-r--r--src/plugins/php/weechat-php-api.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c
index 521876425..e35724322 100644
--- a/src/plugins/php/weechat-php-api.c
+++ b/src/plugins/php/weechat-php-api.c
@@ -1577,7 +1577,6 @@ API_FUNC(config_write_option)
zend_string *z_config_file, *z_option;
struct t_config_file *config_file;
struct t_config_option *option;
- int result;
API_INIT_FUNC(1, "config_write_option", API_RETURN_ERROR);
if (zend_parse_parameters (ZEND_NUM_ARGS(),
@@ -1586,9 +1585,10 @@ API_FUNC(config_write_option)
config_file = (struct t_config_file *)API_STR2PTR(ZSTR_VAL(z_config_file));
option = (struct t_config_option *)API_STR2PTR(ZSTR_VAL(z_option));
- result = weechat_config_write_option (config_file, option);
- API_RETURN_INT(result);
+ weechat_config_write_option (config_file, option);
+
+ API_RETURN_OK;
}
API_FUNC(config_write_line)
@@ -1596,7 +1596,6 @@ API_FUNC(config_write_line)
zend_string *z_config_file, *z_option_name, *z_value;
struct t_config_file *config_file;
char *option_name, *value;
- int result;
API_INIT_FUNC(1, "config_write_line", API_RETURN_ERROR);
if (zend_parse_parameters (ZEND_NUM_ARGS(),
@@ -1607,11 +1606,12 @@ API_FUNC(config_write_line)
config_file = (struct t_config_file *)API_STR2PTR(ZSTR_VAL(z_config_file));
option_name = ZSTR_VAL(z_option_name);
value = ZSTR_VAL(z_value);
- result = weechat_config_write_line (config_file,
- (const char *)option_name,
- (const char *)value);
- API_RETURN_INT(result);
+ weechat_config_write_line (config_file,
+ (const char *)option_name,
+ (const char *)value);
+
+ API_RETURN_OK;
}
API_FUNC(config_write)