FileRequest: style fixes

Pointed out by axeld, stippi and waddlesplash. Thanks for watching.
This commit is contained in:
Adrien Destugues
2014-01-13 08:05:30 +01:00
parent a6c0fea79c
commit 5e9a96156d
+3 -3
View File
@@ -7,7 +7,6 @@
*/ */
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <Directory.h> #include <Directory.h>
@@ -84,8 +83,7 @@ BFileRequest::_ProtocolLoop()
int size = 0; int size = 0;
char name[B_FILE_NAME_LENGTH]; char name[B_FILE_NAME_LENGTH];
BEntry entry; BEntry entry;
while(directory.GetNextEntry(&entry) != B_ENTRY_NOT_FOUND) while (directory.GetNextEntry(&entry) != B_ENTRY_NOT_FOUND) {
{
// We read directories using the EPFL (Easily Parsed List Format) // We read directories using the EPFL (Easily Parsed List Format)
// This happens to be one of the formats that WebKit can understand, // This happens to be one of the formats that WebKit can understand,
// and it is not too hard to parse or generate. // and it is not too hard to parse or generate.
@@ -106,10 +104,12 @@ BFileRequest::_ProtocolLoop()
entry.GetName(name); entry.GetName(name);
epfl << "\t" << name << "\r\n"; epfl << "\t" << name << "\r\n";
if (fListener != NULL)
fListener->DataReceived(this, epfl.String(), epfl.Length()); fListener->DataReceived(this, epfl.String(), epfl.Length());
size += epfl.Length(); size += epfl.Length();
} }
if (fListener != NULL)
fListener->DownloadProgress(this, size, size); fListener->DownloadProgress(this, size, size);
fResult.SetLength(size); fResult.SetLength(size);