diff options
| author | christos <christos@NetBSD.org> | 2023-05-30 11:53:40 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2023-05-30 11:53:40 +0000 |
| commit | a52fb286c2b0b9022cc1d7484ba8c7dfca8d8bb0 (patch) | |
| tree | 5925792c18ac4d50689a7287c768fa72d5933b5d /lib/libedit | |
| parent | f45de47cd5b152dc3ba3e6bc46f6a52607a813a0 (diff) | |
Fix some const qual (Piotr Pawel Stefaniak)
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/tokenizer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libedit/tokenizer.c b/lib/libedit/tokenizer.c index 18532240dbb..fe98fab6b68 100644 --- a/lib/libedit/tokenizer.c +++ b/lib/libedit/tokenizer.c @@ -1,4 +1,4 @@ -/* $NetBSD: tokenizer.c,v 1.28 2016/04/11 18:56:31 christos Exp $ */ +/* $NetBSD: tokenizer.c,v 1.29 2023/05/30 11:53:40 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tokenizer.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tokenizer.c,v 1.28 2016/04/11 18:56:31 christos Exp $"); +__RCSID("$NetBSD: tokenizer.c,v 1.29 2023/05/30 11:53:40 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -85,7 +85,7 @@ typedef enum { struct TYPE(tokenizer) { Char *ifs; /* In field separator */ size_t argc, amax; /* Current and maximum number of args */ - Char **argv; /* Argument list */ + const Char **argv; /* Argument list */ Char *wptr, *wmax; /* Space and limit on the word buffer */ Char *wstart; /* Beginning of next word */ Char *wspace; /* Space of word buffer */ @@ -424,7 +424,7 @@ FUN(tok,line)(TYPE(Tokenizer) *tok, const TYPE(LineInfo) *line, tok->wmax = s + size; } if (tok->argc >= tok->amax - 4) { - Char **p; + const Char **p; tok->amax += AINCR; p = tok_realloc(tok->argv, tok->amax * sizeof(*p)); if (p == NULL) { @@ -444,7 +444,7 @@ FUN(tok,line)(TYPE(Tokenizer) *tok, const TYPE(LineInfo) *line, if (cursoro != NULL) *cursoro = co; FUN(tok,finish)(tok); - *argv = (const Char **)tok->argv; + *argv = tok->argv; *argc = (int)tok->argc; return 0; } |
