Forked from
oai / openairinterface5G
19558 commits behind the upstream repository.
-
Cédric Roux authored
Adapt calling sites too. When data comes from the user, it is good to check that what we read is correct and warn the user if it's not.
Cédric Roux authoredAdapt calling sites too. When data comes from the user, it is good to check that what we read is correct and warn the user if it's not.
utils.h 426 B
#ifndef _UTILS_H
#define _UTILS_H
#include <stdint.h>
#include <sys/types.h>
void *calloc_or_fail(size_t size);
void *malloc_or_fail(size_t size);
// Converts an hexadecimal ASCII coded digit into its value. **
int hex_char_to_hex_value (char c);
// Converts an hexadecimal ASCII coded string into its value.**
int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int size);
char *itoa(int i);
#endif