X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fmodify-variables.c;h=333f77045527ef2328f3a24315b38062cf39f50f;hb=c708736bdd0fea4b79f3ee4a10e00c3abb95d9e3;hp=1632f6ea0db7aecda785b929f72fd544af469b30;hpb=733a7755a474053cbf3221e1f182012f8ed51720;p=pspp-builds.git diff --git a/src/language/dictionary/modify-variables.c b/src/language/dictionary/modify-variables.c index 1632f6ea..333f7704 100644 --- a/src/language/dictionary/modify-variables.c +++ b/src/language/dictionary/modify-variables.c @@ -73,7 +73,7 @@ struct var_modification size_t rename_cnt; }; -static int rearrange_dict (struct dictionary *d, +static bool rearrange_dict (struct dictionary *d, const struct var_modification *vm); /* Performs MODIFY VARS command. */ @@ -466,11 +466,11 @@ validate_var_modification (const struct dictionary *d, } /* Reoders, removes, and renames variables in dictionary D - according to VM. Returns nonzero if successful, zero if there + according to VM. Returns true if successful, false if there would have been duplicate variable names if the modifications had been carried out. In the latter case, the dictionary is not modified. */ -static int +static bool rearrange_dict (struct dictionary *d, const struct var_modification *vm) { char **rename_old_names; @@ -484,7 +484,7 @@ rearrange_dict (struct dictionary *d, const struct var_modification *vm) /* Check whether the modifications will cause duplicate names. */ if (!validate_var_modification (d, vm)) - return 0; + return false; /* Record the old names of variables to rename. After variables are deleted, we can't depend on the variables to @@ -524,5 +524,5 @@ rearrange_dict (struct dictionary *d, const struct var_modification *vm) free (rename_vars); free (rename_new_names); - return 1; + return true; }