diff options
author | Max Kellermann <max@duempel.org> | 2009-09-24 21:39:43 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-09-24 21:39:43 +0200 |
commit | b0e1a3d34c9720db7acd244fa54321b3c2c982c6 (patch) | |
tree | 5515b8a62059ea34e70c5c362710284b1fae9af9 /src/command.c | |
parent | 1cc4914b246b861035519818f27de9876285b4d1 (diff) | |
download | mpd-b0e1a3d34c9720db7acd244fa54321b3c2c982c6.tar.gz mpd-b0e1a3d34c9720db7acd244fa54321b3c2c982c6.tar.xz mpd-b0e1a3d34c9720db7acd244fa54321b3c2c982c6.zip |
update: pass const string to update_enqueue()
Duplicate the path string within update.c, do not expect an allocated
string as parameter.
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c index ee25c1d85..8298a4048 100644 --- a/src/command.c +++ b/src/command.c @@ -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) { |