mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-26 14:13:18 -05:00
Make sp_parse() second argument (term) const
The term (filter) argument is strdup()'d and that copy gets destroyed by the parsing.
This commit is contained in:
parent
6ed689d1c9
commit
21209bd040
@ -710,7 +710,7 @@ PARSETREE sp_init(void) {
|
||||
* @param term term or phrase to parse
|
||||
* @returns 1 if successful, 0 if not
|
||||
*/
|
||||
int sp_parse(PARSETREE tree, char *term, int type) {
|
||||
int sp_parse(PARSETREE tree, const char *term, int type) {
|
||||
tree->term = strdup(term); /* will be destroyed by parsing */
|
||||
tree->current=tree->term;
|
||||
tree->token.token_id=T_BOF;
|
||||
|
@ -5,7 +5,7 @@
|
||||
typedef void* PARSETREE;
|
||||
|
||||
extern PARSETREE sp_init(void);
|
||||
extern int sp_parse(PARSETREE tree, char *term, int type);
|
||||
extern int sp_parse(PARSETREE tree, const char *term, int type);
|
||||
extern int sp_dispose(PARSETREE tree);
|
||||
extern char *sp_get_error(PARSETREE tree);
|
||||
extern char *sp_sql_clause(PARSETREE tree);
|
||||
|
Loading…
x
Reference in New Issue
Block a user