[haiku-commits] haiku: hrev52968 - src/kits/app

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 5 Mar 2019 17:39:27 -0500 (EST)

hrev52968 adds 1 changeset to branch 'master'
old head: 9e1ce8ed92e1a4e515042e554463d1dfb5660030
new head: 5f48948f7fae0fa58068cec7e7de04bc70d4fb8f
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=5f48948f7fae+%5E9e1ce8ed92e1

----------------------------------------------------------------------------

5f48948f7fae: 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 <fredrik.holmqvist@xxxxxxxxx>
  Reviewed-by: Barrett17 <b.vitruvio@xxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52968
Commit:      5f48948f7fae0fa58068cec7e7de04bc70d4fb8f
URL:         https://git.haiku-os.org/haiku/commit/?id=5f48948f7fae
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Tue Mar  5 11:03:45 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Tue Mar  5 22:39:24 2019 UTC

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 2 deletions(-)
src/kits/app/Roster.cpp | 6 ++++--

----------------------------------------------------------------------------

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


Other related posts:

  • » [haiku-commits] haiku: hrev52968 - src/kits/app - waddlesplash