aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog4
-rw-r--r--util/errors.c1
-rw-r--r--util/strgutil.c6
3 files changed, 8 insertions, 3 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index 561b84905..05214578f 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 19 11:29:03 1998 Werner Koch ([email protected])
+
+ * strgutil.c (memistr): Add const to return and first arg.
+
Sat Mar 7 11:54:35 1998 Werner Koch ([email protected])
* miscutil.c (print_string): New arg delim; changed all callers.
diff --git a/util/errors.c b/util/errors.c
index 35b55177c..59426e6e2 100644
--- a/util/errors.c
+++ b/util/errors.c
@@ -71,6 +71,7 @@ g10_errstr( int err )
X(RENAME_FILE ,"File rename error")
X(DELETE_FILE ,"File delete error")
X(UNEXPECTED ,"Unexpected data")
+ X(TIME_CONFLICT ,"Timestamp conflict")
default: p = buf; sprintf(buf, "g10err=%d", err); break;
}
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 )