summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-04-02 12:26:27 +0200
committerhwspeedy <ns@bigbear.dk>2024-04-02 12:26:27 +0200
commitdeccdc2445d8cf30d1afc321ea473b8115f51f8f (patch)
treefd48ea41c94b1f7a77b332f31e1341bcffa0984f /deps
parent15f5f0b7660ddf232eb43ef6bf20e8ad94d9803d (diff)
FIX GCC warnings
Diffstat (limited to 'deps')
-rw-r--r--deps/sysobj_early/src/nice_name.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/deps/sysobj_early/src/nice_name.c b/deps/sysobj_early/src/nice_name.c
index fdb4557c..2e54552a 100644
--- a/deps/sysobj_early/src/nice_name.c
+++ b/deps/sysobj_early/src/nice_name.c
@@ -35,12 +35,12 @@ gboolean str_shorten(gchar *str, const gchar *find, const gchar *replace) {
gchar *p = strstr(str, find);
if (p) {
if(lr==lf){
- strncpy(p, replace, lf);
+ memcpy(p, replace, lf);
} else {
if (lr > lf) lr = lf;
gchar *buff = g_strnfill(lf, ' ');
- if(lr) strncpy(buff, replace, lr);
- strncpy(p, buff, lf);
+ if(lr) memcpy(buff, replace, lr);
+ memcpy(p, buff, lf);
g_free(buff);
}
return TRUE;
@@ -55,12 +55,12 @@ gboolean str_shorten_anycase(gchar *str, const gchar *find, const gchar *replace
gchar *p = strcasestr(str, find);
if (p) {
if(lr==lf){
- strncpy(p, replace, lf);
+ memcpy(p, replace, lf);
} else {
if (lr > lf) lr = lf;
gchar *buff = g_strnfill(lf, ' ');
- if(lr) strncpy(buff, replace, lr);
- strncpy(p, buff, lf);
+ if(lr) memcpy(buff, replace, lr);
+ memcpy(p, buff, lf);
g_free(buff);
}
return TRUE;