or maybe even 
inline EnumType ToEnumType(bool value) {
return value ? PKGMGR_END_SUCCESS : PKGMGR_END_FAILURE;
}
and than you can use 'ToEnumType' every time