Skip to content

Commit 9545b12

Browse files
authored
Merge pull request #3373 from tautschnig/vs-bool-osx
Avoid implicit conversion to bool and actually use return value [blocks: #2310]
2 parents 7583842 + d8f97c1 commit 9545b12

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/goto-programs/osx_fat_reader.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,7 @@ bool osx_fat_readert::extract_gb(
8888
{
8989
PRECONDITION(has_gb_arch);
9090

91-
return run("lipo", {"lipo", "-thin", "hppa7100LC", "-output", dest, source});
91+
return run(
92+
"lipo", {"lipo", "-thin", "hppa7100LC", "-output", dest, source}) !=
93+
0;
9294
}

src/goto-programs/read_goto_binary.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ bool read_goto_binary(
135135
if(osx_fat_reader.has_gb())
136136
{
137137
temporary_filet tempname("tmp.goto-binary", ".gb");
138-
osx_fat_reader.extract_gb(filename, tempname());
138+
if(osx_fat_reader.extract_gb(filename, tempname()))
139+
{
140+
message.error() << "failed to extract goto binary" << messaget::eom;
141+
return true;
142+
}
139143

140144
std::ifstream temp_in(tempname(), std::ios::binary);
141145
if(!temp_in)

0 commit comments

Comments
 (0)