Simply so that it is more unlikely that users end up picking this
value too so that we can recognize better whether the user changed
the value while we had it temporarily bumped. */
Simply so that it is more unlikely that users end up picking this
value too so that we can recognize better whether the user changed
the value while we had it temporarily bumped. */
-#define BUMP_REQUEST_NR (20*1024)
+#define BUMP_REQUEST_NR (20*1024u)
int block_bump_request_nr(const char *p) {
struct stat st;
int block_bump_request_nr(const char *p) {
struct stat st;
@@ -298,7+298,7 @@ int block_bump_request_nr(const char *p) {
free(line);
line = NULL;
free(line);
line = NULL;
- if (asprintf(&line, "%lu", (unsigned long) BUMP_REQUEST_NR) < 0) {
+ if (asprintf(&line, "%u", BUMP_REQUEST_NR) < 0) {
r = -ENOMEM;
goto finish;
}
r = -ENOMEM;
goto finish;
}
@@ -307,7+307,7 @@ int block_bump_request_nr(const char *p) {
if (r < 0)
goto finish;
if (r < 0)
goto finish;
- log_info("Bumped block_nr parameter of %u:%u to %lu. This is a temporary hack and should be removed one day.", major(d), minor(d), (unsigned long) BUMP_REQUEST_NR);
+ log_info("Bumped block_nr parameter of %u:%u to %u. This is a temporary hack and should be removed one day.", major(d), minor(d), BUMP_REQUEST_NR);
r = 1;
finish:
r = 1;
finish:
@@ -381,7+381,7 @@ int block_set_readahead(const char *p, uint64_t bytes) {
goto finish;
}
goto finish;
}
- if (asprintf(&line, "%llu", (unsigned long long) bytes / 1024ULL) < 0) {
+ if (asprintf(&line, "%llu", bytes / 1024ULL) < 0) {