| 758 | } |
| 759 | |
| 760 | int getListPositionFromObjectOrReply(client *c, robj *arg, int *position) { |
| 761 | if (strcasecmp(szFromObj(arg),"right") == 0) { |
| 762 | *position = LIST_TAIL; |
| 763 | } else if (strcasecmp(szFromObj(arg),"left") == 0) { |
| 764 | *position = LIST_HEAD; |
| 765 | } else { |
| 766 | addReplyErrorObject(c,shared.syntaxerr); |
| 767 | return C_ERR; |
| 768 | } |
| 769 | return C_OK; |
| 770 | } |
| 771 | |
| 772 | robj *getStringObjectFromListPosition(int position) { |
| 773 | if (position == LIST_HEAD) { |
no test coverage detected