summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 393d340)
raw | patch | inline | side by side (parent: 393d340)
author | Alex Riesen <fork0@t-online.de> | |
Thu, 28 Sep 2006 19:12:55 +0000 (21:12 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 29 Sep 2006 01:25:36 +0000 (18:25 -0700) |
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
interpolate.c | patch | blob | history | |
interpolate.h | patch | blob | history |
diff --git a/interpolate.c b/interpolate.c
index 62701d8435e6c113bf683c72a038874ed1acc2de..5d9d1889f088c64131cd3c116e6a16876ce95db8 100644 (file)
--- a/interpolate.c
+++ b/interpolate.c
#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 a55fb8e0714487a2107e7cfb0e451d2b5e022b01..190a180b587aa565ae2ae71f9eb068ad75db168f 100644 (file)
--- a/interpolate.h
+++ b/interpolate.h
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,