summaryrefslogtreecommitdiff
path: root/ewah
diff options
context:
space:
mode:
Diffstat (limited to 'ewah')
-rw-r--r--ewah/bitmap.c3
-rw-r--r--ewah/ewah_bitmap.c7
-rw-r--r--ewah/ewah_io.c7
-rw-r--r--ewah/ewah_rlw.c3
-rw-r--r--ewah/ewok.h3
-rw-r--r--ewah/ewok_rlw.h3
6 files changed, 10 insertions, 16 deletions
diff --git a/ewah/bitmap.c b/ewah/bitmap.c
index 7103ceefbf..756bdd050e 100644
--- a/ewah/bitmap.c
+++ b/ewah/bitmap.c
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "cache.h"
#include "ewok.h"
diff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c
index 2dc9c82ecf..b9fdda1d3d 100644
--- a/ewah/ewah_bitmap.c
+++ b/ewah/ewah_bitmap.c
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "git-compat-util.h"
#include "ewok.h"
@@ -210,8 +209,8 @@ size_t ewah_add(struct ewah_bitmap *self, eword_t word)
void ewah_set(struct ewah_bitmap *self, size_t i)
{
const size_t dist =
- (i + BITS_IN_EWORD) / BITS_IN_EWORD -
- (self->bit_size + BITS_IN_EWORD - 1) / BITS_IN_EWORD;
+ DIV_ROUND_UP(i + 1, BITS_IN_EWORD) -
+ DIV_ROUND_UP(self->bit_size, BITS_IN_EWORD);
assert(i >= self->bit_size);
diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c
index 61f6a43579..bed1994551 100644
--- a/ewah/ewah_io.c
+++ b/ewah/ewah_io.c
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "git-compat-util.h"
#include "ewok.h"
@@ -142,8 +141,8 @@ int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len)
* the endianness conversion in a separate pass to ensure
* we're loading 8-byte aligned words.
*/
- memcpy(self->buffer, ptr, self->buffer_size * sizeof(uint64_t));
- ptr += self->buffer_size * sizeof(uint64_t);
+ memcpy(self->buffer, ptr, self->buffer_size * sizeof(eword_t));
+ ptr += self->buffer_size * sizeof(eword_t);
for (i = 0; i < self->buffer_size; ++i)
self->buffer[i] = ntohll(self->buffer[i]);
diff --git a/ewah/ewah_rlw.c b/ewah/ewah_rlw.c
index c723f1aefd..b9643b7d0f 100644
--- a/ewah/ewah_rlw.c
+++ b/ewah/ewah_rlw.c
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "git-compat-util.h"
#include "ewok.h"
diff --git a/ewah/ewok.h b/ewah/ewok.h
index 269a1a8706..dc43d05b64 100644
--- a/ewah/ewok.h
+++ b/ewah/ewok.h
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EWOK_BITMAP_H__
#define __EWOK_BITMAP_H__
diff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h
index 63efdf9698..bb3c6ff7e0 100644
--- a/ewah/ewok_rlw.h
+++ b/ewah/ewok_rlw.h
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __EWOK_RLW_H__
#define __EWOK_RLW_H__