X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcsl%2Fcontext.cc;h=fa2500be61837d13df5ab223f63a6b4c76a356af;hb=cbb1b6155e959764f3d9915b7d98ed598384e0f6;hp=16852d5b6da16038b05bb8d0938387f2808fb39c;hpb=8a971e97129f99102be7452b91865325d58b4a70;p=awesomized%2Flibmemcached diff --git a/libmemcached/csl/context.cc b/libmemcached/csl/context.cc index 16852d5b..fa2500be 100644 --- a/libmemcached/csl/context.cc +++ b/libmemcached/csl/context.cc @@ -38,7 +38,7 @@ #include #include -void Context::abort(const char *error_arg, yytokentype last_token, const char *last_token_str) +void Context::abort(const char *error_arg, config_tokentype last_token, const char *last_token_str) { rc= MEMCACHED_PARSE_ERROR; (void)last_token; @@ -58,7 +58,7 @@ void Context::abort(const char *error_arg, yytokentype last_token, const char *l memcached_set_parser_error(*memc, MEMCACHED_AT, "unknown parsing error"); } -void Context::error(const char *error_arg, yytokentype last_token, const char *last_token_str) +void Context::error(const char *error_arg, config_tokentype last_token, const char *last_token_str) { rc= MEMCACHED_PARSE_ERROR; if (not error_arg) @@ -67,7 +67,7 @@ void Context::error(const char *error_arg, yytokentype last_token, const char *l return; } - if (error_arg and strcmp(error_arg, "memory exhausted") == 0) + if (strcmp(error_arg, "memory exhausted") == 0) { (void)memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_string_make_from_cstr(error_arg)); return; @@ -75,9 +75,7 @@ void Context::error(const char *error_arg, yytokentype last_token, const char *l // We now test if it is something other then a syntax error, if it we // return a generic message - if (error_arg and strcmp(error_arg, "syntax error") == 0) - { } - else if (error_arg) + if (strcmp(error_arg, "syntax error") != 0) { memcached_set_parser_error(*memc, MEMCACHED_AT, "Error occured during parsing (%s)", error_arg); return;