summaryrefslogtreecommitdiffstats
path: root/devel/gnomevfs2/files
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-01-13 14:57:04 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2004-01-13 14:57:04 +0800
commit82e2c722bf4dd583198c3f45a638372e94136e01 (patch)
treebca1cd897f9c9a5458268624b329b1379e603cbe /devel/gnomevfs2/files
parentc9856a48b64c59d5158f3112dad0ec6b160943db (diff)
downloadmarcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.tar
marcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.tar.gz
marcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.tar.bz2
marcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.tar.lz
marcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.tar.xz
marcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.tar.zst
marcuscom-ports-82e2c722bf4dd583198c3f45a638372e94136e01.zip
Use a simple assignment to NUL out the last byte of a string instead of
memset. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1641 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/gnomevfs2/files')
-rw-r--r--devel/gnomevfs2/files/patch-libgnomevfs_xdgmime.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/devel/gnomevfs2/files/patch-libgnomevfs_xdgmime.c b/devel/gnomevfs2/files/patch-libgnomevfs_xdgmime.c
index 1bf100bf0..21ce33515 100644
--- a/devel/gnomevfs2/files/patch-libgnomevfs_xdgmime.c
+++ b/devel/gnomevfs2/files/patch-libgnomevfs_xdgmime.c
@@ -1,5 +1,5 @@
---- libgnomevfs/xdgmime.c.orig Tue Jan 13 01:20:05 2004
-+++ libgnomevfs/xdgmime.c Tue Jan 13 01:20:35 2004
+--- libgnomevfs/xdgmime.c.orig Wed Jan 7 13:44:02 2004
++++ libgnomevfs/xdgmime.c Tue Jan 13 01:55:41 2004
@@ -97,7 +97,7 @@
xdg_data_dirs = getenv ("XDG_DATA_DIRS");
@@ -9,13 +9,14 @@
ptr = xdg_data_dirs;
-@@ -121,7 +121,8 @@
+@@ -121,8 +121,9 @@
len = end_ptr - ptr;
else
len = end_ptr - ptr + 1;
- dir = malloc (len);
+ dir = malloc (len + 1);
-+ memset (dir, 0, len + 1);
strncpy (dir, ptr, len);
++ dir[len] = '\0';
_xdg_mime_init_from_directory (dir);
free (dir);
+