aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-02-19 07:58:05 +0000
committerEric Wong <normalperson@yhbt.net>2007-02-19 07:58:05 +0000
commit658b8f53df5e13711632a36741e7c2b7a46ae8aa (patch)
treef448b69b3a6bb12dfcabf3bf7c77e4b9956e1783 /src/player.c
parent772dc6bc66e401bb6e1c27b120d6bdcee70aa193 (diff)
downloadmpd-658b8f53df5e13711632a36741e7c2b7a46ae8aa.tar.gz
mpd-658b8f53df5e13711632a36741e7c2b7a46ae8aa.tar.xz
mpd-658b8f53df5e13711632a36741e7c2b7a46ae8aa.zip
More (v)snprintf-related buffer over-allocations removed
Also took out an unnecessary memset in getPlayerErrorStr git-svn-id: https://svn.musicpd.org/mpd/trunk@5396 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c
index 57ed1f2ef..25dbe777f 100644
--- a/src/player.c
+++ b/src/player.c
@@ -303,8 +303,8 @@ char *getPlayerErrorStr(void)
int errorlen = MAXPATHLEN + 1024;
PlayerControl *pc = &(getPlayerData()->playerControl);
- error = xrealloc(error, errorlen + 1);
- memset(error, 0, errorlen + 1);
+ error = xrealloc(error, errorlen);
+ error[0] = '\0';
switch (pc->error) {
case PLAYER_ERROR_FILENOTFOUND: