update: pass const string to update_enqueue()

Duplicate the path string within update.c, do not expect an allocated
string as parameter.
This commit is contained in:
Max Kellermann
2009-09-24 21:39:43 +02:00
parent 1cc4914b24
commit b0e1a3d34c
3 changed files with 20 additions and 14 deletions

View File

@@ -1018,12 +1018,12 @@ handle_playlistmove(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
static enum command_return
handle_update(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
{
char *path = NULL;
const char *path = NULL;
unsigned ret;
assert(argc <= 2);
if (argc == 2)
path = g_strdup(argv[1]);
path = argv[1];
ret = update_enqueue(path);
if (ret > 0) {