# HG changeset patch # User Josef 'Jeff' Sipek # Date 1706487382 18000 # Node ID 241c40daa9488d76aca70b9a85b21ef013a58a32 # Parent bb22b8ea2242b31537908a36d4e519cad5bd01c5 int: clarify comment for p2roundup It read like the code rounded the value up to the next power of 2 rather than to the next multiple of a power of 2. Signed-off-by: Josef 'Jeff' Sipek diff -r bb22b8ea2242 -r 241c40daa948 include/jeffpc/int.h --- a/include/jeffpc/int.h Wed Sep 13 10:23:45 2023 -0400 +++ b/include/jeffpc/int.h Sun Jan 28 19:16:22 2024 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020,2022 Josef 'Jeff' Sipek + * Copyright (c) 2016-2020,2022,2024 Josef 'Jeff' Sipek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -163,7 +163,7 @@ return !(val & (val - 1)); } -/* round val to the next multiple of power of 2 */ +/* round val to the next multiple of align (a power of 2) */ static inline uint64_t p2roundup(uint64_t val, uint64_t align) { if (align <= 1)