Kdrefactor

magic numbers ?
Moreover this two conditions could be split to two inline functions and named.