aboutsummaryrefslogtreecommitdiff
path: root/std/os/linux/vdso.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-05-26 13:17:34 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-05-26 18:32:44 -0400
commit2f040a23c8b968db56ab4c4725d6651f5ea3418e (patch)
tree58727a1c2ffdf356db2f5c01e84940e4ced0541f /std/os/linux/vdso.zig
parent7cb6279ac0cec065234347bda5944be64fe8b3da (diff)
downloadzig-2f040a23c8b968db56ab4c4725d6651f5ea3418e.tar.gz
zig-2f040a23c8b968db56ab4c4725d6651f5ea3418e.zip
clean up references to os
Diffstat (limited to 'std/os/linux/vdso.zig')
-rw-r--r--std/os/linux/vdso.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/std/os/linux/vdso.zig b/std/os/linux/vdso.zig
index efd69d8542..44cd0271cd 100644
--- a/std/os/linux/vdso.zig
+++ b/std/os/linux/vdso.zig
@@ -1,7 +1,6 @@
const std = @import("../../std.zig");
const elf = std.elf;
const linux = std.os.linux;
-const cstr = std.cstr;
const mem = std.mem;
const maxInt = std.math.maxInt;
@@ -66,7 +65,7 @@ pub fn lookup(vername: []const u8, name: []const u8) usize {
if (0 == (u32(1) << @intCast(u5, syms[i].st_info & 0xf) & OK_TYPES)) continue;
if (0 == (u32(1) << @intCast(u5, syms[i].st_info >> 4) & OK_BINDS)) continue;
if (0 == syms[i].st_shndx) continue;
- if (!mem.eql(u8, name, cstr.toSliceConst(strings + syms[i].st_name))) continue;
+ if (!mem.eql(u8, name, mem.toSliceConst(u8, strings + syms[i].st_name))) continue;
if (maybe_versym) |versym| {
if (!checkver(maybe_verdef.?, versym[i], vername, strings))
continue;
@@ -88,5 +87,5 @@ fn checkver(def_arg: *elf.Verdef, vsym_arg: i32, vername: []const u8, strings: [
def = @intToPtr(*elf.Verdef, @ptrToInt(def) + def.vd_next);
}
const aux = @intToPtr(*elf.Verdaux, @ptrToInt(def) + def.vd_aux);
- return mem.eql(u8, vername, cstr.toSliceConst(strings + aux.vda_name));
+ return mem.eql(u8, vername, mem.toSliceConst(u8, strings + aux.vda_name));
}