aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nacl/nacl-interfaces.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2015-04-07 16:16:04 -0700
committerRoland McGrath <roland@hack.frob.com>2015-04-07 16:16:04 -0700
commit49a3a2bc136d6ea9f3032d3396c72e980190b68a (patch)
treeb82ce57765baf6cd6527804967e69b38c5437285 /sysdeps/nacl/nacl-interfaces.c
parentd3de4b133c3d2a1aef4c4a839648fcd2e6b52f69 (diff)
downloadglibc-roland/nacl-port/master.zip
glibc-roland/nacl-port/master.tar.gz
glibc-roland/nacl-port/master.tar.bz2
Random nits prepping for upstreaming.roland/nacl-port/master
Diffstat (limited to 'sysdeps/nacl/nacl-interfaces.c')
-rw-r--r--sysdeps/nacl/nacl-interfaces.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sysdeps/nacl/nacl-interfaces.c b/sysdeps/nacl/nacl-interfaces.c
index 469ee65..cb0dcd0 100644
--- a/sysdeps/nacl/nacl-interfaces.c
+++ b/sysdeps/nacl/nacl-interfaces.c
@@ -48,8 +48,7 @@ extern uintptr_t __stop_nacl_optional_interface_tables[]
attribute_hidden __attribute__ ((weak));
static uintptr_t *
-next_nacl_table (uintptr_t *t,
- const struct nacl_interface *i)
+next_nacl_table (uintptr_t *t, const struct nacl_interface *i)
{
return (void *) t + i->table_size;
}
@@ -84,7 +83,7 @@ initialize_mandatory_interfaces (void)
while (i < __stop_nacl_mandatory_interface_names)
{
if (__nacl_irt_query (i->name, t, i->table_size) != i->table_size)
- missing_mandatory_interface (i);
+ missing_mandatory_interface (i);
t = next_nacl_table (t, i);
i = next_nacl_interface (i);
@@ -106,9 +105,9 @@ initialize_optional_interfaces (void)
while (i < __stop_nacl_optional_interface_names)
{
size_t filled = __nacl_irt_query (i->name, t, i->table_size);
- if (filled == 0)
- for (size_t slot = 0; slot < i->table_size / sizeof *t; ++slot)
- t[slot] = (uintptr_t) &nacl_missing_optional_interface;
+ if (filled != i->table_size)
+ for (size_t slot = 0; slot < i->table_size / sizeof *t; ++slot)
+ t[slot] = (uintptr_t) &nacl_missing_optional_interface;
t = next_nacl_table (t, i);
i = next_nacl_interface (i);