X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fnice.go;h=90713b04eda37bd0856c8595f97cdb783ad8cddd;hb=0ed43747344437800094782e78313b1c41c2cc1c;hp=7682a791e3ca83bccc65d3bd58803e2b06fb98d0;hpb=26d25d4822c87a6c89aabf32f273e627b476ef8c;p=nncp.git diff --git a/src/nice.go b/src/nice.go index 7682a79..90713b0 100644 --- a/src/nice.go +++ b/src/nice.go @@ -64,12 +64,11 @@ func NicenessParse(s string) (uint8, error) { return 0, errors.New("too big niceness delta") } return baseNice - uint8(delta), nil - } else { - if delta > 32 || (baseNice == NiceBulk && delta > 31) { - return 0, errors.New("too big niceness delta") - } - return baseNice + uint8(delta), nil } + if delta > 32 || (baseNice == NiceBulk && delta > 31) { + return 0, errors.New("too big niceness delta") + } + return baseNice + uint8(delta), nil } func NicenessFmt(nice uint8) string {