Move string_or_null() to wsutil

This commit is contained in:
João Valverde 2021-11-29 18:00:18 +00:00
parent dcbd79584d
commit 37f2a86207
4 changed files with 2 additions and 17 deletions

View File

@ -1598,7 +1598,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
stream_find_frag@Base 1.9.1
stream_new@Base 3.5.0
stream_process_reassembled@Base 1.9.1
string_or_null@Base 1.9.1
string_to_name_resolve@Base 1.9.1
sua_co_class_type_acro_values@Base 1.9.1
t30_facsimile_control_field_vals_ext@Base 1.12.0~rc1

View File

@ -1448,14 +1448,6 @@ convert_string_case(const char *string, gboolean case_insensitive)
}
}
const char *
string_or_null(const char *string)
{
if (string)
return string;
return "[NULL]";
}
#define GN_CHAR_ALPHABET_SIZE 128
static gunichar IA5_default_alphabet[GN_CHAR_ALPHABET_SIZE] = {

View File

@ -282,14 +282,6 @@ guint8 * convert_string_to_hex(const char *string, size_t *nbytes);
WS_DLL_PUBLIC
char * convert_string_case(const char *string, gboolean case_insensitive);
/** Guarantee a non-null string.
*
* @param string The string to check
* @return A pointer 'string' if it's non-null, otherwise "[NULL]".
*/
WS_DLL_PUBLIC
const char * string_or_null(const char *string);
WS_DLL_PUBLIC
void IA5_7BIT_decode(unsigned char * dest, const unsigned char* src, int len);

View File

@ -146,6 +146,8 @@ gchar printable_char_or_period(gchar c);
#define true_or_false(val) ((val) ? "TRUE" : "FALSE")
#define string_or_null(val) ((val) ? (val) : "[NULL]")
#ifdef __cplusplus
}