From 405aed6b346c3b1fd92e4e4776a352ecf5a5f629 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Wed, 23 Mar 2016 13:54:22 +0000 Subject: [PATCH] Bracketing out unused stringequal and tidying up stringlength. Copied from Perforce Change: 190333 ServerID: perforce.ravenbrook.com --- mps/code/mpm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mps/code/mpm.c b/mps/code/mpm.c index 882a46b7092..a31ab2b5388 100644 --- a/mps/code/mpm.c +++ b/mps/code/mpm.c @@ -619,16 +619,19 @@ Res WriteF_firstformat_v(mps_lib_FILE *stream, Count depth, size_t StringLength(const char *s) { - size_t i; + size_t i = 0; AVER(s != NULL); - for(i = 0; s[i] != '\0'; i++) - NOOP; - return(i); + while (s[i] != '\0') + ++i; + + return i; } +#if 0 /* This code is currently not in use in the MPS */ + /* StringEqual -- slow substitute for (strcmp == 0) */ Bool StringEqual(const char *s1, const char *s2) @@ -649,6 +652,8 @@ Bool StringEqual(const char *s1, const char *s2) return TRUE; } +#endif /* not currently in use */ + /* C. COPYRIGHT AND LICENSE