case 1: printf("%hhu",*(uint8_t*)data); return; case 2: printf("%hu",ntohs(*(uint16_t*)data)); return; case 4: printf("%u",ntohl(*(uint32_t*)data)); return; case 8: printf("%Lu",ntohll(*(uint64_t*)data)); return; default: errorf("Uint with length %d unparseable", type.length); return; }
case 1: printf("%hhu",*(uint8_t*)data); return; case 2: printf("%hu",ntohs(*(uint16_t*)data)); return; case 4: printf("%u",ntohl(*(uint32_t*)data)); return; case 8: printf("%Lu",ntohll(*(uint64_t*)data)); return; default: errorf("Uint with length %d unparseable", type.length); return;
static void printUint(FieldType type, FieldData* data) {	switch (type.length) {		case 1:			printf("%hhu",*(uint8_t*)data);			return;		case 2:			printf("%hu",ntohs(*(uint16_t*)data));			return;		case 4:			printf("%u",ntohl(*(uint32_t*)data));			return;		case 8:			printf("%Lu",ntohll(*(uint64_t*)data));			return;		default:			errorf("Uint with length %d unparseable", type.length);			return;		}	}