summaryrefslogtreecommitdiff
path: root/src/atom.c
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2019-11-09 00:05:59 +0200
committerRan Benita <ran@unusedvar.com>2019-11-09 00:05:59 +0200
commit6f8bb5ee70bb4a79d0315da76df6c204d156826f (patch)
tree5dc94bf5603b5e2268c61ff4f81520eab0ce56b3 /src/atom.c
parent2a6155936cd9dda333f3581d95abb3257eee5b33 (diff)
downloadxorg-lib-libxkbcommon-6f8bb5ee70bb4a79d0315da76df6c204d156826f.tar.gz
atom: remove redundant field
The field is redundant. Due to alignment, this will only save memory on 32bit architectures. Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'src/atom.c')
-rw-r--r--src/atom.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/atom.c b/src/atom.c
index 0f9d54e..fd05fb8 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -75,7 +75,6 @@
struct atom_node {
xkb_atom_t left, right;
- xkb_atom_t atom;
unsigned int fingerprint;
char *string;
};
@@ -203,10 +202,10 @@ atom_intern(struct atom_table *table, const char *string, size_t len)
node.left = node.right = XKB_ATOM_NONE;
node.fingerprint = fingerprint;
- node.atom = darray_size(table->table);
+ xkb_atom_t atom = darray_size(table->table);
/* Do this before the append, as it may realloc and change the offsets. */
- *atomp = node.atom;
+ *atomp = atom;
darray_append(table->table, node);
- return node.atom;
+ return atom;
}