| 121 | } |
| 122 | |
| 123 | bool RedisRequest::AddCommandWithArgs(const char* fmt, ...) { |
| 124 | if (_has_error) { |
| 125 | return false; |
| 126 | } |
| 127 | va_list ap; |
| 128 | va_start(ap, fmt); |
| 129 | const butil::Status st = RedisCommandFormatV(&_buf, fmt, ap); |
| 130 | va_end(ap); |
| 131 | if (st.ok()) { |
| 132 | ++_ncommand; |
| 133 | return true; |
| 134 | } else { |
| 135 | CHECK(st.ok()) << st; |
| 136 | _has_error = true; |
| 137 | return false; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | bool RedisRequest::AddCommandV(const char* fmt, va_list ap) { |
| 142 | if (_has_error) { |
nothing calls this directly
no test coverage detected