aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/less.c4
-rw-r--r--networking/libiproute/ll_map.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 36d451271..27855bbe8 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -774,9 +774,7 @@ static void buffer_line(int linenum)
774static void open_file_and_read_lines(void) 774static void open_file_and_read_lines(void)
775{ 775{
776 if (filename) { 776 if (filename) {
777 int fd = xopen(filename, O_RDONLY); 777 xmove_fd(xopen(filename, O_RDONLY), STDIN_FILENO);
778 dup2(fd, 0);
779 if (fd) close(fd);
780 } else { 778 } else {
781 /* "less" with no arguments in argv[] */ 779 /* "less" with no arguments in argv[] */
782 /* For status line only */ 780 /* For status line only */
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c
index 3412dc763..2ed7fbbb3 100644
--- a/networking/libiproute/ll_map.c
+++ b/networking/libiproute/ll_map.c
@@ -172,7 +172,7 @@ int xll_name_to_index(const char *const name)
172#endif 172#endif
173 173
174 sock_fd = socket(AF_INET, SOCK_DGRAM, 0); 174 sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
175 if (sock_fd) { 175 if (sock_fd >= 0) {
176 struct ifreq ifr; 176 struct ifreq ifr;
177 int tmp; 177 int tmp;
178 178