MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getRangeLongFromObjectOrReply

Function getRangeLongFromObjectOrReply

src/object.cpp:815–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

813}
814
815int getRangeLongFromObjectOrReply(client *c, robj *o, long min, long max, long *target, const char *msg) {
816 if (getLongFromObjectOrReply(c, o, target, msg) != C_OK) return C_ERR;
817 if (*target < min || *target > max) {
818 if (msg != NULL) {
819 addReplyError(c,(char*)msg);
820 } else {
821 addReplyErrorFormat(c,"value is out of range, value must between %ld and %ld", min, max);
822 }
823 return C_ERR;
824 }
825 return C_OK;
826}
827
828int getPositiveLongFromObjectOrReply(client *c, robj *o, long *target, const char *msg) {
829 if (msg) {

Callers 7

hrandfieldCommandFunction · 0.85
getIntFromObjectOrReplyFunction · 0.85
replconfCommandFunction · 0.85
zrandmemberCommandFunction · 0.85
xautoclaimCommandFunction · 0.85

Calls 3

getLongFromObjectOrReplyFunction · 0.85
addReplyErrorFunction · 0.85
addReplyErrorFormatFunction · 0.85

Tested by

no test coverage detected