diff options
Diffstat (limited to 'scripts/kconfig/util.c')
-rw-r--r-- | scripts/kconfig/util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 29585394df71..92e5b2b9761d 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -42,8 +42,7 @@ struct gstr str_new(void) /* Free storage for growable string */ void str_free(struct gstr *gs) { - if (gs->s) - free(gs->s); + free(gs->s); gs->s = NULL; gs->len = 0; } @@ -74,7 +73,7 @@ void str_printf(struct gstr *gs, const char *fmt, ...) } /* Retrieve value of growable string */ -const char *str_get(struct gstr *gs) +char *str_get(struct gstr *gs) { return gs->s; } |