Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Side by Side Diff: remoting/client/x11_client.cc

Issue 2826004: Coverity: Fix missing return in error check in remoting::X11Client::DoInitX11. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file implements a X11 chromoting client. 5 // This file implements a X11 chromoting client.
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void InitX11() { 90 void InitX11() {
91 message_loop_->PostTask(FROM_HERE, 91 message_loop_->PostTask(FROM_HERE,
92 NewRunnableMethod(this, &X11Client::DoInitX11)); 92 NewRunnableMethod(this, &X11Client::DoInitX11));
93 } 93 }
94 94
95 void DoInitX11() { 95 void DoInitX11() {
96 display_ = XOpenDisplay(NULL); 96 display_ = XOpenDisplay(NULL);
97 if (!display_) { 97 if (!display_) {
98 std::cout << "Error - cannot open display" << std::endl; 98 std::cout << "Error - cannot open display" << std::endl;
99 client_done_->Signal(); 99 client_done_->Signal();
100 return;
100 } 101 }
101 102
102 // Get properties of the screen. 103 // Get properties of the screen.
103 int screen = DefaultScreen(display_); 104 int screen = DefaultScreen(display_);
104 int root_window = RootWindow(display_, screen); 105 int root_window = RootWindow(display_, screen);
105 106
106 // Creates the window. 107 // Creates the window.
107 window_ = XCreateSimpleWindow(display_, root_window, 1, 1, 640, 480, 0, 108 window_ = XCreateSimpleWindow(display_, root_window, 1, 1, 640, 480, 0,
108 BlackPixel(display_, screen), 109 BlackPixel(display_, screen),
109 BlackPixel(display_, screen)); 110 BlackPixel(display_, screen));
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 252
252 client->DestroyX11(); 253 client->DestroyX11();
253 254
254 // Quit the current message loop. 255 // Quit the current message loop.
255 network_thread.message_loop()->PostTask(FROM_HERE, 256 network_thread.message_loop()->PostTask(FROM_HERE,
256 new MessageLoop::QuitTask()); 257 new MessageLoop::QuitTask());
257 network_thread.Stop(); 258 network_thread.Stop();
258 259
259 return 0; 260 return 0;
260 } 261 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698