| 424 | } |
| 425 | |
| 426 | void smismemberCommand(client *c) { |
| 427 | robj_roptr set; |
| 428 | int j; |
| 429 | |
| 430 | /* Don't abort when the key cannot be found. Non-existing keys are empty |
| 431 | * sets, where SMISMEMBER should respond with a series of zeros. */ |
| 432 | set = lookupKeyRead(c->db,c->argv[1]); |
| 433 | if (set && checkType(c,set,OBJ_SET)) return; |
| 434 | |
| 435 | addReplyArrayLen(c,c->argc - 2); |
| 436 | |
| 437 | for (j = 2; j < c->argc; j++) { |
| 438 | if (set && setTypeIsMember(set,szFromObj(c->argv[j]))) |
| 439 | addReply(c,shared.cone); |
| 440 | else |
| 441 | addReply(c,shared.czero); |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | void scardCommand(client *c) { |
| 446 | robj_roptr o; |
nothing calls this directly
no test coverage detected