aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-27 18:03:20 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-27 18:03:20 +0100
commit3d27d435dbe7d39894257894b9dd32bfa607604c (patch)
treeddf5842839edb7c826ed54efa37d736c68750a2b
parent2beb1f6fafc341f571501829fc17773f2e0ddbbf (diff)
downloadbusybox-w32-3d27d435dbe7d39894257894b9dd32bfa607604c.tar.gz
busybox-w32-3d27d435dbe7d39894257894b9dd32bfa607604c.tar.bz2
busybox-w32-3d27d435dbe7d39894257894b9dd32bfa607604c.zip
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/libarchive/lzo1x_9x.c2
-rw-r--r--libbb/lineedit.c18
-rw-r--r--miscutils/devfsd.c2
-rw-r--r--networking/nbd-client.c6
-rw-r--r--networking/udhcp/dhcpd.c2
-rw-r--r--shell/hush.c2
6 files changed, 20 insertions, 12 deletions
diff --git a/archival/libarchive/lzo1x_9x.c b/archival/libarchive/lzo1x_9x.c
index 09ee4ba5c..df26b375f 100644
--- a/archival/libarchive/lzo1x_9x.c
+++ b/archival/libarchive/lzo1x_9x.c
@@ -487,7 +487,7 @@ static int find_match(lzo1x_999_t *c, lzo_swd_p s,
487} 487}
488 488
489/* this is a public functions, but there is no prototype in a header file */ 489/* this is a public functions, but there is no prototype in a header file */
490static int lzo1x_999_compress_internal(const uint8_t *in , unsigned in_len, 490static int lzo1x_999_compress_internal(const uint8_t *in, unsigned in_len,
491 uint8_t *out, unsigned *out_len, 491 uint8_t *out, unsigned *out_len,
492 void *wrkmem, 492 void *wrkmem,
493 unsigned good_length, 493 unsigned good_length,
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 3ed38e54d..0a888fa70 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1373,6 +1373,16 @@ void FAST_FUNC show_history(const line_input_t *st)
1373 printf("%4d %s\n", i, st->history[i]); 1373 printf("%4d %s\n", i, st->history[i]);
1374} 1374}
1375 1375
1376void FAST_FUNC free_line_input_t(line_input_t *n)
1377{
1378# if ENABLE_FEATURE_EDITING_SAVEHISTORY
1379 int i = n->cnt_history;
1380 while (i > 0)
1381 free(n->history[--i]);
1382#endif
1383 free(n);
1384}
1385
1376# if ENABLE_FEATURE_EDITING_SAVEHISTORY 1386# if ENABLE_FEATURE_EDITING_SAVEHISTORY
1377/* We try to ensure that concurrent additions to the history 1387/* We try to ensure that concurrent additions to the history
1378 * do not overwrite each other. 1388 * do not overwrite each other.
@@ -1382,14 +1392,6 @@ void FAST_FUNC show_history(const line_input_t *st)
1382 * than configured MAX_HISTORY lines. 1392 * than configured MAX_HISTORY lines.
1383 */ 1393 */
1384 1394
1385void FAST_FUNC free_line_input_t(line_input_t *n)
1386{
1387 int i = n->cnt_history;
1388 while (i > 0)
1389 free(n->history[--i]);
1390 free(n);
1391}
1392
1393/* state->flags is already checked to be nonzero */ 1395/* state->flags is already checked to be nonzero */
1394static void load_history(line_input_t *st_parm) 1396static void load_history(line_input_t *st_parm)
1395{ 1397{
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 814714f53..3bf06b965 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -694,7 +694,7 @@ static void process_config_line(const char *line, unsigned long *event_mask)
694 return; 694 return;
695 695
696 process_config_line_err: 696 process_config_line_err:
697 msg_logger_and_die(LOG_ERR, bb_msg_bad_config, msg , line); 697 msg_logger_and_die(LOG_ERR, bb_msg_bad_config, msg, line);
698} /* End Function process_config_line */ 698} /* End Function process_config_line */
699 699
700static int do_servicing(int fd, unsigned long event_mask) 700static int do_servicing(int fd, unsigned long event_mask)
diff --git a/networking/nbd-client.c b/networking/nbd-client.c
index 103756b59..1ce974db1 100644
--- a/networking/nbd-client.c
+++ b/networking/nbd-client.c
@@ -163,7 +163,9 @@ int nbdclient_main(int argc, char **argv)
163 int sock, nbd; 163 int sock, nbd;
164 int ro; 164 int ro;
165 int proto_new; // 0 for old, 1 for new 165 int proto_new; // 0 for old, 1 for new
166#if BB_MMU
166 char *data; 167 char *data;
168#endif
167 169
168 // Make sure BLOCKDEV exists 170 // Make sure BLOCKDEV exists
169 nbd = xopen(device, O_RDWR); 171 nbd = xopen(device, O_RDWR);
@@ -200,7 +202,9 @@ int nbdclient_main(int argc, char **argv)
200 ioctl(nbd, NBD_SET_SIZE_BLOCKS, size_blocks); 202 ioctl(nbd, NBD_SET_SIZE_BLOCKS, size_blocks);
201 ioctl(nbd, NBD_CLEAR_SOCK); 203 ioctl(nbd, NBD_CLEAR_SOCK);
202 ro = !!(old_nbd_header.flags & htons(2)); 204 ro = !!(old_nbd_header.flags & htons(2));
205#if BB_MMU
203 data = old_nbd_header.data; 206 data = old_nbd_header.data;
207#endif
204 } else { 208 } else {
205 unsigned namelen; 209 unsigned namelen;
206 uint16_t handshake_flags; 210 uint16_t handshake_flags;
@@ -230,7 +234,9 @@ int nbdclient_main(int argc, char **argv)
230 ioctl(nbd, NBD_SET_FLAGS, 234 ioctl(nbd, NBD_SET_FLAGS,
231 ntohs(new_nbd_header.transmission_flags)); 235 ntohs(new_nbd_header.transmission_flags));
232 ro = !!(new_nbd_header.transmission_flags & htons(2)); 236 ro = !!(new_nbd_header.transmission_flags & htons(2));
237#if BB_MMU
233 data = new_nbd_header.data; 238 data = new_nbd_header.data;
239#endif
234 } 240 }
235 241
236 if (ioctl(nbd, BLKROSET, &ro) < 0) { 242 if (ioctl(nbd, BLKROSET, &ro) < 0) {
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 477856d11..0c55fa5e4 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -378,7 +378,7 @@ struct config_keyword {
378#define OFS(field) offsetof(struct server_config_t, field) 378#define OFS(field) offsetof(struct server_config_t, field)
379 379
380static const struct config_keyword keywords[] = { 380static const struct config_keyword keywords[] = {
381 /* keyword handler variable address default */ 381 /* keyword handler variable address default */
382 {"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"}, 382 {"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"},
383 {"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"}, 383 {"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"},
384 {"interface" , read_str , OFS(interface ), "eth0"}, 384 {"interface" , read_str , OFS(interface ), "eth0"},
diff --git a/shell/hush.c b/shell/hush.c
index 2e4a4bcc6..d80c717e7 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -5998,7 +5998,7 @@ static const char *first_special_char_in_vararg(const char *cp)
5998#endif 5998#endif
5999static char *encode_then_expand_vararg(const char *str, int handle_squotes, int do_unbackslash) 5999static char *encode_then_expand_vararg(const char *str, int handle_squotes, int do_unbackslash)
6000{ 6000{
6001#if !BASH_PATTERN_SUBST 6001#if !BASH_PATTERN_SUBST && ENABLE_HUSH_CASE
6002 const int do_unbackslash = 0; 6002 const int do_unbackslash = 0;
6003#endif 6003#endif
6004 char *exp_str; 6004 char *exp_str;