summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Alex Riesen <fork0@t-online.de>2006-09-28 21:12:55 +0200
committerLibravatar Junio C Hamano <junkio@cox.net>2006-09-28 18:25:36 -0700
commita28383770ec44357bfce4af834dc09bf14d9410e (patch)
tree79afc50f91df535052442aba1ca67667781b1827
parentFix approxidate() to understand more extended numbers (diff)
downloadtgif-a28383770ec44357bfce4af834dc09bf14d9410e.tar.xz
do not discard constness in interp_set_entry value argument
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--interpolate.c4
-rw-r--r--interpolate.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/interpolate.c b/interpolate.c
index 62701d8435..5d9d1889f0 100644
--- a/interpolate.c
+++ b/interpolate.c
@@ -8,10 +8,10 @@
#include "interpolate.h"
-void interp_set_entry(struct interp *table, int slot, char *value)
+void interp_set_entry(struct interp *table, int slot, const char *value)
{
char *oldval = table[slot].value;
- char *newval = value;
+ char *newval = NULL;
if (oldval)
free(oldval);
diff --git a/interpolate.h b/interpolate.h
index a55fb8e071..190a180b58 100644
--- a/interpolate.h
+++ b/interpolate.h
@@ -16,7 +16,7 @@ struct interp {
char *value;
};
-extern void interp_set_entry(struct interp *table, int slot, char *value);
+extern void interp_set_entry(struct interp *table, int slot, const char *value);
extern void interp_clear_table(struct interp *table, int ninterps);
extern int interpolate(char *result, int reslen,