fix failures found by randomconfig builds

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2013-12-31 23:22:36 +01:00
parent 61be8e46a8
commit 198b02f7dd
7 changed files with 34 additions and 13 deletions

View File

@@ -144,7 +144,7 @@ lib-$(CONFIG_DELUSER) += update_passwd.o
lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o
lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o
lib-$(CONFIG_CRYPTPW) += pw_encrypt.o
lib-$(CONFIG_SULOGIN) += pw_encrypt.o
lib-$(CONFIG_SULOGIN) += pw_encrypt.o correct_password.o
lib-$(CONFIG_VLOCK) += pw_encrypt.o correct_password.o
lib-$(CONFIG_SU) += pw_encrypt.o correct_password.o
lib-$(CONFIG_LOGIN) += pw_encrypt.o correct_password.o

View File

@@ -30,15 +30,6 @@
#include "libbb.h"
void FAST_FUNC nuke_str(char *str)
{
if (str) {
while (*str)
*str++ = 0;
/* or: memset(str, 0, strlen(str)); - not as small as above */
}
}
/* Ask the user for a password.
* Return 1 without asking if PW has an empty password.
* Return -1 on EOF, error while reading input, or timeout.

View File

@@ -3,6 +3,7 @@
* Utility routines.
*/
//kbuild:lib-$(CONFIG_ARP) += in_ether.o
//kbuild:lib-$(CONFIG_IFCONFIG) += in_ether.o
//kbuild:lib-$(CONFIG_IFENSLAVE) += in_ether.o

21
libbb/nuke_str.c Normal file
View File

@@ -0,0 +1,21 @@
/* vi: set sw=4 ts=4: */
/*
* Utility routines.
*
* Copyright (C) 2008 Denys Vlasenko
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//kbuild:lib-y += nuke_str.o
#include "libbb.h"
void FAST_FUNC nuke_str(char *str)
{
if (str) {
while (*str)
*str++ = 0;
/* or: memset(str, 0, strlen(str)); - not as small as above */
}
}