X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fvariable.c;fp=src%2Fdata%2Fvariable.c;h=4fdfdcbb65d83609b14f8f29b14bf1ffe6b0741a;hb=374ec8c7a2f7418f0e050d733f8a1c6a429d86a8;hp=87e7d07823f42271707000938d7501a24f562250;hpb=42beaf99ec30b63c78342effb2ce4d50aee34e82;p=pspp diff --git a/src/data/variable.c b/src/data/variable.c index 87e7d07823..4fdfdcbb65 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -760,23 +760,20 @@ var_get_label (const struct variable *v) /* Sets V's variable label to UTF-8 encoded string LABEL, stripping off leading and trailing white space. If LABEL is a null pointer or if LABEL is an - empty string (after stripping white space), then V's variable label (if any) - is removed. */ + empty string, then V's variable label (if any) is removed. */ static void var_set_label_quiet (struct variable *v, const char *label) { free (v->label); v->label = NULL; - if (label != NULL && label[strspn (label, CC_SPACES)]) + if (label != NULL && label[0]) v->label = xstrdup (label); ds_destroy (&v->name_and_label); ds_init_empty (&v->name_and_label); } - - /* Sets V's variable label to UTF-8 encoded string LABEL, stripping off leading and trailing white space. If LABEL is a null pointer or if LABEL is an empty string (after stripping white space), then V's variable label (if any) @@ -789,7 +786,6 @@ var_set_label (struct variable *v, const char *label) dict_var_changed (v, VAR_TRAIT_LABEL, ov); } - /* Removes any variable label from V. */ void var_clear_label (struct variable *v)