aboutsummaryrefslogtreecommitdiffhomepage
path: root/libvo
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-05 22:01:07 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-07-05 22:01:07 +0000
commit4c4a1070febe5a140cac0357267af338b9852a7e (patch)
treed7ed87a85da0733f33ea47c25797f58c25e5e9fc /libvo
parentb3d59ea908ce87b3dc50bb9ba0ac81edd4765797 (diff)
Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy
instead of plain strlcat/strlcpy git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23723 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_dxr3.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 4e46403a30..b66a004433 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -148,6 +148,7 @@
#ifdef HAVE_X11
#include "x11_common.h"
#endif
+#include "libavutil/avstring.h"
#define SPU_SUPPORT
@@ -1125,13 +1126,13 @@ static int overlay_read_state(overlay_t *o, char *p)
int j;
if(!p) {
- strlcpy(fname, getenv("HOME"), sizeof( fname ));
- strlcat(fname,"/.overlay", sizeof( fname ));
+ av_strlcpy(fname, getenv("HOME"), sizeof( fname ));
+ av_strlcat(fname,"/.overlay", sizeof( fname ));
} else
- strlcpy(fname, p, sizeof( fname ));
+ av_strlcpy(fname, p, sizeof( fname ));
sprintf(tmp,"/res_%dx%dx%d",o->xres,o->yres,o->depth);
- strlcat(fname, tmp, sizeof( fname ));
+ av_strlcat(fname, tmp, sizeof( fname ));
if(!(fp=fopen(fname,"r")))
return -1;
@@ -1188,10 +1189,10 @@ static int overlay_write_state(overlay_t *o, char *p)
int i,j;
if(!p) {
- strlcpy(fname, getenv("HOME"), sizeof( fname ));
- strlcat(fname,"/.overlay", sizeof( fname ));
+ av_strlcpy(fname, getenv("HOME"), sizeof( fname ));
+ av_strlcat(fname,"/.overlay", sizeof( fname ));
} else
- strlcpy(fname, p, sizeof( fname ));
+ av_strlcpy(fname, p, sizeof( fname ));
if(access(fname, W_OK|X_OK|R_OK)) {
if(mkdir(fname,0766))
@@ -1199,7 +1200,7 @@ static int overlay_write_state(overlay_t *o, char *p)
}
sprintf(tmp,"/res_%dx%dx%d",o->xres,o->yres,o->depth);
- strlcat(fname, tmp, sizeof( fname ));
+ av_strlcat(fname, tmp, sizeof( fname ));
if(!(fp=fopen(fname,"w")))
return -1;