X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-editor.c;h=b48ad2338b6ccb8e49ca1e8726383885aab1e17d;hp=e02cf730c7f381b1e7c81ef3b2bea247c0b92af8;hb=f15c854d8500105766b2f5666bb62b983ff24f88;hpb=9254d30d06a0565c89daccedd93a94c4c6086004 diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index e02cf730..b48ad233 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -1649,17 +1649,14 @@ static void data_out_g_string (GString *string, const struct variable *v, const struct ccase *cc) { - char *buf ; - const struct fmt_spec *fs = var_get_print_format (v); const union value *val = case_data (cc, v); - buf = xzalloc (fs->w); - data_out (val, fs, buf); + char *s = data_out (val, fs); - g_string_append_len (string, buf, fs->w); + g_string_append_len (string, s, fs->w); - g_free (buf); + g_free (s); } static GString *