aboutsummaryrefslogtreecommitdiff
path: root/std/os/linux
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-14 18:27:59 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-14 18:27:59 -0400
commit32dd98b19fe3cc384df32704dac0ff3e377dbe0c (patch)
tree2eddf3618d80313bdd24c25bd589bd474f3d82fc /std/os/linux
parentef7f69d14a017c6c2065e4a376bb8e1f05ace04b (diff)
parentf0697c28f80d64c544302aea576e41ebc443b41c (diff)
downloadzig-32dd98b19fe3cc384df32704dac0ff3e377dbe0c.tar.gz
zig-32dd98b19fe3cc384df32704dac0ff3e377dbe0c.zip
Merge remote-tracking branch 'origin/master' into llvm7
Diffstat (limited to 'std/os/linux')
-rw-r--r--std/os/linux/vdso.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/os/linux/vdso.zig b/std/os/linux/vdso.zig
index 2ab4d0cbc1..cbd0cd1df5 100644
--- a/std/os/linux/vdso.zig
+++ b/std/os/linux/vdso.zig
@@ -28,7 +28,7 @@ pub fn lookup(vername: []const u8, name: []const u8) usize {
}
}
}
- const dynv = maybe_dynv ?? return 0;
+ const dynv = maybe_dynv orelse return 0;
if (base == @maxValue(usize)) return 0;
var maybe_strings: ?[*]u8 = null;
@@ -52,9 +52,9 @@ pub fn lookup(vername: []const u8, name: []const u8) usize {
}
}
- const strings = maybe_strings ?? return 0;
- const syms = maybe_syms ?? return 0;
- const hashtab = maybe_hashtab ?? return 0;
+ const strings = maybe_strings orelse return 0;
+ const syms = maybe_syms orelse return 0;
+ const hashtab = maybe_hashtab orelse return 0;
if (maybe_verdef == null) maybe_versym = null;
const OK_TYPES = (1 << elf.STT_NOTYPE | 1 << elf.STT_OBJECT | 1 << elf.STT_FUNC | 1 << elf.STT_COMMON);
@@ -67,7 +67,7 @@ pub fn lookup(vername: []const u8, name: []const u8) usize {
if (0 == syms[i].st_shndx) continue;
if (!mem.eql(u8, name, cstr.toSliceConst(strings + syms[i].st_name))) continue;
if (maybe_versym) |versym| {
- if (!checkver(??maybe_verdef, versym[i], vername, strings))
+ if (!checkver(maybe_verdef.?, versym[i], vername, strings))
continue;
}
return base + syms[i].st_value;