diff options
author | Bin Lu <bin.lu@arm.com> | 2020-04-28 01:15:38 -0400 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2020-04-28 01:15:43 -0400 |
commit | 44d780aa4bd15cd5fb19151910d1f4e681084333 (patch) | |
tree | 192081abaf990d6a1e59d2fe45433e836062cdfe /pkg/sentry/arch/arch_aarch64.go | |
parent | 316394ee8920cd4dc84e031278e5d336d9db0944 (diff) |
code clean in arch module
Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'pkg/sentry/arch/arch_aarch64.go')
-rw-r--r-- | pkg/sentry/arch/arch_aarch64.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/arch/arch_aarch64.go b/pkg/sentry/arch/arch_aarch64.go index 529980267..343f81f59 100644 --- a/pkg/sentry/arch/arch_aarch64.go +++ b/pkg/sentry/arch/arch_aarch64.go @@ -274,7 +274,7 @@ const ( func (s *State) PtraceGetRegSet(regset uintptr, dst io.Writer, maxlen int) (int, error) { switch regset { case _NT_PRSTATUS: - if maxlen < ptraceRegsSize { + if maxlen < registersSize { return 0, syserror.EFAULT } return s.PtraceGetRegs(dst) @@ -287,7 +287,7 @@ func (s *State) PtraceGetRegSet(regset uintptr, dst io.Writer, maxlen int) (int, func (s *State) PtraceSetRegSet(regset uintptr, src io.Reader, maxlen int) (int, error) { switch regset { case _NT_PRSTATUS: - if maxlen < ptraceRegsSize { + if maxlen < registersSize { return 0, syserror.EFAULT } return s.PtraceSetRegs(src) |