[exim-cvs] Replace use of index() with Ustrchr()

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] Replace use of index() with Ustrchr()
Gitweb: http://git.exim.org/exim.git/commitdiff/db270929c3df4a10e96ec8fcb890336a0f6ced6e
Commit:     db270929c3df4a10e96ec8fcb890336a0f6ced6e
Parent:     133d2546c36766081aef8b8fc7c642862b83ea2e
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Sep 16 14:59:54 2014 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Sep 16 14:59:54 2014 +0100


    Replace use of index() with Ustrchr()
---
 src/src/malware.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/src/src/malware.c b/src/src/malware.c
index 04b5887..93bcf86 100644
--- a/src/src/malware.c
+++ b/src/src/malware.c
@@ -1443,9 +1443,9 @@ malware_internal(uschar **listptr, uschar *eml_filename, BOOL faking)
     if ((sockline_scanner = string_nextinlist(&av_scanner_work, &sep,
                         NULL, 0)))
     {    /* check for no expansions apart from one %s */
-      char * s = index(CS sockline_scanner, '%');
+      uschar * s = Ustrchr(sockline_scanner, '%');
       if (s++)
-        if ((*s != 's' && *s != '%') || index(s+1, '%'))
+        if ((*s != 's' && *s != '%') || Ustrchr(s+1, '%'))
           return m_errlog_defer_3(scanent,
                     US"unsafe sock scanner call spec", sock);
     }