From: Attractive Chaos Date: Wed, 27 Feb 2019 17:07:51 +0000 (-0500) Subject: Merge branch 'master' of github.com:attractivechaos/klib X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=cc7e69f2969610b08238f8a9293a73adab990ba2;p=klib.git Merge branch 'master' of github.com:attractivechaos/klib --- cc7e69f2969610b08238f8a9293a73adab990ba2 diff --cc ketopt.h index 8ae1811,43b5f4a..73dd2dc --- a/ketopt.h +++ b/ketopt.h @@@ -93,10 -89,10 +93,10 @@@ static int ketopt(ketopt_t *s, int argc } } } else { /* a short option */ - char *p; + const char *p; if (s->pos == 0) s->pos = 1; opt = s->opt = argv[s->i][s->pos++]; - p = strchr(ostr, opt); + p = strchr((char*)ostr, opt); if (p == 0) { opt = '?'; /* unknown option */ } else if (p[1] == ':') {