aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritsmattkc <itsmattkc@gmail.com>2020-07-31 15:45:40 +1000
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-08-09 08:36:13 +0200
commitf1dc47156d5f2d70f2194faef4d6a809561d6c99 (patch)
tree4926e60e9af8c76edd924b89a9c5f8b22dfb8760
parent664d0feb7b776591bce8ad7ac9c75437d4acde5f (diff)
zbarcam: change return value and print text on setmode error
-rw-r--r--zbarcam/zbarcam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zbarcam/zbarcam.c b/zbarcam/zbarcam.c
index 7bc790b..ef2eb20 100644
--- a/zbarcam/zbarcam.c
+++ b/zbarcam/zbarcam.c
@@ -312,8 +312,8 @@ int main (int argc, const char *argv[])
if(format == XML || format == RAW) {
fflush(stdout);
if(_setmode(_fileno(stdout), _O_BINARY) == -1) {
- fprintf(stderr, "ERROR: failed to set stdout mode: %i\n\n", errno);
- return(usage(1));
+ fprintf(stderr, "ERROR: failed to set stdout mode: %i\n", errno);
+ return 1;
}
}
#endif

Privacy Policy