[sheepdog] [PATCH 2/6] sheep: fix printf format errors on 32 bit machines
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Wed Sep 19 06:25:41 CEST 2012
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/sheep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sheep/sheep.c b/sheep/sheep.c
index e3d079e..3be45ff 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -194,7 +194,7 @@ static void object_cache_size_set(char *s)
int len = strlen(header);
char *size, *p;
uint32_t cache_size;
- uint32_t max_cache_size = UINT32_MAX / 1024 / 1024;
+ const uint32_t max_cache_size = UINT32_MAX / 1024 / 1024;
assert(!strncmp(s, header, len));
@@ -389,8 +389,8 @@ int main(int argc, char **argv)
if (optarg == p || free_space <= 0 ||
UINT64_MAX < free_space) {
fprintf(stderr, "Invalid free space size '%s': "
- "must be an integer between 0 and %lu\n",
- optarg, UINT64_MAX);
+ "must be an integer between 0 and "
+ "%"PRIu64"\n", optarg, UINT64_MAX);
exit(1);
}
sys->disk_space = free_space * 1024 * 1024;
--
1.7.2.5
More information about the sheepdog
mailing list