aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console-tools/setlogcons.c2
-rw-r--r--libbb/xfuncs.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c
index 6667eb622..9d1ef5492 100644
--- a/console-tools/setlogcons.c
+++ b/console-tools/setlogcons.c
@@ -25,7 +25,7 @@ extern int setlogcons_main(int argc, char **argv)
25 arg.subarg = atoi(argv[1]); 25 arg.subarg = atoi(argv[1]);
26 26
27 if (ioctl(xopen(VC_1, O_RDONLY), TIOCLINUX, &arg)) 27 if (ioctl(xopen(VC_1, O_RDONLY), TIOCLINUX, &arg))
28 bb_perror_msg_and_die("TIOCLINUX");; 28 bb_perror_msg_and_die("TIOCLINUX");
29 29
30 return 0; 30 return 0;
31} 31}
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 116cff459..850721e3e 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -108,7 +108,7 @@ FILE *xfopen(const char *path, const char *mode)
108/* Die if we can't open an existing file and return an fd. */ 108/* Die if we can't open an existing file and return an fd. */
109int xopen(const char *pathname, int flags) 109int xopen(const char *pathname, int flags)
110{ 110{
111 if (ENABLE_DEBUG && (flags && O_CREAT)) 111 if (ENABLE_DEBUG && (flags & O_CREAT))
112 bb_error_msg_and_die("xopen() with O_CREAT\n"); 112 bb_error_msg_and_die("xopen() with O_CREAT\n");
113 113
114 return xopen3(pathname, flags, 0777); 114 return xopen3(pathname, flags, 0777);
@@ -349,7 +349,7 @@ off_t fdlength(int fd)
349 do { 349 do {
350 char temp; 350 char temp;
351 351
352 pos = bottom + (top - bottom) / 2;; 352 pos = bottom + (top - bottom) / 2;
353 353
354 /* If we can read from the current location, it's bigger. */ 354 /* If we can read from the current location, it's bigger. */
355 355