Turn an (unresolved) module ID into a type name, to show the user an * error when RDB files contain module data we can't load. * The buffer pointed by 'name' must be 10 bytes at least. The function will * fill it with a null terminated module name. */
| 4467 | * The buffer pointed by 'name' must be 10 bytes at least. The function will |
| 4468 | * fill it with a null terminated module name. */ |
| 4469 | void moduleTypeNameByID(char *name, uint64_t moduleid) { |
| 4470 | const char *cset = ModuleTypeNameCharSet; |
| 4471 | |
| 4472 | name[9] = '\0'; |
| 4473 | char *p = name+8; |
| 4474 | moduleid >>= 10; |
| 4475 | for (int j = 0; j < 9; j++) { |
| 4476 | *p-- = cset[moduleid & 63]; |
| 4477 | moduleid >>= 6; |
| 4478 | } |
| 4479 | } |
| 4480 | |
| 4481 | /* Return the name of the module that owns the specified moduleType. */ |
| 4482 | const char *moduleTypeModuleName(moduleType *mt) { |
no outgoing calls
no test coverage detected