aboutsummaryrefslogtreecommitdiffstats
path: root/ctags.c
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2007-06-24 10:20:29 -0700
committerJosh Triplett <josh@freedesktop.org>2007-06-24 10:20:29 -0700
commitff6af02ffca580f7985ab7c487cae696aaffebf8 (patch)
treeab4da9265042c0f3157d85f9c875412480d7938b /ctags.c
parent791de79ac3473d23c020e3fc6ebebd173c8293a0 (diff)
downloadsparse-ff6af02ffca580f7985ab7c487cae696aaffebf8.tar.gz
sparse-ff6af02ffca580f7985ab7c487cae696aaffebf8.tar.xz
sparse-ff6af02ffca580f7985ab7c487cae696aaffebf8.zip
ctags: Use const as appropriate in cmp_sym()
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'ctags.c')
-rw-r--r--ctags.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ctags.c b/ctags.c
index cccee0a..f5b8fc7 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));