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 <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
5d1042057b
commit
b9e10b0796
@@ -54,7 +54,7 @@ ExpanderThread::ThreadStartup()
|
|||||||
if ((status = GetDataStore()->FindRef("srcRef", &srcRef)) != B_OK)
|
if ((status = GetDataStore()->FindRef("srcRef", &srcRef)) != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if ((status = GetDataStore()->FindRef("destRef", &destRef)) == B_OK) {
|
if (GetDataStore()->FindRef("destRef", &destRef) == B_OK) {
|
||||||
BPath path(&destRef);
|
BPath path(&destRef);
|
||||||
chdir(path.Path());
|
chdir(path.Path());
|
||||||
}
|
}
|
||||||
@@ -213,7 +213,7 @@ ExpanderThread::PipeCommand(int argc, const char** argv, int& in, int& out,
|
|||||||
int old_err = dup(2);
|
int old_err = dup(2);
|
||||||
|
|
||||||
int filedes[2];
|
int filedes[2];
|
||||||
|
|
||||||
// create new pipe FDs as stdout, stderr
|
// create new pipe FDs as stdout, stderr
|
||||||
pipe(filedes); dup2(filedes[1], 1); close(filedes[1]);
|
pipe(filedes); dup2(filedes[1], 1); close(filedes[1]);
|
||||||
out = filedes[0]; // Read from out, taken from cmd's stdout
|
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)
|
if (ioctl(slave, TIOCSCTTY, NULL) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
dup2(slave, 0);
|
dup2(slave, 0);
|
||||||
close(slave);
|
close(slave);
|
||||||
|
|
||||||
// "load" command.
|
// "load" command.
|
||||||
|
|||||||
Reference in New Issue
Block a user