diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-29 13:33:37 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-29 13:33:37 +0000 |
commit | 7deec480ff68e446fe047925619df51d7fe8dacc (patch) | |
tree | 5ccaf4cba154244912a56e39003f8ac1bbd169f1 /gtk/menu.c | |
parent | 4562744a64da351cb05e8110ec5983e398af98dd (diff) |
Next attempt to cleanup some string functions, including:
strncpy -> g_strlcpy, strncat -> g_strlcat
svn path=/trunk/; revision=24504
Diffstat (limited to 'gtk/menu.c')
-rw-r--r-- | gtk/menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/menu.c b/gtk/menu.c index a79c598fb0..a00fe4191b 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -1324,8 +1324,8 @@ register_stat_menu_item( */ menupathlen = strlen(toolspath) + 1 + (p - name); menupath = g_malloc(menupathlen); - strncpy(menupath, toolspath, strlen(toolspath) + 1); - strncat(menupath, name, p - name); + g_strlcpy(menupath, toolspath, menupathlen); + g_strlcat(menupath, name, menupathlen); /* * Does there exist an entry with that path at this @@ -1363,8 +1363,8 @@ register_stat_menu_item( */ menupathlen = strlen(toolspath) + 1 + strlen(name); menupath = g_malloc(menupathlen); - strncpy(menupath, toolspath, strlen(toolspath) + 1); - strncat(menupath, name, strlen(name) + 1); + g_strlcpy(menupath, toolspath, menupathlen); + g_strlcat(menupath, name, menupathlen); /* * Construct an item factory entry for the item, and add it to |