mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1287739: Always set 'len' variable in storage test, r=mak
MozReview-Commit-ID: 8EpGeakICWY
This commit is contained in:
parent
580c12cc29
commit
67abb05afa
@ -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()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user