| 835 | } |
| 836 | |
| 837 | bool redis_string::incoper(const char* cmd, const char* key, long long int* n, |
| 838 | long long int* result) |
| 839 | { |
| 840 | size_t argc = 2; |
| 841 | const char* argv[3]; |
| 842 | size_t lens[3]; |
| 843 | |
| 844 | argv[0] = cmd; |
| 845 | lens[0] = strlen(cmd); |
| 846 | |
| 847 | argv[1] = key; |
| 848 | lens[1] = strlen(key); |
| 849 | |
| 850 | char buf[INT64_LEN]; |
| 851 | if (n != NULL) { |
| 852 | (void) acl_i64toa(*n, buf, sizeof(buf)); |
| 853 | argv[2] = buf; |
| 854 | lens[2] = strlen(buf); |
| 855 | argc++; |
| 856 | } |
| 857 | |
| 858 | hash_slot(key); |
| 859 | build_request(argc, argv, lens); |
| 860 | |
| 861 | bool success; |
| 862 | if (result != NULL) { |
| 863 | *result = get_number64(&success); |
| 864 | } else { |
| 865 | (void) get_number64(&success); |
| 866 | } |
| 867 | return success; |
| 868 | } |
| 869 | |
| 870 | } // namespace acl |
| 871 |
nothing calls this directly
no test coverage detected