Skip to content

Commit ab98739

Browse files
committed
line wrapping
1 parent b6542da commit ab98739

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Diff for: unix/pledge_openbsd.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ func Pledge(promises, execpromises string) error {
3535
return err
3636
}
3737

38-
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(unsafe.Pointer(exptr)), 0)
38+
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)),
39+
uintptr(unsafe.Pointer(exptr)), 0)
3940
if e != 0 {
4041
return e
4142
}
@@ -62,7 +63,8 @@ func PledgePromises(promises string) error {
6263
return err
6364
}
6465

65-
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
66+
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)),
67+
uintptr(expr), 0)
6668
if e != 0 {
6769
return e
6870
}
@@ -89,7 +91,8 @@ func PledgeExecpromises(execpromises string) error {
8991
return err
9092
}
9193

92-
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0)
94+
_, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr),
95+
uintptr(unsafe.Pointer(exptr)), 0)
9396
if e != 0 {
9497
return e
9598
}
@@ -130,7 +133,8 @@ func pledgeAvailable() error {
130133

131134
// Require OpenBSD 6.4 as a minimum.
132135
if maj < 6 || (maj == 6 && min <= 3) {
133-
return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj, min)
136+
return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj,
137+
min)
134138
}
135139

136140
return nil

Diff for: unix/unveil_openbsd.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ func supportsUnveil() error {
6060

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

6667
return nil

0 commit comments

Comments
 (0)