tree-wide: "<n>bit" → "<n>-bit"
In some places, "<n> bits" is used when more appropriate.
This commit is contained in:
committed by
Luca Boccassi
parent
221332ee13
commit
da89046643
@@ -661,8 +661,8 @@ static int has_cap(sd_bus_creds *c, size_t offset, int capability) {
|
||||
if ((unsigned) capability > lc)
|
||||
return 0;
|
||||
|
||||
/* If the last cap is 63, then there are 64 caps defined, and we need 2 entries à 32bit hence. *
|
||||
* If the last cap is 64, then there are 65 caps defined, and we need 3 entries à 32bit hence. */
|
||||
/* If the last cap is 63, then there are 64 caps defined, and we need 2 entries à 32-bit hence. *
|
||||
* If the last cap is 64, then there are 65 caps defined, and we need 3 entries à 32-bit hence. */
|
||||
sz = DIV_ROUND_UP(lc+1, 32LU);
|
||||
|
||||
return !!(c->capability[offset * sz + CAP_TO_INDEX((uint32_t) capability)] & CAP_TO_MASK_CORRECTED((uint32_t) capability));
|
||||
|
||||
@@ -225,11 +225,11 @@ static int message_append_field_string(
|
||||
|
||||
assert(m);
|
||||
|
||||
/* dbus only allows 8bit header field ids */
|
||||
/* dbus only allows 8-bit header field ids */
|
||||
if (h > 0xFF)
|
||||
return -EINVAL;
|
||||
|
||||
/* dbus doesn't allow strings over 32bit */
|
||||
/* dbus doesn't allow strings over 32-bit */
|
||||
l = strlen(s);
|
||||
if (l > UINT32_MAX)
|
||||
return -EINVAL;
|
||||
@@ -266,11 +266,11 @@ static int message_append_field_signature(
|
||||
|
||||
assert(m);
|
||||
|
||||
/* dbus only allows 8bit header field ids */
|
||||
/* dbus only allows 8-bit header field ids */
|
||||
if (h > 0xFF)
|
||||
return -EINVAL;
|
||||
|
||||
/* dbus doesn't allow signatures over 8bit */
|
||||
/* dbus doesn't allow signatures over 8-bit */
|
||||
l = strlen(s);
|
||||
if (l > SD_BUS_MAXIMUM_SIGNATURE_LENGTH)
|
||||
return -EINVAL;
|
||||
@@ -300,7 +300,7 @@ static int message_append_field_uint32(sd_bus_message *m, uint64_t h, uint32_t x
|
||||
|
||||
assert(m);
|
||||
|
||||
/* dbus only allows 8bit header field ids */
|
||||
/* dbus only allows 8-bit header field ids */
|
||||
if (h > 0xFF)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -322,7 +322,7 @@ static int message_append_field_uint32(sd_bus_message *m, uint64_t h, uint32_t x
|
||||
static int message_append_reply_cookie(sd_bus_message *m, uint64_t cookie) {
|
||||
assert(m);
|
||||
|
||||
/* 64bit cookies are not supported */
|
||||
/* 64-bit cookies are not supported */
|
||||
if (cookie > UINT32_MAX)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@@ -1203,7 +1203,7 @@ static void *message_extend_body(
|
||||
padding = start_body - m->body_size;
|
||||
added = padding + sz;
|
||||
|
||||
/* Check for 32bit overflows */
|
||||
/* Check for 32-bit overflows */
|
||||
if (end_body < start_body || end_body > UINT32_MAX) {
|
||||
m->poisoned = true;
|
||||
return NULL;
|
||||
|
||||
@@ -918,7 +918,7 @@ static int bind_description(sd_bus *b, int fd, int family) {
|
||||
(void) sd_bus_get_description(b, &d);
|
||||
|
||||
/* Generate a recognizable source address in the abstract namespace. We'll include:
|
||||
* - a random 64bit value (to avoid collisions)
|
||||
* - a random 64-bit value (to avoid collisions)
|
||||
* - our "comm" process name (suppressed if contains "/" to avoid parsing issues)
|
||||
* - the description string of the bus connection. */
|
||||
(void) get_process_comm(0, &comm);
|
||||
|
||||
@@ -1902,7 +1902,7 @@ _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) {
|
||||
|
||||
static uint64_t cookie_inc(uint64_t cookie) {
|
||||
|
||||
/* Stay within the 32bit range, since classic D-Bus can't deal with more */
|
||||
/* Stay within the 32-bit range, since classic D-Bus can't deal with more */
|
||||
if (cookie >= UINT32_MAX)
|
||||
return COOKIE_CYCLED; /* Don't go back to zero, but use the highest bit for checking
|
||||
* whether we are looping. */
|
||||
|
||||
@@ -21,7 +21,7 @@ bool id128_is_valid(const char *s) {
|
||||
l = strlen(s);
|
||||
|
||||
if (l == SD_ID128_STRING_MAX - 1)
|
||||
/* Plain formatted 128bit hex string */
|
||||
/* Plain formatted 128-bit hex string */
|
||||
return in_charset(s, HEXDIGITS);
|
||||
|
||||
if (l == SD_ID128_UUID_STRING_MAX - 1) {
|
||||
@@ -49,7 +49,7 @@ int id128_read_fd(int fd, Id128Flag f, sd_id128_t *ret) {
|
||||
|
||||
assert(fd >= 0);
|
||||
|
||||
/* Reads an 128bit ID from a file, which may either be in plain format (32 hex digits), or in UUID format, both
|
||||
/* Reads an 128-bit ID from a file, which may either be in plain format (32 hex digits), or in UUID format, both
|
||||
* optionally followed by a newline and nothing else. ID files should really be newline terminated, but if they
|
||||
* aren't that's OK too, following the rule of "Be conservative in what you send, be liberal in what you
|
||||
* accept".
|
||||
|
||||
@@ -1062,7 +1062,7 @@ int journal_file_move_to_object(JournalFile *f, ObjectType type, uint64_t offset
|
||||
/* Objects may only be located at multiple of 64 bit */
|
||||
if (!VALID64(offset))
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
|
||||
"Attempt to move to %s object at non-64bit boundary: %" PRIu64,
|
||||
"Attempt to move to %s object at non-64-bit boundary: %" PRIu64,
|
||||
journal_object_type_to_string(type),
|
||||
offset);
|
||||
|
||||
@@ -1109,7 +1109,7 @@ int journal_file_read_object_header(JournalFile *f, ObjectType type, uint64_t of
|
||||
/* Objects may only be located at multiple of 64 bit */
|
||||
if (!VALID64(offset))
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
|
||||
"Attempt to read %s object at non-64bit boundary: %" PRIu64,
|
||||
"Attempt to read %s object at non-64-bit boundary: %" PRIu64,
|
||||
journal_object_type_to_string(type), offset);
|
||||
|
||||
/* Object may not be located in the file header */
|
||||
@@ -1880,7 +1880,7 @@ static int maybe_decompress_payload(
|
||||
|
||||
assert(f);
|
||||
|
||||
/* We can't read objects larger than 4G on a 32bit machine */
|
||||
/* We can't read objects larger than 4G on a 32-bit machine */
|
||||
if ((uint64_t) (size_t) size != size)
|
||||
return -E2BIG;
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
|
||||
|
||||
/* Already includes a newline? Bummer, then
|
||||
* let's write the variable name, then a
|
||||
* newline, then the size (64bit LE), followed
|
||||
* newline, then the size (64-bit LE), followed
|
||||
* by the data and a final newline */
|
||||
|
||||
w[j++] = IOVEC_MAKE(iov[i].iov_base, c - (char*) iov[i].iov_base);
|
||||
|
||||
@@ -1647,7 +1647,7 @@ static bool dirent_is_journal_subdir(const struct dirent *de) {
|
||||
assert(de);
|
||||
|
||||
/* returns true if the specified directory entry looks like a directory that might contain journal
|
||||
* files we might be interested in, i.e. is either a 128bit ID or a 128bit ID suffixed by a
|
||||
* files we might be interested in, i.e. is either a 128-bit ID or a 128-bit ID suffixed by a
|
||||
* namespace. */
|
||||
|
||||
if (!IN_SET(de->d_type, DT_DIR, DT_LNK, DT_UNKNOWN))
|
||||
|
||||
Reference in New Issue
Block a user