Unquote a null-terminated string and return it as a binary-safe sds. */
| 577 | |
| 578 | /* Unquote a null-terminated string and return it as a binary-safe sds. */ |
| 579 | static 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 */ |
| 596 | static int cliAuth(redisContext *ctx, char *user, char *auth) { |
no test coverage detected