From e517c533f959a75908b7361b1969146d29cdfa02 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Thu, 17 Aug 2006 18:15:49 +0200 Subject: [PATCH] Code cleanup. --- ext/vcedit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/vcedit.c b/ext/vcedit.c index 393ca9d..fd89008 100644 --- a/ext/vcedit.c +++ b/ext/vcedit.c @@ -71,10 +71,12 @@ vcedit_state_free (vcedit_state *state) } static bool -vcedit_state_init (vcedit_state *state) +vcedit_state_init (vcedit_state *state, const char *filename) { state->refcount = 1; + strcpy (state->filename, filename); + return true; } @@ -94,13 +96,11 @@ vcedit_state_new (const char *filename) memset (state, 0, sizeof (vcedit_state)); - if (!vcedit_state_init (state)) { + if (!vcedit_state_init (state, filename)) { vcedit_state_free (state); return NULL; } - strcpy (state->filename, filename); - return state; } -- 2.30.2