Free an sds string. No operation is performed if 's' is NULL. */
| 192 | |
| 193 | /* Free an sds string. No operation is performed if 's' is NULL. */ |
| 194 | void sdsfree(sds s) { |
| 195 | if (s == NULL) return; |
| 196 | s_free((char*)s-sdsHdrSize(s[-1])); |
| 197 | } |
| 198 | |
| 199 | /* Set the sds string length to the length as obtained with strlen(), so |
| 200 | * considering as content only up to the first null term character. |
no test coverage detected