X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Ffloat-format.c;h=ee2d1228aa1bb09a076550d69dacfe8c1e414084;hb=b525a9596e60d5ae4c6c464b4a426b77ade3dd72;hp=80924e831501c3bec68b863b5a0869c1af293ea5;hpb=89c05dfe33f9542e60e66dd383f7a514849b5947;p=pspp diff --git a/src/libpspp/float-format.c b/src/libpspp/float-format.c index 80924e8315..ee2d1228aa 100644 --- a/src/libpspp/float-format.c +++ b/src/libpspp/float-format.c @@ -203,14 +203,14 @@ float_get_lowest (void) return x; } -/* Returns CNT bits in X starting from the given bit OFS. */ +/* Returns N bits in X starting from the given bit OFS. */ static inline uint64_t -get_bits (uint64_t x, int ofs, int cnt) +get_bits (uint64_t x, int ofs, int n) { assert (ofs >= 0 && ofs < 64); - assert (cnt > 0 && cnt < 64); - assert (ofs + cnt <= 64); - return (x >> ofs) & ((UINT64_C(1) << cnt) - 1); + assert (n > 0 && n < 64); + assert (ofs + n <= 64); + return (x >> ofs) & ((UINT64_C(1) << n) - 1); } /* Returns NATIVE converted to a form that, when stored in