Denys Vlasenko | 198b02f | 2013-12-31 23:22:36 +0100 | [diff] [blame] | 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 | */ |
Denys Vlasenko | 198b02f | 2013-12-31 23:22:36 +0100 | [diff] [blame] | 9 | //kbuild:lib-y += nuke_str.o |
| 10 | |
| 11 | #include "libbb.h" |
| 12 | |
| 13 | void FAST_FUNC nuke_str(char *str) |
| 14 | { |
Denys Vlasenko | 4c201c0 | 2018-07-17 15:04:17 +0200 | [diff] [blame] | 15 | if (str) { |
Denys Vlasenko | 198b02f | 2013-12-31 23:22:36 +0100 | [diff] [blame] | 16 | while (*str) |
| 17 | *str++ = 0; |
| 18 | /* or: memset(str, 0, strlen(str)); - not as small as above */ |
| 19 | } |
| 20 | } |