summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-09-24 08:29:27 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-09-24 08:29:27 -0700
commitcf647d9300961108f50c6ae47b234d0e9afb89b4 (patch)
tree514bdc289a9571c9f2cfc550647bb4441d4f86a2 /src/dispnew.c
parent4710d6f406ff792aaae65ad141f96346be44909d (diff)
* dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
instead of ints, as it's the usual style for offsetof constants. See: http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index f9132f37f6..27167f4e1e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -838,7 +838,7 @@ clear_window_matrices (struct window *w, bool desired_p)
void
clear_glyph_row (struct glyph_row *row)
{
- int off = offsetof (struct glyph_row, used);
+ enum { off = offsetof (struct glyph_row, used) };
/* Zero everything except pointers in `glyphs'. */
memset (row->used, 0, sizeof *row - off);
@@ -988,7 +988,7 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
static void
copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
{
- int off = offsetof (struct glyph_row, x);
+ enum { off = offsetof (struct glyph_row, x) };
memcpy (&to->x, &from->x, sizeof *to - off);
}