X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fvariable.c;h=ee6c8747865b734cf0ba0f2eb00bdd543a39040c;hb=2766c2d47448010527d52dd304213d0bb563dd00;hp=56993e461c5d43998105123767037bba1a9be16d;hpb=393668423c1c9456fd82db6b30f25de078915da5;p=pspp-builds.git diff --git a/src/data/variable.c b/src/data/variable.c index 56993e46..ee6c8747 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -432,6 +432,8 @@ copy_mangle (char *dst, size_t dst_size, int width_to_bytes(int width) { + const int chunks = width / EFFECTIVE_LONG_STRING_LENGTH ; + const int remainder = width - (chunks * EFFECTIVE_LONG_STRING_LENGTH) ; int bytes, mod8; assert (width >= 0); @@ -442,9 +444,6 @@ width_to_bytes(int width) if ( width <= MAX_LONG_STRING) return MAX_SHORT_STRING * DIV_RND_UP(width, MAX_SHORT_STRING); - const int chunks = width / EFFECTIVE_LONG_STRING_LENGTH ; - - const int remainder = width - (chunks * EFFECTIVE_LONG_STRING_LENGTH) ; bytes = remainder + (chunks * (MAX_LONG_STRING + 1) );