Mercurial > mplayer.hg
changeset 33432:4ecf8f0b024c
Simplify by using av_strlcpy.
author | reimar |
---|---|
date | Sun, 29 May 2011 12:23:38 +0000 |
parents | cdc8cec139ad |
children | a010c375947c |
files | stream/stream_cue.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_cue.c Sun May 29 12:16:13 2011 +0000 +++ b/stream/stream_cue.c Sun May 29 12:23:38 2011 +0000 @@ -224,9 +224,8 @@ break; case 2: /* now I would say the whole filename is shit, build our own */ - strncpy(s, cue_filename, strlen(cue_filename) - 3 ); - s[strlen(cue_filename) - 3] = '\0'; - strcat(s, "bin"); + av_strlcpy(s, cue_filename, strlen(cue_filename) - 3 ); + strcat(s, ".bin"); cur_name = s; break; case 3: @@ -236,9 +235,8 @@ break; case 4: /* now I would say the whole filename is shit, build our own */ - strncpy(s, cue_filename, strlen(cue_filename) - 3 ); - s[strlen(cue_filename) - 3] = '\0'; - strcat(s, "img"); + av_strlcpy(s, cue_filename, strlen(cue_filename) - 3 ); + strcat(s, ".img"); cur_name = s; break; case 5: