Use constants to replace magic number.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>