Skip to content

Commit

Permalink
do not discard constness in interp_set_entry value argument
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Sep 29, 2006
1 parent 393d340 commit a283837
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions interpolate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion interpolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a283837

Please sign in to comment.