diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-17 19:42:34 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-17 19:42:34 +0200 |
commit | 07315d36030bd1cbe6acfeb3e8f60c49ba876a10 (patch) | |
tree | 9c74de4bb97507ece945576df7073a7a28f07674 /sql/sql_plugin_compat.h | |
parent | 4656060f118caba30912cca2557d72fcea307283 (diff) | |
download | mariadb-git-07315d36030bd1cbe6acfeb3e8f60c49ba876a10.tar.gz |
strmake_buf(X,Y) helper, equivalent to strmake(X,Y,sizeof(X)-1)
with a bit of lame protection against abuse.
Diffstat (limited to 'sql/sql_plugin_compat.h')
-rw-r--r-- | sql/sql_plugin_compat.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_plugin_compat.h b/sql/sql_plugin_compat.h index 8c6014f8dc6..5c7bb620575 100644 --- a/sql/sql_plugin_compat.h +++ b/sql/sql_plugin_compat.h @@ -16,9 +16,9 @@ /* old plugin api structures, used for backward compatibility */ #define upgrade_var(X) latest->X= X -#define upgrade_str(X) strmake(latest->X, X, sizeof(X)) +#define upgrade_str(X) strmake_buf(latest->X, X) #define downgrade_var(X) X= latest->X -#define downgrade_str(X) strmake(X, latest->X, sizeof(X)-1) +#define downgrade_str(X) strmake_buf(X, latest->X) /**************************************************************/ /* Authentication API, version 0x0100 *************************/ |