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

Function unquoteCString

app/redis-6.2.6/src/redis-cli.c:772–786  ·  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

770
771/* Unquote a null-terminated string and return it as a binary-safe sds. */
772static sds unquoteCString(char *str) {
773 int count;
774 sds *unquoted = sdssplitargs(str, &count);
775 sds res = NULL;
776
777 if (unquoted && count == 1) {
778 res = unquoted[0];
779 unquoted[0] = NULL;
780 }
781
782 if (unquoted)
783 sdsfreesplitres(unquoted, count);
784
785 return res;
786}
787
788/* Send AUTH command to the server */
789static 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