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