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

Function getRangeLongFromObjectOrReply

app/redis-6.2.6/src/object.c:731–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729}
730
731int getRangeLongFromObjectOrReply(client *c, robj *o, long min, long max, long *target, const char *msg) {
732 if (getLongFromObjectOrReply(c, o, target, msg) != C_OK) return C_ERR;
733 if (*target < min || *target > max) {
734 if (msg != NULL) {
735 addReplyError(c,(char*)msg);
736 } else {
737 addReplyErrorFormat(c,"value is out of range, value must between %ld and %ld", min, max);
738 }
739 return C_ERR;
740 }
741 return C_OK;
742}
743
744int getPositiveLongFromObjectOrReply(client *c, robj *o, long *target, const char *msg) {
745 if (msg) {

Callers 4

replconfCommandFunction · 0.85
getIntFromObjectOrReplyFunction · 0.85
xautoclaimCommandFunction · 0.85

Calls 3

getLongFromObjectOrReplyFunction · 0.85
addReplyErrorFunction · 0.85
addReplyErrorFormatFunction · 0.85

Tested by

no test coverage detected