]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
ast_value_set_name to return bool
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index f42a2fa74807e0fddc8cefd528be99889895684b..35e72eb6dfea051c4540ba7f03dfc1a936d499e9 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -102,11 +102,12 @@ void ast_value_delete(ast_value* self)
     mem_d(self);
 }
 
-void ast_value_set_name(ast_value *self, const char *name)
+bool ast_value_set_name(ast_value *self, const char *name)
 {
     if (self->name)
         mem_d((void*)self->name);
     self->name = util_strdup(name);
+    return !!self->name;
 }
 
 ast_binary* ast_binary_new(lex_ctx_t ctx, int op,