Skip to content

Commit

Permalink
line wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Oct 24, 2023
1 parent b6542da commit ab98739
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions unix/pledge_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ func Pledge(promises, execpromises string) error {
return err
}

_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(unsafe.Pointer(exptr)), 0)
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)),
uintptr(unsafe.Pointer(exptr)), 0)
if e != 0 {
return e
}
Expand All @@ -62,7 +63,8 @@ func PledgePromises(promises string) error {
return err
}

_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)),
uintptr(expr), 0)
if e != 0 {
return e
}
Expand All @@ -89,7 +91,8 @@ func PledgeExecpromises(execpromises string) error {
return err
}

_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0)
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr),
uintptr(unsafe.Pointer(exptr)), 0)
if e != 0 {
return e
}
Expand Down Expand Up @@ -130,7 +133,8 @@ func pledgeAvailable() error {

// Require OpenBSD 6.4 as a minimum.
if maj < 6 || (maj == 6 && min <= 3) {
return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj, min)
return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj,
min)
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion unix/unveil_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ func supportsUnveil() error {

// unveil is not available before 6.4
if maj < 6 || (maj == 6 && min <= 3) {
return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min)
return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj,
min)
}

return nil
Expand Down

0 comments on commit ab98739

Please sign in to comment.