Skip to content

Commit b5763ce

Browse files
committed
test_shm_mq: Fix checks for negative queue size.
Noted while addressing compiler warnings pointed out on pgsql-hackers.
1 parent d89746c commit b5763ce

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

contrib/test_shm_mq/setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ typedef struct
2929
BackgroundWorkerHandle *handle[FLEXIBLE_ARRAY_MEMBER];
3030
} worker_state;
3131

32-
static void setup_dynamic_shared_memory(uint64 queue_size, int nworkers,
32+
static void setup_dynamic_shared_memory(int64 queue_size, int nworkers,
3333
dsm_segment **segp,
3434
test_shm_mq_header **hdrp,
3535
shm_mq **outp, shm_mq **inp);
@@ -45,7 +45,7 @@ static bool check_worker_status(worker_state *wstate);
4545
* for a test run.
4646
*/
4747
void
48-
test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp,
48+
test_shm_mq_setup(int64 queue_size, int32 nworkers, dsm_segment **segp,
4949
shm_mq_handle **output, shm_mq_handle **input)
5050
{
5151
dsm_segment *seg;
@@ -86,7 +86,7 @@ test_shm_mq_setup(uint64 queue_size, int32 nworkers, dsm_segment **segp,
8686
* the number of workers, plus one.
8787
*/
8888
static void
89-
setup_dynamic_shared_memory(uint64 queue_size, int nworkers,
89+
setup_dynamic_shared_memory(int64 queue_size, int nworkers,
9090
dsm_segment **segp, test_shm_mq_header **hdrp,
9191
shm_mq **outp, shm_mq **inp)
9292
{

contrib/test_shm_mq/test_shm_mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ typedef struct
3535
} test_shm_mq_header;
3636

3737
/* Set up dynamic shared memory and background workers for test run. */
38-
extern void test_shm_mq_setup(uint64 queue_size, int32 nworkers,
38+
extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
3939
dsm_segment **seg, shm_mq_handle **output,
4040
shm_mq_handle **input);
4141

0 commit comments

Comments
 (0)