diff --git a/[refs] b/[refs] index f6442da7155b..9d2caf341c31 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 59b9005692d4c8b5d73cfc41aa7229f47be163a9 +refs/heads/master: 7e030655dda5b5efc4305e2a8f46c4967d32eb3d diff --git a/trunk/tools/perf/builtin-report.c b/trunk/tools/perf/builtin-report.c index 95fd06cdaa99..ce4f28645e64 100644 --- a/trunk/tools/perf/builtin-report.c +++ b/trunk/tools/perf/builtin-report.c @@ -253,7 +253,7 @@ static int strcommon(const char *pathname) { int n = 0; - while (pathname[n] == cwd[n] && n < cwdlen) + while (n < cwdlen && pathname[n] == cwd[n]) ++n; return n; diff --git a/trunk/tools/perf/util/quote.c b/trunk/tools/perf/util/quote.c index c6e5dc0dc82f..2726fe40eb5d 100644 --- a/trunk/tools/perf/util/quote.c +++ b/trunk/tools/perf/util/quote.c @@ -318,7 +318,7 @@ char *quote_path_relative(const char *in, int len, strbuf_addch(out, '"'); if (prefix) { int off = 0; - while (prefix[off] && off < len && prefix[off] == in[off]) + while (off < len && prefix[off] && prefix[off] == in[off]) if (prefix[off] == '/') { prefix += off + 1; in += off + 1;