MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getListPositionFromObjectOrReply

Function getListPositionFromObjectOrReply

app/redis-6.2.6/src/t_list.c:760–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

lmoveCommandFunction · 0.85
blmoveCommandFunction · 0.85

Calls 2

strcasecmpFunction · 0.85
addReplyErrorObjectFunction · 0.85

Tested by

no test coverage detected