summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem.c4
-rw-r--r--src/strings.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mem.c b/src/mem.c
index a619583..a8da400 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -156,7 +156,7 @@ memrec_add_var(memrec_t *memrec, const char *filename, unsigned long line, void
D_MEM(("Storing as pointer #%lu at %10p (from %10p).\n", memrec->cnt, p, memrec->ptrs));
p->ptr = ptr;
p->size = size;
- spiftool_safe_strncpy(p->file, filename, LIBAST_FNAME_LEN);
+ spiftool_safe_strncpy(p->file, SPIF_CONST_CAST(charptr) filename, LIBAST_FNAME_LEN);
p->file[LIBAST_FNAME_LEN] = 0;
p->line = line;
}
@@ -267,7 +267,7 @@ memrec_chg_var(memrec_t *memrec, const char *var, const char *filename, unsigned
D_MEM(("Changing variable %s (%10p, %lu -> %10p, %lu)\n", var, oldp, p->size, newp, size));
p->ptr = newp;
p->size = size;
- spiftool_safe_strncpy(p->file, filename, LIBAST_FNAME_LEN);
+ spiftool_safe_strncpy(p->file, SPIF_CONST_CAST(charptr) filename, LIBAST_FNAME_LEN);
p->line = line;
}
diff --git a/src/strings.c b/src/strings.c
index 4081c06..24ae00f 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -232,7 +232,7 @@ spiftool_safe_strncat(spif_charptr_t dest, const spif_charptr_t src, spif_int32_
if ((len < 0) || (len >= size)) {
return FALSE;
} else {
- return spiftool_safe_strncpy(dest + len, size - len, src);
+ return spiftool_safe_strncpy(dest + len, src, size - len);
}
}