diff options
| author | gingerBill <bill@gingerbill.org> | 2023-09-30 15:34:39 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-09-30 15:34:39 +0100 |
| commit | 14adcb9db89f4a668210a56d909cdca96088aae2 (patch) | |
| tree | 3f11a5d5ca0dd638387abc60e6cc50a8e1604d0c /core/net/dns_windows.odin | |
| parent | 41a22bd83d9458249a60a9d1415f4862f1593b76 (diff) | |
Use `or_break` and `or_continue` where appropriate in the core library
Diffstat (limited to 'core/net/dns_windows.odin')
| -rw-r--r-- | core/net/dns_windows.odin | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/net/dns_windows.odin b/core/net/dns_windows.odin index 72d67c54a..e54b067b6 100644 --- a/core/net/dns_windows.odin +++ b/core/net/dns_windows.odin @@ -45,15 +45,22 @@ _get_dns_records_os :: proc(hostname: string, type: DNS_Record_Type, allocator : count := 0 for r := rec; r != nil; r = r.pNext { - if r.wType != u16(type) do continue // NOTE(tetra): Should never happen, but... + if r.wType != u16(type) { + // NOTE(tetra): Should never happen, but... + continue + } count += 1 } recs := make([dynamic]DNS_Record, 0, count) - if recs == nil do return nil, .System_Error // return no results if OOM. + if recs == nil { + return nil, .System_Error // return no results if OOM. + } for r := rec; r != nil; r = r.pNext { - if r.wType != u16(type) do continue // NOTE(tetra): Should never happen, but... + if r.wType != u16(type) { + continue // NOTE(tetra): Should never happen, but... + } base_record := DNS_Record_Base{ record_name = strings.clone(string(r.pName)), |