lib: remove needless cast