Expander: Fix dead nested assignment

Fix value stored to 'status' is never read.
Pointed out by Clang Static Analyzer.

Change-Id: I0bbeafb74168d566128b53f8ad40e71218c78c45
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3473
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Murai Takashi 2020-11-28 07:58:55 +09:00 committed by Jérôme Duval
parent 5d1042057b
commit b9e10b0796

View File

@ -54,7 +54,7 @@ ExpanderThread::ThreadStartup()
if ((status = GetDataStore()->FindRef("srcRef", &srcRef)) != B_OK)
return status;
if ((status = GetDataStore()->FindRef("destRef", &destRef)) == B_OK) {
if (GetDataStore()->FindRef("destRef", &destRef) == B_OK) {
BPath path(&destRef);
chdir(path.Path());
}
@ -213,7 +213,7 @@ ExpanderThread::PipeCommand(int argc, const char** argv, int& in, int& out,
int old_err = dup(2);
int filedes[2];
// create new pipe FDs as stdout, stderr
pipe(filedes); dup2(filedes[1], 1); close(filedes[1]);
out = filedes[0]; // Read from out, taken from cmd's stdout
@ -250,7 +250,7 @@ ExpanderThread::PipeCommand(int argc, const char** argv, int& in, int& out,
if (ioctl(slave, TIOCSCTTY, NULL) != 0)
return -1;
dup2(slave, 0);
dup2(slave, 0);
close(slave);
// "load" command.