Chromium Code Reviews| Index: mojo/examples/wget/wget.cc |
| diff --git a/mojo/examples/wget/wget.cc b/mojo/examples/wget/wget.cc |
| index 8fabbe65977eb91df367d593152d33fc14a2ae8f..9ec7e5cae126d9dfbaf0f338aa53f4cd3c160798 100644 |
| --- a/mojo/examples/wget/wget.cc |
| +++ b/mojo/examples/wget/wget.cc |
| @@ -93,7 +93,10 @@ class WGetApp : public ApplicationDelegate, public URLLoaderClient { |
| MOJO_HANDLE_SIGNAL_READABLE, |
| MOJO_DEADLINE_INDEFINITE); |
| } else if (result == MOJO_RESULT_OK) { |
| - fwrite(buf, num_bytes, 1, stdout); |
| + if (fwrite(buf, num_bytes, 1, stdout) != num_bytes) { |
|
darin (slow to review)
2014/07/09 21:02:21
LGTM
|
| + printf("\nUnexpected error writing to file\n"); |
| + break; |
| + } |
| } else { |
| break; |
| } |