30 lines
913 B
Diff
30 lines
913 B
Diff
From 1cd845bffbe55a63ee985e7bf161a52d763f9c36 Mon Sep 17 00:00:00 2001
|
|
From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
|
|
Date: Sat, 22 Apr 2023 02:16:04 +0800
|
|
Subject: [PATCH] Fix signed vs unsigned comparison (#765)
|
|
|
|
As reported by -Wsign-compare. In the case of getting the result of
|
|
comparing the result of sysconf (_SC_PAGESIZE) to other value, this also
|
|
correctly handles edge cases where the above fails and returns -1.
|
|
|
|
Signed-off-by: Wang Zhang <silver_code@hust.edu.cn>
|
|
---
|
|
src/closures.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/closures.c b/src/closures.c
|
|
index 5120021..c02e818 100644
|
|
--- a/src/closures.c
|
|
+++ b/src/closures.c
|
|
@@ -734,7 +734,7 @@ open_temp_exec_file (void)
|
|
static int
|
|
allocate_space (int fd, off_t offset, off_t len)
|
|
{
|
|
- static size_t page_size;
|
|
+ static long page_size;
|
|
|
|
/* Obtain system page size. */
|
|
if (!page_size)
|
|
--
|
|
2.34.1
|