pad_xdr.go 265 B

1234567891011121314
  1. // Copyright (C) 2014 Jakob Borg. All rights reserved. Use of this source code
  2. // is governed by an MIT-style license that can be found in the LICENSE file.
  3. // +build !ipdr
  4. package xdr
  5. func pad(l int) int {
  6. d := l % 4
  7. if d == 0 {
  8. return 0
  9. }
  10. return 4 - d
  11. }