Skip to content

Commit

Permalink
all: fix various syntax issues
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
pcmoore committed Aug 28, 2024
1 parent 22feeba commit f191e18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/io_uring/iouring.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ int uring_import(int fd, struct io_uring *ring, struct io_uring_params *params)
ring->enter_ring_fd = fd;

ring->sq.ring_sz = params->sq_off.array +
params->sq_entries * sizeof(unsigned);
params->sq_entries *sizeof(unsigned);
ring->cq.ring_sz = params->cq_off.cqes +
params->cq_entries * sizeof(struct io_uring_cqe);
params->cq_entries *sizeof(struct io_uring_cqe);

ring->sq.ring_ptr = mmap(NULL, ring->sq.ring_sz, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_POPULATE, fd,
Expand Down Expand Up @@ -266,7 +266,7 @@ int uring_import(int fd, struct io_uring *ring, struct io_uring_params *params)
ring->sq.array = ring->sq.ring_ptr + params->sq_off.array;

ring->sq.sqes = mmap(NULL,
params->sq_entries * sizeof(struct io_uring_sqe),
params->sq_entries *sizeof(struct io_uring_sqe),
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_POPULATE,
fd, IORING_OFF_SQES);
if (ring->sq.sqes == MAP_FAILED)
Expand Down
8 changes: 4 additions & 4 deletions tests/time_change/test
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ sub test_adjtime_setoffset {
filter_cleanup();
}

test_adjtime_setoffset( "adjtimex", "adjtimex", 42, 123456 );
test_adjtime_setoffset( "adjtimex", "adjtimex", 42, 123456 );
test_adjtime_setoffset( "posix", "clock_adjtime", -10, 123456 );

test_adjtime_setoffset( "adjtimex", "adjtimex", 0, 0 );
Expand Down Expand Up @@ -243,8 +243,8 @@ sub test_adjtime_ntpval_all {

my $FC = ( 1000 << 16 );
test_adjtime_ntpval_all( "adjust", 42, 42, -42, -42 );
test_adjtime_ntpval_all( "offset", 100, "-?[0-9]+", 200, "-?[0-9]+" );
test_adjtime_ntpval_all( "offset", 100, "-?[0-9]+", 200, "-?[0-9]+" );
test_adjtime_ntpval_all( "freq", 42, 42 * $FC, -42, -42 * $FC );
test_adjtime_ntpval_all( "status", 0, "[0-9]+", 0, "[0-9]+" );
test_adjtime_ntpval_all( "status", 0, "[0-9]+", 0, "[0-9]+" );
test_adjtime_ntpval_all( "tai", 42, 42, 1234, 1234 );
test_adjtime_ntpval_all( "tick", 0, "-?[0-9]+", 0, "-?[0-9]+" );
test_adjtime_ntpval_all( "tick", 0, "-?[0-9]+", 0, "-?[0-9]+" );
2 changes: 1 addition & 1 deletion tests/time_change/test_adjtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static void setter_tick(struct timex *txc, long v)

int main(int argc, char **argv)
{
int (*f_adjtimex)(struct timex * txc);
int (*f_adjtimex)(struct timex *txc);
const char *mode, *op;
int ret;

Expand Down

0 comments on commit f191e18

Please sign in to comment.