randomconfig fixes
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 27 Dec 2018 17:03:20 +0000 (18:03 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 27 Dec 2018 17:03:20 +0000 (18:03 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libarchive/lzo1x_9x.c
libbb/lineedit.c
miscutils/devfsd.c
networking/nbd-client.c
networking/udhcp/dhcpd.c
shell/hush.c

index 09ee4ba5c3b16885bdd3f89e473192d2ff956afd..df26b375fade0f964c81fc466aa0c04e2c64b715 100644 (file)
@@ -487,7 +487,7 @@ static int find_match(lzo1x_999_t *c, lzo_swd_p s,
 }
 
 /* this is a public functions, but there is no prototype in a header file */
-static int lzo1x_999_compress_internal(const uint8_t *in , unsigned in_len,
+static int lzo1x_999_compress_internal(const uint8_t *in, unsigned in_len,
                uint8_t *out, unsigned *out_len,
                void *wrkmem,
                unsigned good_length,
index 3ed38e54d8e31d861a5c5b857ddee7018a937923..0a888fa703eb812fd1e31889666add591029806f 100644 (file)
@@ -1373,6 +1373,16 @@ void FAST_FUNC show_history(const line_input_t *st)
                printf("%4d %s\n", i, st->history[i]);
 }
 
+void FAST_FUNC free_line_input_t(line_input_t *n)
+{
+# if ENABLE_FEATURE_EDITING_SAVEHISTORY
+       int i = n->cnt_history;
+       while (i > 0)
+               free(n->history[--i]);
+#endif
+       free(n);
+}
+
 # if ENABLE_FEATURE_EDITING_SAVEHISTORY
 /* We try to ensure that concurrent additions to the history
  * do not overwrite each other.
@@ -1382,14 +1392,6 @@ void FAST_FUNC show_history(const line_input_t *st)
  * than configured MAX_HISTORY lines.
  */
 
-void FAST_FUNC free_line_input_t(line_input_t *n)
-{
-       int i = n->cnt_history;
-       while (i > 0)
-               free(n->history[--i]);
-       free(n);
-}
-
 /* state->flags is already checked to be nonzero */
 static void load_history(line_input_t *st_parm)
 {
index 814714f53198e8efed1b410f9cbe13d1ec6c1b91..3bf06b965b5d8e9de82e64a36e87a2098d45dea0 100644 (file)
@@ -694,7 +694,7 @@ static void process_config_line(const char *line, unsigned long *event_mask)
        return;
 
  process_config_line_err:
-       msg_logger_and_die(LOG_ERR, bb_msg_bad_config, msg , line);
+       msg_logger_and_die(LOG_ERR, bb_msg_bad_config, msg, line);
 }  /*  End Function process_config_line   */
 
 static int do_servicing(int fd, unsigned long event_mask)
index 103756b59783cc22cf89c18942a1314fef0f4335..1ce974db117bf90b36df758910684cbbfb82c06e 100644 (file)
@@ -163,7 +163,9 @@ int nbdclient_main(int argc, char **argv)
                int sock, nbd;
                int ro;
                int proto_new; // 0 for old, 1 for new
+#if BB_MMU
                char *data;
+#endif
 
                // Make sure BLOCKDEV exists
                nbd = xopen(device, O_RDWR);
@@ -200,7 +202,9 @@ int nbdclient_main(int argc, char **argv)
                        ioctl(nbd, NBD_SET_SIZE_BLOCKS, size_blocks);
                        ioctl(nbd, NBD_CLEAR_SOCK);
                        ro = !!(old_nbd_header.flags & htons(2));
+#if BB_MMU
                        data = old_nbd_header.data;
+#endif
                } else {
                        unsigned namelen;
                        uint16_t handshake_flags;
@@ -230,7 +234,9 @@ int nbdclient_main(int argc, char **argv)
                        ioctl(nbd, NBD_SET_FLAGS,
                                        ntohs(new_nbd_header.transmission_flags));
                        ro = !!(new_nbd_header.transmission_flags & htons(2));
+#if BB_MMU
                        data = new_nbd_header.data;
+#endif
                }
 
                if (ioctl(nbd, BLKROSET, &ro) < 0) {
index 477856d11c0a2dc5d2f84ff879f4fa1eb3b3ae14..0c55fa5e48120308dc32a1cbf477cddc8f2c9ed5 100644 (file)
@@ -378,7 +378,7 @@ struct config_keyword {
 #define OFS(field) offsetof(struct server_config_t, field)
 
 static const struct config_keyword keywords[] = {
-       /* keyword        handler           variable address               default */
+       /* keyword        handler           variable address    default */
        {"start"        , udhcp_str2nip   , OFS(start_ip     ), "192.168.0.20"},
        {"end"          , udhcp_str2nip   , OFS(end_ip       ), "192.168.0.254"},
        {"interface"    , read_str        , OFS(interface    ), "eth0"},
index 2e4a4bcc684d328cbed5d2ee4fc1e760a252b296..d80c717e7ffd5661e9862dbec00a0653f5bd7303 100644 (file)
@@ -5998,7 +5998,7 @@ static const char *first_special_char_in_vararg(const char *cp)
 #endif
 static char *encode_then_expand_vararg(const char *str, int handle_squotes, int do_unbackslash)
 {
-#if !BASH_PATTERN_SUBST
+#if !BASH_PATTERN_SUBST && ENABLE_HUSH_CASE
        const int do_unbackslash = 0;
 #endif
        char *exp_str;