summaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-03-19 16:27:29 +0100
committerWerner Koch <wk@gnupg.org>1998-03-19 16:27:29 +0100
commit6b91e7762c65097a103b2b17db304a4d85b3573d (patch)
tree4303dbf887db8130c58e1025cac3c8fe291c6ceb /util/strgutil.c
parentNEw test keyrings (diff)
downloadgnupg2-6b91e7762c65097a103b2b17db304a4d85b3573d.tar.xz
gnupg2-6b91e7762c65097a103b2b17db304a4d85b3573d.zip
some cleanups
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/strgutil.c b/util/strgutil.c
index 271949fb5..f176d35dd 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -77,15 +77,15 @@ strlist_last( STRLIST node )
* substring in BUF or NULL if not found.
* Comparison is case-in-sensitive.
*/
-char *
-memistr( char *buf, size_t buflen, const char *sub )
+const char *
+memistr( const char *buf, size_t buflen, const char *sub )
{
const byte *t, *s ;
size_t n;
for( t=buf, n=buflen, s=sub ; n ; t++, n-- )
if( toupper(*t) == toupper(*s) ) {
- for( buf=(char*)t++, buflen = n--, s++;
+ for( buf=t++, buflen = n--, s++;
n && toupper(*t) == toupper(*s); t++, s++, n-- )
;
if( !*s )