From ff6af02ffca580f7985ab7c487cae696aaffebf8 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sun, 24 Jun 2007 10:20:29 -0700 Subject: [PATCH] ctags: Use const as appropriate in cmp_sym() Signed-off-by: Josh Triplett --- ctags.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ctags.c b/ctags.c index cccee0a9..f5b8fc7f 100644 --- a/ctags.c +++ b/ctags.c @@ -24,12 +24,12 @@ static void examine_symbol(struct symbol *sym); static int cmp_sym(const void *m, const void *n) { - struct ident *a = ((struct symbol *)m)->ident; - struct ident *b = ((struct symbol *)n)->ident; + const struct ident *a = ((const struct symbol *)m)->ident; + const struct ident *b = ((const struct symbol *)n)->ident; int ret = strncmp(a->name, b->name, MAX(a->len, b->len)); if (!ret) { - struct position a_pos = ((struct symbol *)m)->pos; - struct position b_pos = ((struct symbol *)n)->pos; + const struct position a_pos = ((const struct symbol *)m)->pos; + const struct position b_pos = ((const struct symbol *)n)->pos; ret = strcmp(stream_name(a_pos.stream), stream_name(b_pos.stream)); -- 2.11.4.GIT