From 5f48948f7fae0fa58068cec7e7de04bc70d4fb8f Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Tue, 5 Mar 2019 20:03:45 +0900 Subject: [PATCH] Roster: Fix PVS 460 Replace do...while(false) loop with while(true)... loop, so that 'continue' at line 1968 can continue loop. Change-Id: I4d64ff2699ad0837f29d49c63b683b134c4ccc1e Reviewed-on: https://review.haiku-os.org/c/1149 Reviewed-by: Fredrik Holmqvist Reviewed-by: Barrett17 --- src/kits/app/Roster.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kits/app/Roster.cpp b/src/kits/app/Roster.cpp index 70c2a11ae2..1a9b62cc63 100644 --- a/src/kits/app/Roster.cpp +++ b/src/kits/app/Roster.cpp @@ -1873,7 +1873,7 @@ BRoster::_LaunchApp(const char* mimeType, const entry_ref* ref, port_id appPort = -1; uint32 appToken = 0; - do { + while (true) { // find the app entry_ref appRef; char signature[B_MIME_TYPE_LENGTH]; @@ -1971,7 +1971,9 @@ BRoster::_LaunchApp(const char* mimeType, const entry_ref* ref, } } } - } while (false); + // Don't try again + break; + } if (alreadyRunning && current_team() == team) { // The target team is calling us, so we don't send it the message