Bug 1287739: Always set 'len' variable in storage test, r=mak

MozReview-Commit-ID: 8EpGeakICWY
This commit is contained in:
Thomas Zimmermann 2016-07-20 16:12:31 +02:00
parent 580c12cc29
commit 67abb05afa

View File

@ -160,7 +160,6 @@ public:
int32_t nfds;
bool stdoutOpen = true, stderrOpen = true;
char buf[4096];
int32_t len;
PRIntervalTime now = PR_IntervalNow();
PRIntervalTime deadline = now + PR_MillisecondsToInterval(aWaitMs);
@ -194,15 +193,13 @@ public:
continue;
bool isStdout = mStdoutfd == pollfds[i].fd;
int32_t len = 0;
if (PR_POLL_READ & pollfds[i].out_flags) {
len = PR_Read(pollfds[i].fd, buf, sizeof(buf) - 1);
NS_ASSERTION(0 <= len, PR_ErrorToName(PR_GetError()));
}
else if (PR_POLL_HUP & pollfds[i].out_flags) {
len = 0;
}
else {
else if (!(PR_POLL_HUP & pollfds[i].out_flags)) {
NS_ERROR(PR_ErrorToName(PR_GetError()));
}