linkcatkeys: Avoid discarding potential error values.

Spotted by Clang and the [[nodiscard]] patch.
This commit is contained in:
Augustin Cavalier
2019-08-02 21:06:09 -04:00
parent dfbf1c8a0a
commit afb345915d
+4 -2
View File
@@ -127,7 +127,8 @@ main(int argc, char **argv)
case TARGET_ATTRIBUTE: { case TARGET_ATTRIBUTE: {
BEntry entry(outputFile.String()); BEntry entry(outputFile.String());
entry_ref eref; entry_ref eref;
entry.GetRef(&eref); res = entry.GetRef(&eref);
if (res == B_OK)
res = targetCatImpl.WriteToAttribute(eref); res = targetCatImpl.WriteToAttribute(eref);
if (res != B_OK) { if (res != B_OK) {
fprintf(stderr, fprintf(stderr,
@@ -140,7 +141,8 @@ main(int argc, char **argv)
case TARGET_RESOURCE: { case TARGET_RESOURCE: {
BEntry entry(outputFile.String()); BEntry entry(outputFile.String());
entry_ref eref; entry_ref eref;
entry.GetRef(&eref); res = entry.GetRef(&eref);
if (res == B_OK)
res = targetCatImpl.WriteToResource(eref); res = targetCatImpl.WriteToResource(eref);
if (res != B_OK) { if (res != B_OK) {
fprintf(stderr, fprintf(stderr,