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>
This commit is contained in:
Alex Riesen 2006-09-28 21:12:55 +02:00 committed by Junio C Hamano
parent 393d340e4f
commit a28383770e
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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,