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

Function unquoteCString

src/redis-cli.c:579–593  ·  view source on GitHub ↗

Unquote a null-terminated string and return it as a binary-safe sds. */

Source from the content-addressed store, hash-verified

577
578/* Unquote a null-terminated string and return it as a binary-safe sds. */
579static sds unquoteCString(char *str) {
580 int count;
581 sds *unquoted = sdssplitargs(str, &count);
582 sds res = NULL;
583
584 if (unquoted && count == 1) {
585 res = unquoted[0];
586 unquoted[0] = NULL;
587 }
588
589 if (unquoted)
590 sdsfreesplitres(unquoted, count);
591
592 return res;
593}
594
595/* Send AUTH command to the server */
596static int cliAuth(redisContext *ctx, char *user, char *auth) {

Callers 2

parseOptionsFunction · 0.85
getSdsArrayFromArgvFunction · 0.85

Calls 2

sdssplitargsFunction · 0.85
sdsfreesplitresFunction · 0.85

Tested by

no test coverage detected