1 /* vi: set sw=4 ts=4: */ 2 /* 3 * Utility routines. 4 * 5 * Copyright (C) 2008 Denys Vlasenko 6 * 7 * Licensed under GPLv2, see file LICENSE in this source tree. 8 */ 9 //kbuild:lib-y += nuke_str.o 10 11 #include "libbb.h" 12 nuke_str(char * str)13void FAST_FUNC nuke_str(char *str) 14 { 15 if (str) { 16 while (*str) 17 *str++ = 0; 18 /* or: memset(str, 0, strlen(str)); - not as small as above */ 19 } 20 } 21