diff options
Diffstat (limited to 'epan/dissectors')
44 files changed, 1148 insertions, 1148 deletions
diff --git a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c index 5306cfc022..5097663edc 100644 --- a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c +++ b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c @@ -4315,14 +4315,14 @@ find_saved_invokedata(asn1_ctx_t *actx, struct ansi_tcap_private_t *p_private_tc /* Reverse order to invoke */ switch(ansi_map_response_matching_type){ case ANSI_MAP_TID_ONLY: - g_snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str); + snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str); break; case ANSI_MAP_TID_AND_SOURCE: - g_snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,dst_str); + snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,dst_str); break; case ANSI_MAP_TID_SOURCE_AND_DEST: default: - g_snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,dst_str,src_str); + snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,dst_str,src_str); break; } diff --git a/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c b/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c index b9119bc8de..10a5f4b72f 100644 --- a/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c +++ b/epan/dissectors/asn1/ansi_tcap/packet-ansi_tcap-template.c @@ -197,14 +197,14 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U /* Reverse order to invoke */ switch(ansi_tcap_response_matching_type){ case ANSI_TCAP_TID_ONLY: - g_snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str); + snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str); break; case ANSI_TCAP_TID_AND_SOURCE: - g_snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,dst); + snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,dst); break; case ANSI_TCAP_TID_SOURCE_AND_DEST: default: - g_snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,dst,src); + snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,dst,src); break; } diff --git a/epan/dissectors/asn1/e1ap/packet-e1ap-template.c b/epan/dissectors/asn1/e1ap/packet-e1ap-template.c index 82482ffa4f..87daf9fc26 100644 --- a/epan/dissectors/asn1/e1ap/packet-e1ap-template.c +++ b/epan/dissectors/asn1/e1ap/packet-e1ap-template.c @@ -108,19 +108,19 @@ static const true_false_string e1ap_tfs_InterfacesToTrace = { static void e1ap_MaxPacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void e1ap_PacketDelayBudget_uL_D1_Result_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void e1ap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static e1ap_private_data_t* diff --git a/epan/dissectors/asn1/f1ap/packet-f1ap-template.c b/epan/dissectors/asn1/f1ap/packet-f1ap-template.c index e3adf59638..319f70df36 100644 --- a/epan/dissectors/asn1/f1ap/packet-f1ap-template.c +++ b/epan/dissectors/asn1/f1ap/packet-f1ap-template.c @@ -414,19 +414,19 @@ static void set_message_label(asn1_ctx_t *actx, int type) static void f1ap_MaxPacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void f1ap_PacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void f1ap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static f1ap_private_data_t* diff --git a/epan/dissectors/asn1/h225/h225.cnf b/epan/dissectors/asn1/h225/h225.cnf index a4a5c80b9d..567d0be433 100644 --- a/epan/dissectors/asn1/h225/h225.cnf +++ b/epan/dissectors/asn1/h225/h225.cnf @@ -305,7 +305,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { char temp[50]; - g_snprintf(temp, 50, "%%s %%s", h225_pi->frame_label, codec_str); + snprintf(temp, 50, "%%s %%s", h225_pi->frame_label, codec_str); (void) g_strlcpy(h225_pi->frame_label, temp, 50); h225_pi->is_faststart = TRUE; } @@ -415,7 +415,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_STATUS; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -428,7 +428,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_INFORMATION; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -443,10 +443,10 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi->cs_type = H225_PROGRESS; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -459,7 +459,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_SETUP_ACK; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -472,7 +472,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_FACILITY; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -500,10 +500,10 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi->cs_type = H225_SETUP; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -518,10 +518,10 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi->cs_type = H225_CALL_PROCEDING; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -536,10 +536,10 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi->cs_type = H225_ALERTING; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -552,7 +552,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_RELEASE_COMPLET; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- @@ -567,10 +567,10 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber h225_pi->cs_type = H225_CONNECT; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } #.END #---------------------------------------------------------------------------------------- diff --git a/epan/dissectors/asn1/h245/h245.cnf b/epan/dissectors/asn1/h245/h245.cnf index 13ff4ca836..1610861de6 100644 --- a/epan/dissectors/asn1/h245/h245.cnf +++ b/epan/dissectors/asn1/h245/h245.cnf @@ -381,7 +381,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if (strlen(h245_pi->frame_label) == 0) { - g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_RequestMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_RequestMessage_short_vals, "UKN")); /* if it is OLC or RM*/ if ((codec_type != NULL) && (( value == RequestMessage_openLogicalChannel) || ( value == RequestMessage_requestMode))) @@ -404,7 +404,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if (h245_pi != NULL){ /* Add to packet info */ if ( strlen(h245_pi->frame_label) == 0 ){ - g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN")); } (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50); } @@ -421,7 +421,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format /* Add to packet info */ if (h245_pi !=NULL){ if ( strlen(h245_pi->frame_label) == 0 ){ - g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN")); } (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50); @@ -439,7 +439,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format /* Add to packet info */ if (h245_pi != NULL){ if ( strlen(h245_pi->frame_label) == 0 ){ - g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN")); } (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50); } @@ -600,7 +600,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if (hf_index == hf_h245_subMessageIdentifier_standard) { col_append_str(actx->pinfo->cinfo, COL_INFO, val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>") ); - g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>")); } #.END diff --git a/epan/dissectors/asn1/h245/packet-h245-template.c b/epan/dissectors/asn1/h245/packet-h245-template.c index b71edc7288..da9c6f4d57 100644 --- a/epan/dissectors/asn1/h245/packet-h245-template.c +++ b/epan/dissectors/asn1/h245/packet-h245-template.c @@ -592,6 +592,6 @@ static void init_h245_packet_info(h245_packet_info *pi) pi->msg_type = H245_OTHER; pi->frame_label[0] = '\0'; - g_snprintf(pi->comment, sizeof(pi->comment), "H245 "); + snprintf(pi->comment, sizeof(pi->comment), "H245 "); } diff --git a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c index be9f5c4ff5..718c261496 100644 --- a/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c +++ b/epan/dissectors/asn1/ieee1609dot2/packet-ieee1609dot2-template.c @@ -65,9 +65,9 @@ ieee1609dot2_NinetyDegreeInt_fmt(gchar *s, guint32 v) { gint32 lat = (gint32)v; if (lat == 900000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lat); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lat); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lat) / 10000000, abs(lat) % 10000000 * 6 / 1000000, abs(lat) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -81,9 +81,9 @@ ieee1609dot2_OneEightyDegreeInt_fmt(gchar *s, guint32 v) { gint32 lng = (gint32)v; if (lng == 1800000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lng); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lng); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lng) / 10000000, abs(lng) % 10000000 * 6 / 1000000, abs(lng) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -97,7 +97,7 @@ ieee1609dot2_ElevInt_fmt(gchar *s, guint32 v) { // Range is from -4096 to 61439 in units of one-tenth of a meter gint32 alt = (gint32)v - 4096; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%u)", alt * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%u)", alt * 0.1, v); } static void @@ -105,7 +105,7 @@ ieee1609dot2_Time32_fmt(gchar *s, guint32 v) { time_t secs = v + 1072915200 - 5; struct tm *tm = gmtime(&secs); - g_snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u (%u)", + snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u (%u)", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, v ); } @@ -116,7 +116,7 @@ ieee1609dot2_Time64_fmt(gchar *s, guint64 v) time_t secs = v / 1000000 + 1072915200 - 5; guint32 usecs = v % 1000000; struct tm *tm = gmtime(&secs); - g_snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u.%06u (%" G_GUINT64_FORMAT ")", + snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u.%06u (%" G_GUINT64_FORMAT ")", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, usecs, v ); } diff --git a/epan/dissectors/asn1/its/packet-its-template.c b/epan/dissectors/asn1/its/packet-its-template.c index 58a6856620..fb4714bf83 100644 --- a/epan/dissectors/asn1/its/packet-its-template.c +++ b/epan/dissectors/asn1/its/packet-its-template.c @@ -363,9 +363,9 @@ its_latitude_fmt(gchar *s, guint32 v) { gint32 lat = (gint32)v; if (lat == 900000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lat) / 10000000, abs(lat) % 10000000 * 6 / 1000000, abs(lat) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -379,9 +379,9 @@ its_longitude_fmt(gchar *s, guint32 v) { gint32 lng = (gint32)v; if (lng == 1800000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lng) / 10000000, abs(lng) % 10000000 * 6 / 1000000, abs(lng) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -395,9 +395,9 @@ its_altitude_fmt(gchar *s, guint32 v) { gint32 alt = (gint32)v; if (alt == 800001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); } } @@ -406,9 +406,9 @@ its_delta_latitude_fmt(gchar *s, guint32 v) { gint32 lat = (gint32)v; if (lat == 131072) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lat) / 10000000, abs(lat) % 10000000 * 6 / 1000000, abs(lat) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -422,9 +422,9 @@ its_delta_longitude_fmt(gchar *s, guint32 v) { gint32 lng = (gint32)v; if (lng == 131072) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lng) / 10000000, abs(lng) % 10000000 * 6 / 1000000, abs(lng) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -438,9 +438,9 @@ its_delta_altitude_fmt(gchar *s, guint32 v) { gint32 alt = (gint32)v; if (alt == 12800) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); } } @@ -448,7 +448,7 @@ static void its_path_delta_time_fmt(gchar *s, guint32 v) { gint32 dt = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%d)", dt * 0.01, dt); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%d)", dt * 0.01, dt); } @@ -456,11 +456,11 @@ static void its_sax_length_fmt(gchar *s, guint32 v) { if (v == 4095) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 4094) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); } } @@ -469,9 +469,9 @@ its_heading_value_fmt(gchar *s, guint32 v) { const gchar *p = try_val_to_str(v, VALS(its_HeadingValue_vals)); if (p) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", p, v); + snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", p, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } @@ -479,11 +479,11 @@ static void its_heading_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } @@ -491,12 +491,12 @@ static void its_speed_value_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", v); } else if (v == 16383) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { double vms = v * 0.01; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", vms, vms * 3.6, v); } } @@ -505,11 +505,11 @@ static void its_speed_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s (%d)", v * 0.01, v); } } @@ -517,11 +517,11 @@ static void its_vehicle_length_value_fmt(gchar *s, guint32 v) { if (v == 1023) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 1022) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); } } @@ -529,11 +529,11 @@ static void its_vehicle_width_fmt(gchar *s, guint32 v) { if (v == 62) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 61) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); } } @@ -542,9 +542,9 @@ its_acceleration_value_fmt(gchar *s, guint32 v) { gint32 acc = (gint32)v; if (acc == 161) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", acc * 0.1, acc); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", acc * 0.1, acc); } } @@ -552,11 +552,11 @@ static void its_acceleration_confidence_fmt(gchar *s, guint32 v) { if (v == 102) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", v * 0.1, v); } } @@ -565,11 +565,11 @@ its_curvature_value_fmt(gchar *s, guint32 v) { gint32 curv = (gint32)v; if (curv == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); } else if (curv == 30001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.3fm %s (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.3fm %s (%d)", 30000.0 / curv, (curv > 0) ? "left" : "right", curv); @@ -581,11 +581,11 @@ its_yaw_rate_value_fmt(gchar *s, guint32 v) { gint32 yaw = (gint32)v; if (yaw == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); } else if (yaw == 32767) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f°/s %s (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2f°/s %s (%d)", yaw * 0.01, (yaw > 0) ? "left" : "right", yaw); @@ -597,11 +597,11 @@ its_swa_value_fmt(gchar *s, guint32 v) { gint32 swa = (gint32)v; if (swa == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); } else if (swa == 512) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° %s (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° %s (%d)", swa * 1.5, (swa > 0) ? "left" : "right", swa); @@ -612,11 +612,11 @@ static void its_swa_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 1.5, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 1.5, v); } } @@ -624,9 +624,9 @@ static void dsrc_moi_fmt(gchar *s, guint32 v) { if (v == 527040) { - g_snprintf(s, ITEM_LABEL_LENGTH, "invalid (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "invalid (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ud %02u:%02u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%ud %02u:%02u (%d)", v / 1440, v % 1440 / 60, v % 60, v); } } @@ -635,11 +635,11 @@ static void dsrc_dsecond_fmt(gchar *s, guint32 v) { if (v == 65535) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if ((61000 <= v) && (v <= 65534)) { - g_snprintf(s, ITEM_LABEL_LENGTH, "reserved (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "reserved (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%02u.%03u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%02u.%03u (%d)", v / 1000, v % 1000, v); } } @@ -648,11 +648,11 @@ static void dsrc_time_mark_fmt(gchar *s, guint32 v) { if (v == 36001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", v); } else if (v == 36000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "moreThanHour (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "moreThanHour (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%02u:%02u.%u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%02u:%02u.%u (%d)", v / 600, v % 600 / 10, v % 10, v); } } @@ -681,10 +681,10 @@ static void dsrc_velocity_fmt(gchar *s, guint32 v) { if (v == 8191) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { double vms = v * 0.02; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %ukm/h (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %ukm/h (%d)", vms, (int)lround(vms * 3.6), v); } } @@ -692,7 +692,7 @@ dsrc_velocity_fmt(gchar *s, guint32 v) static void dsrc_angle_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f° (%d)", v * 0.0125, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f° (%d)", v * 0.0125, v); } static void @@ -700,13 +700,13 @@ dsrc_delta_time_fmt(gchar *s, guint32 v) { gint32 dt = (gint32)v; if (dt == -122) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", dt); + snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", dt); } else if (dt == -121) { - g_snprintf(s, ITEM_LABEL_LENGTH, "moreThanMinus20Minutes (%d)", dt); + snprintf(s, ITEM_LABEL_LENGTH, "moreThanMinus20Minutes (%d)", dt); } else if (dt == 121) { - g_snprintf(s, ITEM_LABEL_LENGTH, "moreThanPlus20Minutes (%d)", dt); + snprintf(s, ITEM_LABEL_LENGTH, "moreThanPlus20Minutes (%d)", dt); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%s%d:%02u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%s%d:%02u (%d)", (dt < 0) ? "-" : "", abs(dt) / 6, abs(dt) % 6 * 10, dt); } } @@ -715,11 +715,11 @@ static void cpm_general_confidence_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unknown (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unknown (%u)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u%% (%u)", v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u%% (%u)", v, v); } } @@ -727,18 +727,18 @@ static void cpm_distance_value_fmt(gchar *s, guint32 v) { gint32 sv = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", sv * 0.01, sv); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", sv * 0.01, sv); } static void cpm_distance_confidence_fmt(gchar *s, guint32 v) { if (v == 102) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); } } @@ -747,12 +747,12 @@ cpm_speed_value_ext_fmt(gchar *s, guint32 v) { gint32 sv = (gint32)v; if (sv == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", sv); + snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", sv); } else if (sv == 16383) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", sv); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", sv); } else { double vms = sv * 0.01; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", vms, vms * 3.6, sv); } } @@ -761,9 +761,9 @@ static void cpm_cartesian_angle_value_fmt(gchar *s, guint32 v) { if (v == 3601) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } @@ -771,29 +771,29 @@ static void cpm_angle_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } static void cpm_object_dimension_value_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); } static void cpm_object_dimension_confidence_fmt(gchar *s, guint32 v) { if (v == 102) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); } } @@ -818,7 +818,7 @@ its_msgid_prompt(packet_info *pinfo, gchar *result) { guint32 msgid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, hf_its_messageID, pinfo->curr_layer_num)); - g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "MsgId (%s%u)", UTF8_RIGHTWARDS_ARROW, msgid); + snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "MsgId (%s%u)", UTF8_RIGHTWARDS_ARROW, msgid); } static gpointer diff --git a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c index 490cd329e1..8e03125186 100644 --- a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c +++ b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c @@ -690,11 +690,11 @@ add_encryption_key(packet_info *pinfo, } new_key = wmem_new0(key_scope, enc_key_t); - g_snprintf(new_key->key_origin, KRB_MAX_ORIG_LEN, "%s %s in frame %u", + snprintf(new_key->key_origin, KRB_MAX_ORIG_LEN, "%s %s in frame %u", methodl, origin, pinfo->num); new_key->fd_num = pinfo->num; new_key->id = ++private_data->learnt_key_ids; - g_snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "%d.%u", + snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "%d.%u", new_key->fd_num, new_key->id); new_key->keytype=keytype; new_key->keylength=keylength; @@ -755,7 +755,7 @@ save_encryption_key(tvbuff_t *tvb _U_, int offset _U_, int length _U_, const char *element = proto_registrar_get_name(hf_index); char origin[KRB_MAX_ORIG_LEN] = { 0, }; - g_snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); + snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); add_encryption_key(actx->pinfo, private_data, @@ -926,12 +926,12 @@ static void missing_encryption_key(proto_tree *tree, packet_info *pinfo, enc_key_t *mek = NULL; mek = wmem_new0(pinfo->pool, enc_key_t); - g_snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, + snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, "keytype %d usage %d missing in frame %u", keytype, usage, pinfo->num); mek->fd_num = pinfo->num; mek->id = ++private_data->missing_key_ids; - g_snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", + snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", mek->id); mek->keytype=keytype; @@ -1002,12 +1002,12 @@ static void missing_signing_key(proto_tree *tree, packet_info *pinfo, enc_key_t *mek = NULL; mek = wmem_new0(pinfo->pool, enc_key_t); - g_snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, + snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, "checksum %d keytype %d missing in frame %u", checksum, keytype, pinfo->num); mek->fd_num = pinfo->num; mek->id = ++private_data->missing_key_ids; - g_snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", + snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", mek->id); mek->keytype=keytype; @@ -1134,19 +1134,19 @@ read_keytab_file(const char *filename) new_key = wmem_new0(wmem_epan_scope(), enc_key_t); new_key->fd_num = -1; new_key->id = ++kerberos_longterm_ids; - g_snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); + snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); new_key->next = enc_key_list; /* generate origin string, describing where this key came from */ pos=new_key->key_origin; pos+=MIN(KRB_MAX_ORIG_LEN, - g_snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); + snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); for(i=0;i<key.principal->length;i++){ pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "%s%s",(i?"/":""),(key.principal->data[i]).data)); + snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "%s%s",(i?"/":""),(key.principal->data[i]).data)); } pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "@%s",key.principal->realm.data)); + snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "@%s",key.principal->realm.data)); *pos=0; new_key->keytype=key.key.enctype; new_key->keylength=key.key.length; @@ -2326,19 +2326,19 @@ read_keytab_file(const char *filename) new_key = wmem_new0(wmem_epan_scope(), enc_key_t); new_key->fd_num = -1; new_key->id = ++kerberos_longterm_ids; - g_snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); + snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); new_key->next = enc_key_list; /* generate origin string, describing where this key came from */ pos=new_key->key_origin; pos+=MIN(KRB_MAX_ORIG_LEN, - g_snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); + snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); for(i=0;i<key.principal->name.name_string.len;i++){ pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "%s%s",(i?"/":""),key.principal->name.name_string.val[i])); + snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "%s%s",(i?"/":""),key.principal->name.name_string.val[i])); } pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "@%s",key.principal->realm)); + snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "@%s",key.principal->realm)); *pos=0; new_key->keytype=key.keyblock.keytype; new_key->keylength=(int)key.keyblock.keyvalue.length; @@ -2475,7 +2475,7 @@ add_encryption_key(packet_info *pinfo, int keytype, int keylength, const char *k new_key->keytype = keytype; new_key->length = keylength; new_key->contents = g_memdup2(keyvalue, keylength); - g_snprintf(new_key->origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %u", origin, pinfo->num); + snprintf(new_key->origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %u", origin, pinfo->num); service_key_list = g_slist_append(service_key_list, (gpointer) new_key); } @@ -2490,7 +2490,7 @@ save_encryption_key(tvbuff_t *tvb _U_, int offset _U_, int length _U_, const char *element = proto_registrar_get_name(hf_index); char origin[KRB_MAX_ORIG_LEN] = { 0, }; - g_snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); + snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); add_encryption_key(actx->pinfo, private_data->key.keytype, @@ -2603,7 +2603,7 @@ read_keytab_file(const char *service_key_file) sk->keytype = KEYTYPE_DES3_CBC_MD5; sk->length = DES3_KEY_SIZE; sk->contents = g_memdup2(buf + 2, DES3_KEY_SIZE); - g_snprintf(sk->origin, KRB_MAX_ORIG_LEN, "3DES service key file, key #%d, offset %ld", count, ftell(skf)); + snprintf(sk->origin, KRB_MAX_ORIG_LEN, "3DES service key file, key #%d, offset %ld", count, ftell(skf)); service_key_list = g_slist_append(service_key_list, (gpointer) sk); if (fseek(skf, newline_skip, SEEK_CUR) < 0) { fprintf(stderr, "unable to seek...\n"); diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c index b931381999..b1e63b95c3 100644 --- a/epan/dissectors/asn1/ldap/packet-ldap-template.c +++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c @@ -677,7 +677,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as dissect_dcerpc_uuid_t(tvb, offset, actx->pinfo, tree, drep, hf_ldap_guid, &uuid); ldapvalue_string=(char*)wmem_alloc(actx->pinfo->pool, 1024); - g_snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid.data1, uuid.data2, uuid.data3, uuid.data4[0], uuid.data4[1], uuid.data4[2], uuid.data4[3], uuid.data4[4], uuid.data4[5], uuid.data4[6], uuid.data4[7]); @@ -691,7 +691,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as flags=tvb_get_letohl(tvb, offset); ldapvalue_string=(char*)wmem_alloc(actx->pinfo->pool, 1024); - g_snprintf(ldapvalue_string, 1023, "0x%08x",flags); + snprintf(ldapvalue_string, 1023, "0x%08x",flags); /* populate bitmask subtree */ offset = dissect_mscldap_ntver_flags(tree, tvb, offset); @@ -1732,7 +1732,7 @@ dissect_ldap_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat dissect_dcerpc_uuid_t(tvb, 0, pinfo, tree, drep, hf_ldap_guid, &uuid); ldapvalue_string=(char*)wmem_alloc(pinfo->pool, 1024); - g_snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid.data1, uuid.data2, uuid.data3, uuid.data4[0], uuid.data4[1], uuid.data4[2], uuid.data4[3], uuid.data4[4], uuid.data4[5], uuid.data4[6], uuid.data4[7]); diff --git a/epan/dissectors/asn1/lpp/lpp.cnf b/epan/dissectors/asn1/lpp/lpp.cnf index d5b72bf470..b5880fd2b0 100644 --- a/epan/dissectors/asn1/lpp/lpp.cnf +++ b/epan/dissectors/asn1/lpp/lpp.cnf @@ -835,61 +835,61 @@ NavModelCNAV-KeplerianSet/cnavDeltaNo DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(lpp_cn NavModelCNAV-KeplerianSet/cnavDeltaNoDot DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(lpp_cnavDeltaNoDot_fmt) #.FN_BODY NavModelCNAV-KeplerianSet/cnavMo VAL_PTR=&cnavMo - gint64 cnavMo; + int64_t cnavMo; int curr_offset = offset; %(DEFAULT_BODY)s #.FN_FTR NavModelCNAV-KeplerianSet/cnavMo proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavMo, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavMo, "%g semi-circles (%"PRId64")", (double)cnavMo*pow(2, -32), cnavMo); #.FN_BODY NavModelCNAV-KeplerianSet/cnavE VAL_PTR=&cnavE - guint64 cnavE; + uint64_t cnavE; int curr_offset = offset; %(DEFAULT_BODY)s #.FN_FTR NavModelCNAV-KeplerianSet/cnavE proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_uint64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavE, "%g (%"G_GINT64_MODIFIER"u)", + cnavE, "%g (%"PRIu64")", (double)cnavE*pow(2, -34), cnavE); #.FN_BODY NavModelCNAV-KeplerianSet/cnavOmega VAL_PTR=&cnavOmega - gint64 cnavOmega; + int64_t cnavOmega; int curr_offset = offset; %(DEFAULT_BODY)s #.FN_FTR NavModelCNAV-KeplerianSet/cnavOmega proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavOmega, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavOmega, "%g semi-circles (%"PRId64")", (double)cnavOmega*pow(2, -32), cnavOmega); #.FN_BODY NavModelCNAV-KeplerianSet/cnavOMEGA0 VAL_PTR=&cnavOMEGA0 - gint64 cnavOMEGA0; + int64_t cnavOMEGA0; int curr_offset = offset; %(DEFAULT_BODY)s #.FN_FTR NavModelCNAV-KeplerianSet/cnavOMEGA0 proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavOMEGA0, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavOMEGA0, "%g semi-circles (%"PRId64")", (double)cnavOMEGA0*pow(2, -32), cnavOMEGA0); #.TYPE_ATTR NavModelCNAV-KeplerianSet/cnavDeltaOmegaDot DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(lpp_cnavDeltaOmegaDot_IoDot_fmt) #.FN_BODY NavModelCNAV-KeplerianSet/cnavIo VAL_PTR=&cnavIo - gint64 cnavIo; + int64_t cnavIo; int curr_offset = offset; %(DEFAULT_BODY)s #.FN_FTR NavModelCNAV-KeplerianSet/cnavIo proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavIo, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavIo, "%g semi-circles (%"PRId64")", (double)cnavIo*pow(2, -32), cnavIo); #.TYPE_ATTR diff --git a/epan/dissectors/asn1/lpp/packet-lpp-template.c b/epan/dissectors/asn1/lpp/packet-lpp-template.c index 5308f5e2f0..8b1c76ff0a 100644 --- a/epan/dissectors/asn1/lpp/packet-lpp-template.c +++ b/epan/dissectors/asn1/lpp/packet-lpp-template.c @@ -128,7 +128,7 @@ static int dissect_NR_UEB_TRP_RTD_Info_r16_PDU(tvbuff_t *tvb _U_, packet_info *p static void lpp_degreesLatitude_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", ((float)v/8388607.0)*90, v); } @@ -137,7 +137,7 @@ lpp_degreesLongitude_fmt(gchar *s, guint32 v) { gint32 longitude = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", ((float)longitude/8388608.0)*180, longitude); } @@ -147,25 +147,25 @@ lpp_uncertainty_fmt(gchar *s, guint32 v) double uncertainty = 10*(pow(1.1, (double)v)-1); if (uncertainty < 1000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); } } static void lpp_angle_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u degrees (%u)", 2*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u degrees (%u)", 2*v, v); } static void lpp_confidence_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "no information (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "no information (0)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u%%", v); + snprintf(s, ITEM_LABEL_LENGTH, "%u%%", v); } } @@ -174,7 +174,7 @@ lpp_1_10_degrees_fmt(gchar *s, guint32 v) { double val = (double)v/10; - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", val, v); } static void @@ -182,19 +182,19 @@ lpp_1_100_m_fmt(gchar *s, guint32 v) { double val = (double)v/100; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", val, v); } static void lpp_measurementLimit_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u octets (%u)", 100*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u octets (%u)", 100*v, v); } static void lpp_altitude_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um", v); + snprintf(s, ITEM_LABEL_LENGTH, "%um", v); } static void @@ -202,19 +202,19 @@ lpp_uncertaintyAltitude_fmt(gchar *s, guint32 v) { double uncertainty = 45*(pow(1.025, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } static void lpp_radius_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", 5*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", 5*v, v); } static void lpp_nr_LTE_fineTiming_Offset_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void @@ -222,32 +222,32 @@ lpp_expectedRSTD_fmt(gchar *s, guint32 v) { gint32 rstd = 3*((gint32)v-8192); - g_snprintf(s, ITEM_LABEL_LENGTH, "%dTs (%u)", rstd, v); + snprintf(s, ITEM_LABEL_LENGTH, "%dTs (%u)", rstd, v); } static void lpp_expectedRSTD_Uncertainty_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 3*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 3*v, v); } static void lpp_rstd_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSTD < -15391Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSTD < -15391Ts (0)"); } else if (v < 2260) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 15391-5*(v-1), 15391-5*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 15391-5*(v-1), 15391-5*v, v); } else if (v < 6355) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 6356-v, 6355-v, v); + snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 6356-v, 6355-v, v); } else if (v == 6355) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-1Ts <= RSTD <= 0Ts (6355)"); + snprintf(s, ITEM_LABEL_LENGTH, "-1Ts <= RSTD <= 0Ts (6355)"); } else if (v < 10452) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", v-6356, v-6355, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", v-6356, v-6355, v); } else if (v < 12711) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", 5*(v-1)-48159, 5*v-48159, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", 5*(v-1)-48159, 5*v-48159, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "15391Ts < RSTD (12711)"); + snprintf(s, ITEM_LABEL_LENGTH, "15391Ts < RSTD (12711)"); } } @@ -313,7 +313,7 @@ lpp_relativeTimeDifference_fmt(gchar *s, guint32 v) { double rtd = (double)((gint32)v)*0.5; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f Ts (%d)", rtd, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f Ts (%d)", rtd, (gint32)v); } static void @@ -321,7 +321,7 @@ lpp_referenceTimeUnc_fmt(gchar *s, guint32 v) { double referenceTimeUnc = 0.5*(pow(1.14, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", referenceTimeUnc, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", referenceTimeUnc, v); } static const value_string lpp_kp_vals[] = { @@ -336,7 +336,7 @@ lpp_fractionalSecondsFromFrameStructureStart_fmt(gchar *s, guint32 v) { float frac = ((float)v)/4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", frac, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", frac, v); } static void @@ -344,7 +344,7 @@ lpp_frameDrift_fmt(gchar *s, guint32 v) { double drift = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", drift, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", drift, (gint32)v); } static const value_string lpp_dataID_vals[] = { @@ -359,7 +359,7 @@ lpp_alpha0_fmt(gchar *s, guint32 v) { double alpha = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", alpha, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", alpha, (gint32)v); } static void @@ -367,7 +367,7 @@ lpp_alpha1_fmt(gchar *s, guint32 v) { double alpha = (double)((gint32)v)*pow(2, -27); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); } static void @@ -375,7 +375,7 @@ lpp_alpha2_3_fmt(gchar *s, guint32 v) { double alpha = (double)((gint32)v)*pow(2, -24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); } static void @@ -383,7 +383,7 @@ lpp_beta0_fmt(gchar *s, guint32 v) { double beta = (double)((gint32)v)*pow(2, 11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", beta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", beta, (gint32)v); } static void @@ -391,7 +391,7 @@ lpp_beta1_fmt(gchar *s, guint32 v) { double beta = (double)((gint32)v)*pow(2, 14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); } static void @@ -399,7 +399,7 @@ lpp_beta2_3_fmt(gchar *s, guint32 v) { double beta = (double)((gint32)v)*pow(2, 16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); } static void @@ -407,7 +407,7 @@ lpp_ai0_fmt(gchar *s, guint32 v) { double ai = (double)v*pow(2, -2); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gsfu (%u)", ai, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gsfu (%u)", ai, v); } static void @@ -415,7 +415,7 @@ lpp_ai1_fmt(gchar *s, guint32 v) { double ai = (double)v*pow(2, -8); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree (%u)", ai, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree (%u)", ai, v); } static void @@ -423,13 +423,13 @@ lpp_ai2_fmt(gchar *s, guint32 v) { double ai = (double)v*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree2 (%u)", ai, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree2 (%u)", ai, v); } static void lpp_teop_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -437,7 +437,7 @@ lpp_pmX_Y_fmt(gchar *s, guint32 v) { double pm = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds (%d)", pm, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds (%d)", pm, (gint32)v); } static void @@ -445,7 +445,7 @@ lpp_pmX_Ydot_fmt(gchar *s, guint32 v) { double pmDot = (double)((gint32)v)*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds/day (%d)", pmDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds/day (%d)", pmDot, (gint32)v); } static void @@ -453,7 +453,7 @@ lpp_deltaUT1_fmt(gchar *s, guint32 v) { double deltaUT1 = (double)((gint32)v)*pow(2, -24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", deltaUT1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", deltaUT1, (gint32)v); } static void @@ -461,19 +461,19 @@ lpp_deltaUT1dot_fmt(gchar *s, guint32 v) { double deltaUT1dot = (double)((gint32)v)*pow(2, -25); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/day (%d)", deltaUT1dot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/day (%d)", deltaUT1dot, (gint32)v); } static void -lpp_1_1000m_64_fmt(gchar *s, guint64 v) +lpp_1_1000m_64_fmt(gchar *s, uint64_t v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%" G_GINT64_MODIFIER "d)", (double)v/1000, (gint64)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%"PRId64")", (double)v/1000, (int64_t)v); } static void lpp_1_1000m_32_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (double)v/1000, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (double)v/1000, (gint32)v); } static const value_string lpp_clockSteeringIndicator_vals[] = { @@ -514,13 +514,13 @@ static void lpp_aux_master_delta_fmt(gchar *s, guint32 v) { double delta = (double)((gint32)v)*25*pow(10, -6); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", delta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", delta, (gint32)v); } static void lpp_gnss_TimeModelRefTime_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*16, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*16, v); } static void @@ -528,7 +528,7 @@ lpp_tA0_fmt(gchar *s, guint32 v) { double tA0 = (double)((gint32)v)*pow(2, -35); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tA0, (gint32)v); } static void @@ -536,7 +536,7 @@ lpp_tA1_fmt(gchar *s, guint32 v) { double tA1 = (double)((gint32)v)*pow(2, -51); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", tA1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", tA1, (gint32)v); } static void @@ -544,7 +544,7 @@ lpp_tA2_fmt(gchar *s, guint32 v) { double tA2 = (double)((gint32)v)*pow(2, -68); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", tA2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", tA2, (gint32)v); } static const value_string lpp_gnss_TO_ID_vals[] = { @@ -580,7 +580,7 @@ lpp_pseudoRangeCor_fmt(gchar *s, guint32 v) { double pseudoRangeCor = ((double)(gint32)v)*0.32; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", pseudoRangeCor, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", pseudoRangeCor, (gint32)v); } static void @@ -588,7 +588,7 @@ lpp_rangeRateCor_fmt(gchar *s, guint32 v) { double rangeRateCor = ((double)(gint32)v)*0.032; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", rangeRateCor, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", rangeRateCor, (gint32)v); } static const value_string lpp_udreGrowthRate_vals[] = { @@ -625,7 +625,7 @@ static const value_string lpp_signal_health_status_vals[] = { static void lpp_stanClockToc_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", 60*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", 60*v, v); } static void @@ -633,7 +633,7 @@ lpp_stanClockAF2_fmt(gchar *s, guint32 v) { double stanClockAF2 = (double)((gint32)v)*pow(2, -59); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", stanClockAF2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", stanClockAF2, (gint32)v); } static void @@ -641,7 +641,7 @@ lpp_stanClockAF1_fmt(gchar *s, guint32 v) { double stanClockAF1 = (double)((gint32)v)*pow(2, -46); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", stanClockAF1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", stanClockAF1, (gint32)v); } static void @@ -649,7 +649,7 @@ lpp_stanClockAF0_fmt(gchar *s, guint32 v) { double stanClockAF0 = (double)((gint32)v)*pow(2, -34); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockAF0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockAF0, (gint32)v); } static void @@ -657,24 +657,24 @@ lpp_stanClockTgd_fmt(gchar *s, guint32 v) { double stanClockTgd = (double)((gint32)v)*pow(2, -32); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockTgd, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockTgd, (gint32)v); } static void lpp_sisa_fmt(gchar *s, guint32 v) { if (v < 50) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", v, v); } else if (v < 75) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 50+((v-50)*2), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 50+((v-50)*2), v); } else if (v < 100) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 100+((v-75)*4), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 100+((v-75)*4), v); } else if (v < 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 200+((v-100)*16), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 200+((v-100)*16), v); } else if (v < 255) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "No Accuracy Prediction Available (255)"); + snprintf(s, ITEM_LABEL_LENGTH, "No Accuracy Prediction Available (255)"); } } @@ -687,7 +687,7 @@ static const value_string lpp_stanModelID_vals[] = { static void lpp_navToc_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -695,7 +695,7 @@ lpp_navaf2_fmt(gchar *s, guint32 v) { double navaf2 = (double)((gint32)v)*pow(2, -55); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", navaf2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", navaf2, (gint32)v); } static void @@ -703,7 +703,7 @@ lpp_navaf1_fmt(gchar *s, guint32 v) { double navaf1 = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf1, (gint32)v); } static void @@ -711,13 +711,13 @@ lpp_navaf0_navTgd_fmt(gchar *s, guint32 v) { double navaf0_navTgd = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf0_navTgd, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf0_navTgd, (gint32)v); } static void lpp_cnavToc_cnavTop_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 300*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 300*v, v); } static void @@ -725,7 +725,7 @@ lpp_cnavAf2_fmt(gchar *s, guint32 v) { double cnavAf2 = (double)((gint32)v)*pow(2, -60); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", cnavAf2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", cnavAf2, (gint32)v); } static void @@ -733,7 +733,7 @@ lpp_cnavAf1_fmt(gchar *s, guint32 v) { double cnavAf1 = (double)((gint32)v)*pow(2, -48); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", cnavAf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", cnavAf1, (gint32)v); } static void @@ -741,7 +741,7 @@ lpp_cnavX_fmt(gchar *s, guint32 v) { double cnavX = (double)((gint32)v)*pow(2, -35); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", cnavX, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", cnavX, (gint32)v); } static void @@ -749,7 +749,7 @@ lpp_gloTau_gloDeltaTau_fmt(gchar *s, guint32 v) { double gloTau_gloDeltaTau = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloTau_gloDeltaTau, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloTau_gloDeltaTau, (gint32)v); } static void @@ -757,13 +757,13 @@ lpp_gloGamma_fmt(gchar *s, guint32 v) { double gloGamma = (double)((gint32)v)*pow(2, -40); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%d)", gloGamma, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%d)", gloGamma, (gint32)v); } static void lpp_sbasTo_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -771,7 +771,7 @@ lpp_sbasAgfo_fmt(gchar *s, guint32 v) { double sbasAgfo = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", sbasAgfo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", sbasAgfo, (gint32)v); } static void @@ -779,18 +779,18 @@ lpp_sbasAgf1_fmt(gchar *s, guint32 v) { double sbasAgf1 = (double)((gint32)v)*pow(2, -40); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", sbasAgf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", sbasAgf1, (gint32)v); } static void lpp_bdsAODC_AODE_r12_fmt(gchar *s, guint32 v) { if (v < 25) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u hours (%u)", v, v); + snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u hours (%u)", v, v); } else if (v < 31) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u days (%u)", v-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u days (%u)", v-23, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is over 7 days (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is over 7 days (%u)", v); } } @@ -800,7 +800,7 @@ lpp_bdsToc_Toe_r12_fmt(gchar *s, guint32 v) { double bdsToc = (double)((gint32)v)*pow(2, 3); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsToc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsToc, (gint32)v); } static void @@ -808,7 +808,7 @@ lpp_bdsA0_r12_fmt(gchar *s, guint32 v) { double bdsA0 = (double)((gint32)v)*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsA0, (gint32)v); } static void @@ -816,7 +816,7 @@ lpp_bdsA1_r12_fmt(gchar *s, guint32 v) { double bdsA1 = (double)((gint32)v)*pow(2, -50); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsA1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsA1, (gint32)v); } static void @@ -824,19 +824,19 @@ lpp_bdsA2_r12_fmt(gchar *s, guint32 v) { double bdsA2 = (double)((gint32)v)*pow(2, -66); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", bdsA2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", bdsA2, (gint32)v); } static void lpp_bdsTgd1_r12_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gns (%d)", (float)((gint32)v)*0.1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gns (%d)", (float)((gint32)v)*0.1, (gint32)v); } static void lpp_keplerToe_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 60*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 60*v, v); } static void @@ -844,7 +844,7 @@ lpp_keplerW_M0_I0_Omega0_fmt(gchar *s, guint32 v) { double keplerW_M0_I0_Omega0 = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", keplerW_M0_I0_Omega0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", keplerW_M0_I0_Omega0, (gint32)v); } static void @@ -852,7 +852,7 @@ lpp_keplerDeltaN_OmegaDot_IDot_fmt(gchar *s, guint32 v) { double keplerDeltaN_OmegaDot_IDot = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", keplerDeltaN_OmegaDot_IDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", keplerDeltaN_OmegaDot_IDot, (gint32)v); } static void @@ -860,7 +860,7 @@ lpp_keplerE_fmt(gchar *s, guint32 v) { double keplerE = (double)v*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", keplerE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", keplerE, v); } static void @@ -868,7 +868,7 @@ lpp_keplerAPowerHalf_fmt(gchar *s, guint32 v) { double keplerAPowerHalf = (double)v*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", keplerAPowerHalf, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", keplerAPowerHalf, v); } static void @@ -876,7 +876,7 @@ lpp_keplerCrs_Crc_fmt(gchar *s, guint32 v) { double keplerCrs_Crc = (double)((gint32)v)*pow(2, -5); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", keplerCrs_Crc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", keplerCrs_Crc, (gint32)v); } static void @@ -884,13 +884,13 @@ lpp_keplerCx_fmt(gchar *s, guint32 v) { double keplerCx = (double)((gint32)v)*pow(2, -29); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", keplerCx, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", keplerCx, (gint32)v); } static void lpp_navToe_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -898,7 +898,7 @@ lpp_navOmega_M0_I0_OmegaA0_fmt(gchar *s, guint32 v) { double navOmega_M0_I0_OmegaA0 = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navOmega_M0_I0_OmegaA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navOmega_M0_I0_OmegaA0, (gint32)v); } static void @@ -906,7 +906,7 @@ lpp_navDeltaN_OmegaADot_IDot_fmt(gchar *s, guint32 v) { double navDeltaN_OmegaADot_IDot = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navDeltaN_OmegaADot_IDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navDeltaN_OmegaADot_IDot, (gint32)v); } static void @@ -914,7 +914,7 @@ lpp_navE_fmt(gchar *s, guint32 v) { double navE = (double)v*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navE, v); } static void @@ -922,7 +922,7 @@ lpp_navAPowerHalf_fmt(gchar *s, guint32 v) { double navAPowerHalf = (double)v*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAPowerHalf, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAPowerHalf, v); } static void @@ -930,7 +930,7 @@ lpp_navCrs_Crc_fmt(gchar *s, guint32 v) { double navCrs_Crc = (double)((gint32)v)*pow(2, -5); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", navCrs_Crc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", navCrs_Crc, (gint32)v); } static void @@ -938,7 +938,7 @@ lpp_navCx_fmt(gchar *s, guint32 v) { double navCx = (double)((gint32)v)*pow(2, -29); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", navCx, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", navCx, (gint32)v); } static void @@ -946,7 +946,7 @@ lpp_cnavDeltaA_fmt(gchar *s, guint32 v) { double cnavDeltaA = (double)((gint32)v)*pow(2, -9); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavDeltaA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavDeltaA, (gint32)v); } static void @@ -954,7 +954,7 @@ lpp_cnavAdot_fmt(gchar *s, guint32 v) { double cnavAdot = (double)((gint32)v)*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", cnavAdot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", cnavAdot, (gint32)v); } static void @@ -962,7 +962,7 @@ lpp_cnavDeltaNo_fmt(gchar *s, guint32 v) { double cnavDeltaNo = (double)((gint32)v)*pow(2, -44); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaNo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaNo, (gint32)v); } static void @@ -970,7 +970,7 @@ lpp_cnavDeltaNoDot_fmt(gchar *s, guint32 v) { double cnavDeltaNoDot = (double)((gint32)v)*pow(2, -57); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s2 (%d)", cnavDeltaNoDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s2 (%d)", cnavDeltaNoDot, (gint32)v); } static void @@ -978,7 +978,7 @@ lpp_cnavDeltaOmegaDot_IoDot_fmt(gchar *s, guint32 v) { double cnavDeltaOmegaDot_IoDot = (double)((gint32)v)*pow(2, -44); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaOmegaDot_IoDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaOmegaDot_IoDot, (gint32)v); } static void @@ -986,7 +986,7 @@ lpp_cnavCx_fmt(gchar *s, guint32 v) { double cnavCx = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", cnavCx, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", cnavCx, (gint32)v); } static void @@ -994,7 +994,7 @@ lpp_cnavCrs_Crc_fmt(gchar *s, guint32 v) { double cnavCrs_Crc = (double)((gint32)v)*pow(2, -8); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavCrs_Crc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavCrs_Crc, (gint32)v); } static void @@ -1002,7 +1002,7 @@ lpp_gloX_Y_Z_fmt(gchar *s, guint32 v) { double gloX_Y_Z = (double)((gint32)v)*pow(2, -11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gkm (%d)", gloX_Y_Z, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gkm (%d)", gloX_Y_Z, (gint32)v); } static void @@ -1010,7 +1010,7 @@ lpp_gloXdot_Ydot_Zdot_fmt(gchar *s, guint32 v) { double gloXdot_Ydot_Zdot = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s (%d)", gloXdot_Ydot_Zdot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s (%d)", gloXdot_Ydot_Zdot, (gint32)v); } static void @@ -1018,7 +1018,7 @@ lpp_gloXdotdot_Ydotdot_Zdotdot_fmt(gchar *s, guint32 v) { double gloXdotdot_Ydotdot_Zdotdot = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s2 (%d)", gloXdotdot_Ydotdot_Zdotdot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s2 (%d)", gloXdotdot_Ydotdot_Zdotdot, (gint32)v); } static void @@ -1026,7 +1026,7 @@ lpp_sbasXg_Yg_fmt(gchar *s, guint32 v) { double sbasXg_Yg = (double)((gint32)v)*0.08; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasXg_Yg, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasXg_Yg, (gint32)v); } static void @@ -1034,7 +1034,7 @@ lpp_sbasZg_fmt(gchar *s, guint32 v) { double sbasZg = (double)((gint32)v)*0.4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasZg, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasZg, (gint32)v); } static void @@ -1042,7 +1042,7 @@ lpp_sbasXgDot_YgDot_fmt(gchar *s, guint32 v) { double sbasXgDot_YgDot = (double)((gint32)v)*0.000625; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasXgDot_YgDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasXgDot_YgDot, (gint32)v); } static void @@ -1050,7 +1050,7 @@ lpp_sbasZgDot_fmt(gchar *s, guint32 v) { double sbasZgDot = (double)((gint32)v)*0.004; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasZgDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasZgDot, (gint32)v); } static void @@ -1058,7 +1058,7 @@ lpp_sbasXgDotDot_YgDotDot_fmt(gchar *s, guint32 v) { double sbasXgDotDot_YgDotDot = (double)((gint32)v)*0.0000125; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasXgDotDot_YgDotDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasXgDotDot_YgDotDot, (gint32)v); } static void @@ -1066,7 +1066,7 @@ lpp_sbasZgDotDot_fmt(gchar *s, guint32 v) { double sbasZgDotDot = (double)((gint32)v)*0.0000625; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasZgDotDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasZgDotDot, (gint32)v); } static void @@ -1074,7 +1074,7 @@ lpp_bdsAPowerHalf_r12_fmt(gchar *s, guint32 v) { double bdsAPowerHalf = (double)v*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAPowerHalf, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAPowerHalf, v); } static void @@ -1082,7 +1082,7 @@ lpp_bdsE_r12_fmt(gchar *s, guint32 v) { double bdsE = (double)v*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", bdsE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", bdsE, v); } static void @@ -1090,7 +1090,7 @@ lpp_bdsW_M0_Omega0_I0_r12_fmt(gchar *s, guint32 v) { double bdsW_M0_Omega0_I0 = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsW_M0_Omega0_I0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsW_M0_Omega0_I0, (gint32)v); } static void @@ -1098,7 +1098,7 @@ lpp_bdsDeltaN_OmegaDot_IDot_r12_fmt(gchar *s, guint32 v) { double bdsDeltaN_OmegaDot_IDot = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsDeltaN_OmegaDot_IDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsDeltaN_OmegaDot_IDot, (gint32)v); } static void @@ -1106,7 +1106,7 @@ lpp_bdsCuc_Cus_Cic_Cis_r12_fmt(gchar *s, guint32 v) { double bdsCuc_Cus_Cic_Cis = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCuc_Cus_Cic_Cis, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCuc_Cus_Cic_Cis, (gint32)v); } static void @@ -1114,7 +1114,7 @@ lpp_bdsCrc_Crs_r12_fmt(gchar *s, guint32 v) { double bdsCrc_Crs = (double)((gint32)v)*pow(2, -6); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCrc_Crs, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCrc_Crs, (gint32)v); } static void @@ -1122,7 +1122,7 @@ lpp_doppler0_fmt(gchar *s, guint32 v) { double doppler0 = (double)((gint32)v)*0.5; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", doppler0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", doppler0, (gint32)v); } static void @@ -1130,7 +1130,7 @@ lpp_doppler1_fmt(gchar *s, guint32 v) { double doppler1 = (double)((gint32)(v-42))/210; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s2 (%u)", doppler1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s2 (%u)", doppler1, v); } static const value_string lpp_dopplerUncertainty_vals[] = { @@ -1147,7 +1147,7 @@ lpp_codePhase_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -10); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } static const value_string lpp_codePhaseSearchWindow_vals[] = { @@ -1190,7 +1190,7 @@ static value_string_ext lpp_codePhaseSearchWindow_vals_ext = VALUE_STRING_EXT_IN static void lpp_azimuth_elevation_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", (float)v*0.703125, v); + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", (float)v*0.703125, v); } static void @@ -1198,7 +1198,7 @@ lpp_kepAlmanacE_fmt(gchar *s, guint32 v) { double kepAlmanacE = (double)v*pow(2, -16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", kepAlmanacE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", kepAlmanacE, v); } static void @@ -1206,7 +1206,7 @@ lpp_kepAlmanacDeltaI_fmt(gchar *s, guint32 v) { double kepAlmanacDeltaI = (double)((gint32)v)*pow(2, -14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacDeltaI, (gint32)v); } static void @@ -1214,7 +1214,7 @@ lpp_kepAlmanacOmegaDot_fmt(gchar *s, guint32 v) { double kepAlmanacOmegaDot = (double)((gint32)v)*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", kepAlmanacOmegaDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", kepAlmanacOmegaDot, (gint32)v); } static void @@ -1222,7 +1222,7 @@ lpp_kepAlmanacAPowerHalf_fmt(gchar *s, guint32 v) { double kepAlmanacAPowerHalf = (double)((gint32)v)*pow(2, -9); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%d)", kepAlmanacAPowerHalf, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%d)", kepAlmanacAPowerHalf, (gint32)v); } static void @@ -1230,7 +1230,7 @@ lpp_kepAlmanacOmega0_W_M0_fmt(gchar *s, guint32 v) { double kepAlmanacOmega0_W_M0 = (double)((gint32)v)*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacOmega0_W_M0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacOmega0_W_M0, (gint32)v); } static void @@ -1238,7 +1238,7 @@ lpp_kepAlmanacAF0_fmt(gchar *s, guint32 v) { double kepAlmanacAF0 = (double)((gint32)v)*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", kepAlmanacAF0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", kepAlmanacAF0, (gint32)v); } static void @@ -1246,7 +1246,7 @@ lpp_kepAlmanacAF1_fmt(gchar *s, guint32 v) { double kepAlmanacAF1 = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", kepAlmanacAF1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", kepAlmanacAF1, (gint32)v); } static void @@ -1254,7 +1254,7 @@ lpp_navAlmE_fmt(gchar *s, guint32 v) { double navAlmE = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navAlmE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navAlmE, v); } static void @@ -1262,7 +1262,7 @@ lpp_navAlmDeltaI_fmt(gchar *s, guint32 v) { double navAlmDeltaI = (double)((gint32)v)*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmDeltaI, (gint32)v); } static void @@ -1270,7 +1270,7 @@ lpp_navAlmOMEGADOT_fmt(gchar *s, guint32 v) { double navAlmOMEGADOT = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navAlmOMEGADOT, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navAlmOMEGADOT, (gint32)v); } static void @@ -1278,7 +1278,7 @@ lpp_navAlmSqrtA_fmt(gchar *s, guint32 v) { double navAlmSqrtA = (double)v*pow(2, -11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAlmSqrtA, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAlmSqrtA, v); } static void @@ -1286,7 +1286,7 @@ lpp_navAlmOMEGAo_Omega_Mo_fmt(gchar *s, guint32 v) { double navAlmOMEGAo_Omega_Mo = (double)((gint32)v)*pow(2, -23); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmOMEGAo_Omega_Mo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmOMEGAo_Omega_Mo, (gint32)v); } static void @@ -1294,7 +1294,7 @@ lpp_navAlmaf0_fmt(gchar *s, guint32 v) { double navAlmaf0 = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", navAlmaf0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", navAlmaf0, (gint32)v); } static void @@ -1302,13 +1302,13 @@ lpp_navAlmaf1_fmt(gchar *s, guint32 v) { double navAlmaf1 = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navAlmaf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navAlmaf1, (gint32)v); } static void lpp_redAlmDeltaA_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%dm (%d)", 512*(gint)v, (gint)v); + snprintf(s, ITEM_LABEL_LENGTH, "%dm (%d)", 512*(gint)v, (gint)v); } static void @@ -1316,7 +1316,7 @@ lpp_redAlmOmega0_Phi0_fmt(gchar *s, guint32 v) { double redAlmOmega0_Phi0 = (double)((gint32)v)*pow(2, -6); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", redAlmOmega0_Phi0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", redAlmOmega0_Phi0, (gint32)v); } static void @@ -1324,7 +1324,7 @@ lpp_midiAlmE_fmt(gchar *s, guint32 v) { double midiAlmE = (double)v*pow(2, -16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", midiAlmE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", midiAlmE, v); } static void @@ -1332,7 +1332,7 @@ lpp_midiAlmDeltaI_fmt(gchar *s, guint32 v) { double midiAlmDeltaI = (double)((gint32)v)*pow(2, -14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmDeltaI, (gint32)v); } static void @@ -1340,13 +1340,13 @@ lpp_midiAlmOmegaDot_fmt(gchar *s, guint32 v) { double midiAlmOmegaDot = (double)((gint32)v)*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", midiAlmOmegaDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", midiAlmOmegaDot, (gint32)v); } static void lpp_midiAlmSqrtA_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm1/2 (%u)", (float)v*0.0625, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm1/2 (%u)", (float)v*0.0625, v); } static void @@ -1354,7 +1354,7 @@ lpp_midiAlmOmega0_Omega_Mo_fmt(gchar *s, guint32 v) { double midiAlmOmega0_Omega_Mo = (double)((gint32)v)*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmOmega0_Omega_Mo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmOmega0_Omega_Mo, (gint32)v); } static void @@ -1362,7 +1362,7 @@ lpp_midiAlmaf0_fmt(gchar *s, guint32 v) { double midiAlmaf0 = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", midiAlmaf0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", midiAlmaf0, (gint32)v); } static void @@ -1370,7 +1370,7 @@ lpp_midiAlmaf1_fmt(gchar *s, guint32 v) { double midiAlmaf1 = (double)((gint32)v)*pow(2, -37); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", midiAlmaf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", midiAlmaf1, (gint32)v); } static void @@ -1378,13 +1378,13 @@ lpp_gloAlmLambdaA_DeltaIa_fmt(gchar *s, guint32 v) { double gloAlmLambdaA_DeltaIa = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmLambdaA_DeltaIa, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmLambdaA_DeltaIa, (gint32)v); } static void lpp_gloAlmtlambdaA_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fs (%u)", (float)v*0.03125, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fs (%u)", (float)v*0.03125, v); } static void @@ -1392,7 +1392,7 @@ lpp_gloAlmDeltaTA_fmt(gchar *s, guint32 v) { double gloAlmDeltaTA = (double)((gint32)v)*pow(2, -9); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTA, (gint32)v); } static void @@ -1400,7 +1400,7 @@ lpp_gloAlmDeltaTdotA_fmt(gchar *s, guint32 v) { double gloAlmDeltaTdotA = (double)((gint32)v)*pow(2, -14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTdotA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTdotA, (gint32)v); } static void @@ -1408,7 +1408,7 @@ lpp_gloAlmEpsilonA_fmt(gchar *s, guint32 v) { double gloAlmEpsilonA = (double)v*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", gloAlmEpsilonA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", gloAlmEpsilonA, (gint32)v); } static void @@ -1416,7 +1416,7 @@ lpp_gloAlmOmegaA_fmt(gchar *s, guint32 v) { double gloAlmOmegaA = (double)((gint32)v)*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmOmegaA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmOmegaA, (gint32)v); } static void @@ -1424,43 +1424,43 @@ lpp_gloAlmTauA_fmt(gchar *s, guint32 v) { double gloAlmTauA = (double)((gint32)v)*pow(2, -18); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloAlmTauA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloAlmTauA, (gint32)v); } static void lpp_sbasAlmXg_Yg_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%d)", (gint32)v*2.6, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%d)", (gint32)v*2.6, (gint32)v); } static void lpp_sbasAlmZg_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%dkm (%d)", (gint32)v*26, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%dkm (%d)", (gint32)v*26, (gint32)v); } static void lpp_sbasAlmXgdot_YgDot_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%dm/s (%d)", (gint32)v*10, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%dm/s (%d)", (gint32)v*10, (gint32)v); } static void lpp_sbasAlmZgDot_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", (gint32)v*40.96, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", (gint32)v*40.96, (gint32)v); } static void lpp_sbasAlmTo_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", v*64, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", v*64, v); } static void lpp_bdsAlmToa_r12_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); } static void @@ -1468,7 +1468,7 @@ lpp_bdsAlmSqrtA_r12_fmt(gchar *s, guint32 v) { double bdsAlmSqrtA = (double)v*pow(2, -11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmSqrtA, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmSqrtA, v); } static void @@ -1476,7 +1476,7 @@ lpp_bdsAlmE_r12_fmt(gchar *s, guint32 v) { double bdsAlmE = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmE, v); } static void @@ -1484,7 +1484,7 @@ lpp_bdsAlmW_M0_Omega0_r12_fmt(gchar *s, guint32 v) { double bdsAlmW_M0_Omega0 = (double)((gint32)v)*pow(2, -23); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmW_M0_Omega0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmW_M0_Omega0, (gint32)v); } static void @@ -1492,7 +1492,7 @@ lpp_bdsAlmOmegaDot_r12_fmt(gchar *s, guint32 v) { double bdsAlmOmegaDot = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsAlmOmegaDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsAlmOmegaDot, (gint32)v); } static void @@ -1500,7 +1500,7 @@ lpp_bdsAlmDeltaI_r12_fmt(gchar *s, guint32 v) { double bdsAlmDeltaI = (double)((gint32)v)*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmDeltaI, (gint32)v); } static void @@ -1508,7 +1508,7 @@ lpp_bdsAlmA0_r12_fmt(gchar *s, guint32 v) { double bdsAlmA0 = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsAlmA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsAlmA0, (gint32)v); } static void @@ -1516,7 +1516,7 @@ lpp_bdsAlmA1_r12_fmt(gchar *s, guint32 v) { double bdsAlmA1 = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsAlmA1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsAlmA1, (gint32)v); } static const true_false_string lpp_bdsSvHealth_r12_b1i_b2i_value = { @@ -1534,7 +1534,7 @@ lpp_gnss_Utc_A1_fmt(gchar *s, guint32 v) { double gnss_Utc_A1 = (double)((gint32)v)*pow(2, -50); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", gnss_Utc_A1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", gnss_Utc_A1, (gint32)v); } static void @@ -1542,13 +1542,13 @@ lpp_gnss_Utc_A0_fmt(gchar *s, guint32 v) { double gnss_Utc_A0 = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gnss_Utc_A0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gnss_Utc_A0, (gint32)v); } static void lpp_gnss_Utc_Tot_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); } static const value_string lpp_bds_UDREI_vals[] = { @@ -1597,16 +1597,16 @@ static void lpp_bds_ECC_DeltaT_r12_fmt(gchar *s, guint32 v) { if ((gint32)v == -4096) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Not available (%d)", (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "Not available (%d)", (gint32)v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.1, (gint32)v); } } static void lpp_bds_GridIonElement_dt_r12_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.125, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.125, (gint32)v); } static const value_string lpp_bds_givei_vals[] = { @@ -1635,7 +1635,7 @@ lpp_fine_PseudoRange_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)*pow(2, -29); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); } static void @@ -1643,7 +1643,7 @@ lpp_fine_PhaseRange_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); } static void @@ -1651,7 +1651,7 @@ lpp_carrier_to_noise_ratio_r15_fmt(gchar *s, guint32 v) { double val = (double)v*pow(2, -4); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gdB-Hz (%d)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gdB-Hz (%d)", val, v); } static void @@ -1659,7 +1659,7 @@ lpp_fine_PhaseRangeRate_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/1000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); } static void @@ -1667,7 +1667,7 @@ lpp_cpBias_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/50; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static const value_string lpp_ambiguityStatusFlag_r15_vals[] = { @@ -1683,7 +1683,7 @@ lpp_1_2000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/2000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -1691,7 +1691,7 @@ lpp_1_100ppm_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/100; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); } static void @@ -1699,7 +1699,7 @@ lpp_1_10ppm_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/10; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); } static const value_string lpp_ssrUpdateInterval_r15_vals[] = { @@ -1727,7 +1727,7 @@ lpp_1_10000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/10000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -1735,7 +1735,7 @@ lpp_4_10000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/10000*4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -1743,7 +1743,7 @@ lpp_1_1000000m_s_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/1000000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); } static void @@ -1751,7 +1751,7 @@ lpp_4_1000000m_s_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/1000000*4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); } static void @@ -1759,7 +1759,7 @@ lpp_2_100000000m_s2_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/100000000*2; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", val, (gint32)v); } static void @@ -1767,7 +1767,7 @@ lpp_1_100000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/100000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -1775,7 +1775,7 @@ lpp_tauC_fmt(gchar *s, guint32 v) { double tauC = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tauC, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tauC, (gint32)v); } static void @@ -1783,7 +1783,7 @@ lpp_b1_fmt(gchar *s, guint32 v) { double b1 = (double)((gint32)v)*pow(2, -10); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", b1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", b1, (gint32)v); } static void @@ -1791,7 +1791,7 @@ lpp_b2_fmt(gchar *s, guint32 v) { double b2 = (double)((gint32)v)*pow(2, -16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/msd (%d)", b2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/msd (%d)", b2, (gint32)v); } static const value_string lpp_utcStandardID_vals[] = { @@ -1836,7 +1836,7 @@ lpp_GNSS_SatMeas_codePhase_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } static void @@ -1848,12 +1848,12 @@ lpp_codePhaseRMSError_fmt(gchar *s, guint32 v) guint8 exponent_1 = ((v - 1) & 0x38) >> 3; if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "P < 0.5 (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "P < 0.5 (0)"); } else if (v < 63) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f <= P < %f (%u)", 0.5*(1+mantissa_1/8)*pow(2, exponent_1), + snprintf(s, ITEM_LABEL_LENGTH, "%f <= P < %f (%u)", 0.5*(1+mantissa_1/8)*pow(2, exponent_1), 0.5*(1+mantissa/8)*pow(2, exponent), v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "112 <= P (63)"); + snprintf(s, ITEM_LABEL_LENGTH, "112 <= P (63)"); } } @@ -1862,7 +1862,7 @@ lpp_transmitterLatitude_fmt(gchar *s, guint32 v) { double lat = ((double)v*4.0/pow(2, 20))-90.0; - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", lat, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", lat, v); } static void @@ -1870,7 +1870,7 @@ lpp_transmitterLongitude_fmt(gchar *s, guint32 v) { double longitude = ((double)v*4.0/pow(2, 20))-180.0; - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); } static void @@ -1878,7 +1878,7 @@ lpp_transmitterAltitude_fmt(gchar *s, guint32 v) { double alt = ((double)v*0.29)-500.0; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", alt, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", alt, v); } static void @@ -1886,7 +1886,7 @@ lpp_refPressure_fmt(gchar *s, guint32 v) { gint32 pressure = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%dPa (%d)", 101325+pressure, pressure); + snprintf(s, ITEM_LABEL_LENGTH, "%dPa (%d)", 101325+pressure, pressure); } static void @@ -1894,7 +1894,7 @@ lpp_refTemperature_fmt(gchar *s, guint32 v) { gint32 temp = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%dK (%d)", 273+temp, temp); + snprintf(s, ITEM_LABEL_LENGTH, "%dK (%d)", 273+temp, temp); } static void @@ -1902,19 +1902,19 @@ lpp_referencePressureRate_v1520_fmt(gchar *s, guint32 v) { gint32 rate = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%dPa/hour (%d)", 10*rate, rate); + snprintf(s, ITEM_LABEL_LENGTH, "%dPa/hour (%d)", 10*rate, rate); } static void lpp_PressureValidityPeriod_v1520_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%umin (%u)", 15*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%umin (%u)", 15*v, v); } static void lpp_doppler_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", (gint32)v*0.04, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", (gint32)v*0.04, (gint32)v); } static void @@ -1922,13 +1922,13 @@ lpp_adr_fmt(gchar *s, guint32 v) { double adr = (double)v*pow(2, -10); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", adr, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", adr, v); } static void lpp_adrMSB_r15_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", v*32768, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", v*32768, v); } static void @@ -1936,24 +1936,24 @@ lpp_GNSS_SatMeas_delta_codePhase_r15_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } static void lpp_deliveryAmount_r15_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", pow(2, v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", pow(2, v), v); } static void lpp_rsrp_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); } else if (v < 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); } } @@ -1961,11 +1961,11 @@ static void lpp_rsrq_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (v < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); } } @@ -1973,11 +1973,11 @@ static void lpp_nrsrp_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); } else if (v < 113) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); } } @@ -1985,11 +1985,11 @@ static void lpp_nrsrq_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (0)"); } else if (v < 74) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%u)", (((float)v-1)/2)-34, ((float)v/2)-34, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%u)", (((float)v-1)/2)-34, ((float)v/2)-34, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (%u)", v); } } @@ -1999,9 +1999,9 @@ lpp_rsrp_Result_v1470_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (d == -17) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -157dBm (-17)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -157dBm (-17)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%d)", d-141, d-140, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%d)", d-141, d-140, d); } } @@ -2011,11 +2011,11 @@ lpp_rsrq_Result_v1470_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -34.5dB (-30)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -34.5dB (-30)"); } else if (v < 46) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", ((float)d/2)-20, (((float)d+1)/2)-20, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", ((float)d/2)-20, (((float)d+1)/2)-20, d); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "3dB <= RSRQ (46)"); + snprintf(s, ITEM_LABEL_LENGTH, "3dB <= RSRQ (46)"); } } @@ -2023,13 +2023,13 @@ static void lpp_ue_RxTxTimeDiff_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); } else if (v < 2048) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); } else if (v < 4095) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); + snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); } } @@ -2038,7 +2038,7 @@ lpp_mbs_beaconMeasElt_codePhase_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } const unit_name_string units_dbhz = { "dB-Hz", NULL }; diff --git a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c index cb10026ba0..44eae29294 100644 --- a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c @@ -941,7 +941,7 @@ static value_string_ext lte_rrc_messageSize_r14_vals_ext = VALUE_STRING_EXT_INIT static void lte_rrc_timeConnFailure_r10_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); } static const value_string lte_rrc_n_r12_vals[] = { @@ -960,9 +960,9 @@ static void lte_rrc_m_r12_fmt(gchar *s, guint32 v) { if (v == 255) { - g_snprintf(s, ITEM_LABEL_LENGTH, "255 <= f(Nr) (255)"); + snprintf(s, ITEM_LABEL_LENGTH, "255 <= f(Nr) (255)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u <= f(Nr) < %u (%u)", v, v+1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u <= f(Nr) < %u (%u)", v, v+1, v); } } @@ -2168,13 +2168,13 @@ static void lte_rrc_RSRP_RangeNR_r15_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); + snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Infinity (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "Infinity (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", -157+v, -156+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", -157+v, -156+v, v); } } @@ -2268,11 +2268,11 @@ static void lte_rrc_RSRQ_RangeNR_r15_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "20dB < SS-RSRQ (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "20dB < SS-RSRQ (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); } } @@ -2316,20 +2316,20 @@ static value_string_ext lte_rrc_MBSFN_RSRQ_Range_vals_ext = VALUE_STRING_EXT_INI static void lte_rrc_availableAdmissionCapacityWLAN_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uus/s (%u)", 32*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uus/s (%u)", 32*v, v); } static void lte_rrc_ue_RxTxTimeDiffResult_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); } else if (v < 2048) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); } else if (v < 4095) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); + snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); } } @@ -2534,18 +2534,18 @@ static value_string_ext lte_rrc_excessDelay_r13_vals_ext = VALUE_STRING_EXT_INIT static void lte_rrc_averageDelay_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); } static void lte_rrc_subframeBoundaryOffsetResult_r13_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "abs(deltaZ) < 700Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "abs(deltaZ) < 700Ts (0)"); } else if (v == 63) { - g_snprintf(s, ITEM_LABEL_LENGTH, "1320Ts < abs(deltaZ) (63)"); + snprintf(s, ITEM_LABEL_LENGTH, "1320Ts < abs(deltaZ) (63)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs < abs(deltaZ) <= %uTs (%u)", 700+(v-1)*10, 700+v*10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs < abs(deltaZ) <= %uTs (%u)", 700+(v-1)*10, 700+v*10, v); } } @@ -2553,11 +2553,11 @@ static void lte_rrc_RS_SINR_Range_r13_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RS-SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RS-SINR < -23dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB <= RS-SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB <= RS-SINR (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } } @@ -2565,11 +2565,11 @@ static void lte_rrc_RS_SINR_RangeNR_r15_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB < SS-SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB < SS-SINR (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } } @@ -2577,47 +2577,47 @@ static void lte_rrc_RSSI_Range_r13_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); } else if (v == 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); + snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -100+(v-1), -100+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -100+(v-1), -100+v, v); } } static void lte_rrc_scptm_FreqOffset_r14_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2*v, v); } static void lte_rrc_offsetDFN_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "0ms (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "0ms (0)"); } else if (v < 1000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.3fms (%u)", ((float)v)/1000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.3fms (%u)", ((float)v)/1000, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "1ms (1000)"); + snprintf(s, ITEM_LABEL_LENGTH, "1ms (1000)"); } } static void lte_rrc_thresholdWLAN_RSSI_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -128+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -128+v, v); } static void lte_rrc_cr_Limit_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); } else if (v < 10000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.4f (%u)", ((float)v)/10000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.4f (%u)", ((float)v)/10000, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "1 (10000)"); + snprintf(s, ITEM_LABEL_LENGTH, "1 (10000)"); } } @@ -2625,18 +2625,18 @@ static void lte_rrc_SL_CBR_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); } else if (v < 100) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f (%u)", ((float)v)/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f (%u)", ((float)v)/100, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "1 (100)"); + snprintf(s, ITEM_LABEL_LENGTH, "1 (100)"); } } static void lte_rrc_threshS_RSSI_CBR_r14_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -112+(2*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -112+(2*v), v); } static const value_string lte_rrc_schedulingInfoSIB1_NB_r13_vals[] = { @@ -2660,11 +2660,11 @@ static void lte_rrc_NRSRP_Range_NB_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); } else if (v < 113) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); } } @@ -2673,32 +2673,32 @@ lte_rrc_NRSRQ_Range_NB_r14_fmt(gchar *s, guint32 v) { gint32 rsrq = (guint32)v; if (rsrq == -30) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (-30)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (-30)"); } else if (rsrq < 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19, ((float)rsrq/2)-19, rsrq); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19, ((float)rsrq/2)-19, rsrq); } else if (rsrq == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -19.5dB (0)"); } else if (rsrq < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19.5, ((float)rsrq/2)-19.5, rsrq); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19.5, ((float)rsrq/2)-19.5, rsrq); } else if (rsrq == 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3 <= NRSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3 <= NRSRQ (34)"); } else if (rsrq < 46) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-20, ((float)rsrq/2)-20, rsrq); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-20, ((float)rsrq/2)-20, rsrq); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (46)"); + snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (46)"); } } static void lte_rrc_mbms_MaxBW_r14_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u MHz (%u)", 40*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u MHz (%u)", 40*v, v); } static void lte_rrc_dl_1024QAM_TotalWeightedLayers_r15_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); } static void @@ -2953,7 +2953,7 @@ lte_rrc_localTimeOffset_fmt(gchar *s, guint32 v) { gint32 time_offset = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", (time_offset < 0) ? '-':'+', abs(time_offset) >> 2, (abs(time_offset) & 0x03) * 15, time_offset); } diff --git a/epan/dissectors/asn1/mms/packet-mms-template.c b/epan/dissectors/asn1/mms/packet-mms-template.c index d5d004d700..7a658f1ff9 100644 --- a/epan/dissectors/asn1/mms/packet-mms-template.c +++ b/epan/dissectors/asn1/mms/packet-mms-template.c @@ -84,7 +84,7 @@ static void private_data_add_preCinfo(asn1_ctx_t *actx, guint32 val) { mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx); - g_snprintf(private_data->preCinfo, BUFFER_SIZE_PRE, "%02d ", val); + snprintf(private_data->preCinfo, BUFFER_SIZE_PRE, "%02d ", val); } static char* @@ -107,7 +107,7 @@ static void private_data_add_moreCinfo_float(asn1_ctx_t *actx, tvbuff_t *tvb) { mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx); - g_snprintf(private_data->moreCinfo, BUFFER_SIZE_MORE, + snprintf(private_data->moreCinfo, BUFFER_SIZE_MORE, " %f", tvb_get_ieee_float(tvb, 1, ENC_BIG_ENDIAN)); } diff --git a/epan/dissectors/asn1/ngap/packet-ngap-template.c b/epan/dissectors/asn1/ngap/packet-ngap-template.c index 2931a9a3c3..b7d5f630b1 100644 --- a/epan/dissectors/asn1/ngap/packet-ngap-template.c +++ b/epan/dissectors/asn1/ngap/packet-ngap-template.c @@ -590,19 +590,19 @@ dissect_ngap_warningMessageContents(tvbuff_t *warning_msg_tvb, proto_tree *tree, static void ngap_PacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void ngap_PacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void ngap_TimeUEStayedInCellEnhancedGranularity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); } static void @@ -612,26 +612,26 @@ ngap_PeriodicRegistrationUpdateTimer_fmt(gchar *s, guint32 v) switch (v>>5) { case 0: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val * 10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val * 10, v); break; case 1: default: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val, v); break; case 2: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val * 10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val * 10, v); break; case 3: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 2, v); break; case 4: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 30, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 30, v); break; case 5: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val, v); break; case 7: - g_snprintf(s, ITEM_LABEL_LENGTH, "deactivated (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "deactivated (%u)", v); break; } } @@ -639,25 +639,25 @@ ngap_PeriodicRegistrationUpdateTimer_fmt(gchar *s, guint32 v) static void ngap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static void ngap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); } static void ngap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); } static void ngap_Threshold_SINR_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); } static struct ngap_private_data* diff --git a/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c b/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c index be4000a1db..c495d497e2 100644 --- a/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c +++ b/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c @@ -208,7 +208,7 @@ nr_rrc_q_RxLevMin_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", 2*d, d); + snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", 2*d, d); } static const value_string nr_rrc_serialNumber_gs_vals[] = { @@ -304,7 +304,7 @@ nr_rrc_localTimeOffset_fmt(gchar *s, guint32 v) { gint32 time_offset = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", (time_offset < 0) ? '-':'+', abs(time_offset) >> 2, (abs(time_offset) & 0x03) * 15, time_offset); } @@ -312,13 +312,13 @@ nr_rrc_localTimeOffset_fmt(gchar *s, guint32 v) static void nr_rrc_drx_SlotOffset_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%g ms (%u)", 1./32 * v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g ms (%u)", 1./32 * v, v); } static void nr_rrc_Hysteresis_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gdB (%u)", 0.5 * v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gdB (%u)", 0.5 * v, v); } static void @@ -326,7 +326,7 @@ nr_rrc_msg3_DeltaPreamble_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddB (%d)", 2 * d, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddB (%d)", 2 * d, d); } static void @@ -334,18 +334,18 @@ nr_rrc_Q_RxLevMin_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", 2 * d, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", 2 * d, d); } static void nr_rrc_RSRP_RangeEUTRA_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); } else if (v < 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); } } @@ -353,11 +353,11 @@ static void nr_rrc_RSRQ_RangeEUTRA_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (v < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); } } @@ -365,31 +365,31 @@ static void nr_rrc_SINR_RangeEUTRA_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SINR < -23dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SINR (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } } static void nr_rrc_ReselectionThreshold_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2 * v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2 * v, v); } static void nr_rrc_RSRP_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); } else if (v < 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", v-157, v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", v-157, v-156, v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); + snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "infinity (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "infinity (127)"); } } @@ -397,11 +397,11 @@ static void nr_rrc_RSRQ_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); } else if (v < 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-20dB <= SS-RSRQ (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "-20dB <= SS-RSRQ (127)"); } } @@ -409,35 +409,35 @@ static void nr_rrc_SINR_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); } else if (v < 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)"); } } static void nr_rrc_dl_1024QAM_TotalWeightedLayers_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); } static void nr_rrc_timeConnFailure_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); } static void nr_rrc_RSSI_Range_r16_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); } else if (v < 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", v-101, v-100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", v-101, v-100, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); + snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); } } @@ -447,19 +447,19 @@ nr_rrc_RSRQ_RangeEUTRA_r16_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (d == -34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -36dB (-34)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -36dB (-34)"); } else if (d < 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19, ((float)d/2)-19, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19, ((float)d/2)-19, d); } else if (d == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (d < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19.5, ((float)d/2)-19.5, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19.5, ((float)d/2)-19.5, d); } else if (d == 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); } else if (d < 46) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-20, ((float)d/2)-20, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-20, ((float)d/2)-20, d); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= RSRQ (46)"); + snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= RSRQ (46)"); } } @@ -469,11 +469,11 @@ nr_rrc_utra_FDD_RSCP_r16_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (d == -5) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -120dBm (-5)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -120dBm (-5)"); } else if (d < 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddB (%d)", d-116, d-115, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddB (%d)", d-116, d-115, d); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSCP (91)"); + snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSCP (91)"); } } @@ -481,18 +481,18 @@ static void nr_rrc_utra_FDD_EcN0_r16_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Ec/No < -24dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "Ec/No < -24dB (0)"); } else if (v < 49) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= Ec/No < %.1fdB (%u)", (((float)v-1)/2)-24, ((float)v/2)-24, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= Ec/No < %.1fdB (%u)", (((float)v-1)/2)-24, ((float)v/2)-24, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "0dB <= Ec/No (49)"); + snprintf(s, ITEM_LABEL_LENGTH, "0dB <= Ec/No (49)"); } } static void nr_rrc_averageDelay_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); } static void @@ -500,26 +500,26 @@ nr_rrc_measTriggerQuantity_utra_FDD_RSCP_r16_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", d-115, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", d-115, d); } static void nr_rrc_measTriggerQuantity_utra_FDD_EcN0_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", (float)v/2-24.5, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", (float)v/2-24.5, v); } static void nr_rrc_SRS_RSRP_r16_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SRS-RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SRS-RSRP < -140dBm (0)"); } else if (v < 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SRS-RSRP < %ddB (%u)", v-141, v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SRS-RSRP < %ddB (%u)", v-141, v-140, v); } else if (v == 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= SRS-RSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= SRS-RSRP (97)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "Infinity (98)"); + snprintf(s, ITEM_LABEL_LENGTH, "Infinity (98)"); } } @@ -528,7 +528,7 @@ nr_rrc_MeasTriggerQuantityOffset_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", (float)d/2, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", (float)d/2, d); } static int diff --git a/epan/dissectors/asn1/s1ap/packet-s1ap-template.c b/epan/dissectors/asn1/s1ap/packet-s1ap-template.c index a035987caf..bf18634bd2 100644 --- a/epan/dissectors/asn1/s1ap/packet-s1ap-template.c +++ b/epan/dissectors/asn1/s1ap/packet-s1ap-template.c @@ -257,13 +257,13 @@ static int dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU(tvbuff_t *tvb, static void s1ap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); } static void s1ap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); } static const true_false_string s1ap_tfs_interfacesToTrace = { @@ -274,7 +274,7 @@ static const true_false_string s1ap_tfs_interfacesToTrace = { static void s1ap_Time_UE_StayedInCell_EnhancedGranularity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); } const value_string s1ap_serialNumber_gs_vals[] = { @@ -326,7 +326,7 @@ dissect_s1ap_warningMessageContents(tvbuff_t *warning_msg_tvb, proto_tree *tree, static void s1ap_EUTRANRoundTripDelayEstimationInfo_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 16*v, v); } static const true_false_string s1ap_tfs_activate_do_not_activate = { @@ -337,25 +337,25 @@ static const true_false_string s1ap_tfs_activate_do_not_activate = { static void s1ap_Packet_LossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); } static void s1ap_threshold_nr_rsrp_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); } static void s1ap_threshold_nr_rsrq_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); } static void s1ap_threshold_nr_sinr_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); } static struct s1ap_private_data* diff --git a/epan/dissectors/asn1/t38/t38.cnf b/epan/dissectors/asn1/t38/t38.cnf index 1eed2c3b01..c3d5e03e28 100644 --- a/epan/dissectors/asn1/t38/t38.cnf +++ b/epan/dissectors/asn1/t38/t38.cnf @@ -100,14 +100,14 @@ VAL_PTR=&Data_Field_field_type_value } else { col_append_str(actx->pinfo->cinfo, COL_INFO, " (t4-data Reassembled: No packet lost)"); - g_snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); + snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); } if (p_t38_packet_conv_info->packet_lost) { - g_snprintf(t38_info->desc_comment, MAX_T38_DESC, " Pack lost: %d, Pack burst lost: %d", p_t38_packet_conv_info->packet_lost, p_t38_packet_conv_info->burst_lost); + snprintf(t38_info->desc_comment, MAX_T38_DESC, " Pack lost: %d, Pack burst lost: %d", p_t38_packet_conv_info->packet_lost, p_t38_packet_conv_info->burst_lost); } else { - g_snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); + snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); } process_reassembled_data(tvb, offset, actx->pinfo, diff --git a/epan/dissectors/asn1/ulp/packet-ulp-template.c b/epan/dissectors/asn1/ulp/packet-ulp-template.c index 8e0355ed1f..70a64af489 100644 --- a/epan/dissectors/asn1/ulp/packet-ulp-template.c +++ b/epan/dissectors/asn1/ulp/packet-ulp-template.c @@ -91,18 +91,18 @@ static void ulp_ganssDataBitInterval_fmt(gchar *s, guint32 v) { if (v == 15) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Time interval is not specified (15)"); + snprintf(s, ITEM_LABEL_LENGTH, "Time interval is not specified (15)"); } else { double interval = (0.1*pow(2, (double)v)); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", interval, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", interval, v); } } static void ulp_ExtendedEphemeris_validity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uh (%u)", 4*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uh (%u)", 4*v, v); } static void @@ -110,7 +110,7 @@ ulp_PositionEstimate_latitude_fmt(gchar *s, guint32 v) { double latitude = ((double)v*90)/pow(2,23); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", latitude, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", latitude, v); } static void @@ -118,18 +118,18 @@ ulp_PositionEstimate_longitude_fmt(gchar *s, guint32 v) { double longitude = ((double)(gint32)v*360)/pow(2,24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); } static void ulp_NMRelement_rxLev_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RxLev < -110dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RxLev < -110dBm (0)"); } else if (v == 63) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RxLev >= -48dBm (63)"); + snprintf(s, ITEM_LABEL_LENGTH, "RxLev >= -48dBm (63)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RxLev < %ddBm (%u)", -111+v, -110+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RxLev < %ddBm (%u)", -111+v, -110+v, v); } } @@ -137,13 +137,13 @@ static void ulp_UTRA_CarrierRSSI_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); } else if (v == 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI >= -25dBm (76)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI >= -25dBm (76)"); } else if (v > 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -101+v, -100+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -101+v, -100+v, v); } } @@ -151,13 +151,13 @@ static void ulp_PrimaryCCPCH_RSCP_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -115dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -115dBm (0)"); } else if (v == 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSCP >= -25dBm (91)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSCP >= -25dBm (91)"); } else if (v > 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddBm (%u)", -116+v, -115+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddBm (%u)", -116+v, -115+v, v); } } @@ -165,13 +165,13 @@ static void ulp_CPICH_Ec_N0_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 < -24dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 < -24dB (0)"); } else if (v == 49) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 >= 0dB (49)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 >= 0dB (49)"); } else if (v > 49) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= CPICH Ec/N0 < %.1fdB (%u)", -24.5+((float)v/2), -24+((float)v/2), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= CPICH Ec/N0 < %.1fdB (%u)", -24.5+((float)v/2), -24+((float)v/2), v); } } @@ -179,15 +179,15 @@ static void ulp_CPICH_RSCP_fmt(gchar *s, guint32 v) { if (v == 123) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP < -120dBm (123)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP < -120dBm (123)"); } else if (v > 123) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= CPICH RSCP < %ddBm (%u)", -244+v, -243+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= CPICH RSCP < %ddBm (%u)", -244+v, -243+v, v); } else if (v == 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP >= -25dBm (91)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP >= -25dBm (91)"); } else if (v < 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm < CPICH RSCP <= %ddBm (%u)", -116+v, -115+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm < CPICH RSCP <= %ddBm (%u)", -116+v, -115+v, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } } @@ -197,9 +197,9 @@ ulp_QoP_horacc_fmt(gchar *s, guint32 v) double uncertainty = 10*(pow(1.1, (double)v)-1); if (uncertainty < 1000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); } } @@ -208,13 +208,13 @@ ulp_QoP_veracc_fmt(gchar *s, guint32 v) { double uncertainty = 45*(pow(1.025, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } static void ulp_QoP_delay_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", pow(2, (double)v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", pow(2, (double)v), v); } static const true_false_string ulp_vertical_dir_val = { @@ -225,18 +225,18 @@ static const true_false_string ulp_vertical_dir_val = { static void ulp_RelativeTime_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%u)", 0.01*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%u)", 0.01*v, v); } static void ulp_RSRP_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); } else if (v == 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP >= -44dBm (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP >= -44dBm (97)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", -141+v, -140+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", -141+v, -140+v, v); } } @@ -244,36 +244,36 @@ static void ulp_RSRQ_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (v == 64) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ >= -3dB (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ >= -3dB (34)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", -20+((float)v/2), -19.5+((float)v/2), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", -20+((float)v/2), -19.5+((float)v/2), v); } } static void ulp_SignalDelta_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%sdB (%u)", v ? "0.5" : "0", v); + snprintf(s, ITEM_LABEL_LENGTH, "%sdB (%u)", v ? "0.5" : "0", v); } static void ulp_locationAccuracy_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%u)", 0.1*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%u)", 0.1*v, v); } static void ulp_WimaxRTD_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.01*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.01*v, v); } static void ulp_WimaxNMR_rssi_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fdBm (%u)", -103.75+(0.25*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fdBm (%u)", -103.75+(0.25*v), v); } static void @@ -281,7 +281,7 @@ ulp_UTRAN_gpsReferenceTimeUncertainty_fmt(gchar *s, guint32 v) { double uncertainty = 0.0022*(pow(1.18, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", uncertainty, v); } static const value_string ulp_ganss_time_id_vals[] = { @@ -295,13 +295,13 @@ static const value_string ulp_ganss_time_id_vals[] = { static void ulp_utran_GANSSTimingOfCell_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.25*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.25*v, v); } static void ulp_Coordinate_latitude_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", ((float)v/8388607.0)*90, v); } @@ -310,7 +310,7 @@ ulp_Coordinate_longitude_fmt(gchar *s, guint32 v) { gint32 longitude = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", ((float)longitude/8388608.0)*180, longitude); } diff --git a/epan/dissectors/asn1/x2ap/packet-x2ap-template.c b/epan/dissectors/asn1/x2ap/packet-x2ap-template.c index 0ca73e9c7d..92d868d5e5 100644 --- a/epan/dissectors/asn1/x2ap/packet-x2ap-template.c +++ b/epan/dissectors/asn1/x2ap/packet-x2ap-template.c @@ -255,31 +255,31 @@ static const true_false_string x2ap_tfs_activate_do_not_activate = { static void x2ap_Time_UE_StayedInCell_EnhancedGranularity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); } static void x2ap_handoverTriggerChange_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); } static void x2ap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); } static void x2ap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); } static void x2ap_Packet_LossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); } static struct x2ap_private_data* diff --git a/epan/dissectors/asn1/x509if/x509if.cnf b/epan/dissectors/asn1/x509if/x509if.cnf index 025d0211a7..ed0be162c6 100644 --- a/epan/dissectors/asn1/x509if/x509if.cnf +++ b/epan/dissectors/asn1/x509if/x509if.cnf @@ -213,7 +213,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" last_ava = (char *)wmem_alloc(actx->pinfo->pool, MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); - g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt); + snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt); proto_item_append_text(tree, " %%s", last_ava); @@ -260,7 +260,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember" if(!(name = oid_resolved_from_string(actx->pinfo->pool, actx->external.direct_reference))) name = actx->external.direct_reference; - g_snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s %%s", name, fmt, value); + snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s %%s", name, fmt, value); proto_item_append_text(tree, " %%s", last_ava); diff --git a/epan/dissectors/asn1/xnap/packet-xnap-template.c b/epan/dissectors/asn1/xnap/packet-xnap-template.c index 334aaa0f0a..18c1196b75 100644 --- a/epan/dissectors/asn1/xnap/packet-xnap-template.c +++ b/epan/dissectors/asn1/xnap/packet-xnap-template.c @@ -169,43 +169,43 @@ static dissector_handle_t xnap_handle; static void xnap_PacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void xnap_PacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void xnap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static void xnap_handoverTriggerChange_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); } static void xnap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); } static void xnap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); } static void xnap_Threshold_SINR_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); } static const true_false_string xnap_tfs_activate_do_not_activate = { diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c index 00fb4cf1fc..3815ebaa06 100644 --- a/epan/dissectors/packet-ansi_map.c +++ b/epan/dissectors/packet-ansi_map.c @@ -15964,14 +15964,14 @@ find_saved_invokedata(asn1_ctx_t *actx, struct ansi_tcap_private_t *p_private_tc /* Reverse order to invoke */ switch(ansi_map_response_matching_type){ case ANSI_MAP_TID_ONLY: - g_snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str); + snprintf(buf,1024,"%s",p_private_tcap->TransactionID_str); break; case ANSI_MAP_TID_AND_SOURCE: - g_snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,dst_str); + snprintf(buf,1024,"%s%s",p_private_tcap->TransactionID_str,dst_str); break; case ANSI_MAP_TID_SOURCE_AND_DEST: default: - g_snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,dst_str,src_str); + snprintf(buf,1024,"%s%s%s",p_private_tcap->TransactionID_str,dst_str,src_str); break; } diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index 3e108b391a..15191dd0e6 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -288,14 +288,14 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U /* Reverse order to invoke */ switch(ansi_tcap_response_matching_type){ case ANSI_TCAP_TID_ONLY: - g_snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str); + snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str); break; case ANSI_TCAP_TID_AND_SOURCE: - g_snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,dst); + snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,dst); break; case ANSI_TCAP_TID_SOURCE_AND_DEST: default: - g_snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,dst,src); + snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,dst,src); break; } diff --git a/epan/dissectors/packet-e1ap.c b/epan/dissectors/packet-e1ap.c index 6f00c61ab5..baa95b89cc 100644 --- a/epan/dissectors/packet-e1ap.c +++ b/epan/dissectors/packet-e1ap.c @@ -1210,19 +1210,19 @@ static const true_false_string e1ap_tfs_InterfacesToTrace = { static void e1ap_MaxPacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void e1ap_PacketDelayBudget_uL_D1_Result_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void e1ap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static e1ap_private_data_t* diff --git a/epan/dissectors/packet-f1ap.c b/epan/dissectors/packet-f1ap.c index 8ef39fe8aa..679b34f607 100644 --- a/epan/dissectors/packet-f1ap.c +++ b/epan/dissectors/packet-f1ap.c @@ -3143,19 +3143,19 @@ static void set_message_label(asn1_ctx_t *actx, int type) static void f1ap_MaxPacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void f1ap_PacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void f1ap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static f1ap_private_data_t* diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index 222aa4c9ea..93708db82a 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -3251,7 +3251,7 @@ dissect_h225_FastStart_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { char temp[50]; - g_snprintf(temp, 50, "%s %s", h225_pi->frame_label, codec_str); + snprintf(temp, 50, "%s %s", h225_pi->frame_label, codec_str); (void) g_strlcpy(h225_pi->frame_label, temp, 50); h225_pi->is_faststart = TRUE; } @@ -4289,10 +4289,10 @@ dissect_h225_Setup_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, h225_pi->cs_type = H225_SETUP; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4347,10 +4347,10 @@ dissect_h225_CallProceeding_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * h225_pi->cs_type = H225_CALL_PROCEDING; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4396,10 +4396,10 @@ dissect_h225_Connect_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U h225_pi->cs_type = H225_CONNECT; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4443,10 +4443,10 @@ dissect_h225_Alerting_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ h225_pi->cs_type = H225_ALERTING; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4477,7 +4477,7 @@ dissect_h225_Information_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_INFORMATION; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4642,7 +4642,7 @@ dissect_h225_ReleaseComplete_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_RELEASE_COMPLET; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4766,7 +4766,7 @@ dissect_h225_Facility_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_FACILITY; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4803,10 +4803,10 @@ dissect_h225_Progress_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ h225_pi->cs_type = H225_PROGRESS; if (contains_faststart) { char temp[50]; - g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); + snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label); (void) g_strlcpy(h225_pi->frame_label, temp, 50); } else - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4852,7 +4852,7 @@ dissect_h225_Status_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_STATUS; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; @@ -4897,7 +4897,7 @@ dissect_h225_SetupAcknowledge_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t h225_pi = (h225_packet_info*)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_h225, 0); if (h225_pi != NULL) { h225_pi->cs_type = H225_SETUP_ACK; - g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); + snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>")); } return offset; diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index cb523c2f1d..4bcb6388e9 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -6659,7 +6659,7 @@ dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ if (hf_index == hf_h245_subMessageIdentifier_standard) { col_append_str(actx->pinfo->cinfo, COL_INFO, val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>") ); - g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>")); + snprintf(h245_pi->frame_label, 50, "%s", val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>")); } @@ -10730,7 +10730,7 @@ dissect_h245_RequestMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx if (strlen(h245_pi->frame_label) == 0) { - g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_RequestMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_RequestMessage_short_vals, "UKN")); /* if it is OLC or RM*/ if ((codec_type != NULL) && (( value == RequestMessage_openLogicalChannel) || ( value == RequestMessage_requestMode))) @@ -12354,7 +12354,7 @@ dissect_h245_ResponseMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx if (h245_pi != NULL){ /* Add to packet info */ if ( strlen(h245_pi->frame_label) == 0 ){ - g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN")); } (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50); } @@ -13386,7 +13386,7 @@ dissect_h245_CommandMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx /* Add to packet info */ if (h245_pi != NULL){ if ( strlen(h245_pi->frame_label) == 0 ){ - g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN")); } (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50); } @@ -14447,7 +14447,7 @@ dissect_h245_IndicationMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac /* Add to packet info */ if (h245_pi !=NULL){ if ( strlen(h245_pi->frame_label) == 0 ){ - g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN")); } (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50); @@ -20813,6 +20813,6 @@ static void init_h245_packet_info(h245_packet_info *pi) pi->msg_type = H245_OTHER; pi->frame_label[0] = '\0'; - g_snprintf(pi->comment, sizeof(pi->comment), "H245 "); + snprintf(pi->comment, sizeof(pi->comment), "H245 "); } diff --git a/epan/dissectors/packet-ieee1609dot2.c b/epan/dissectors/packet-ieee1609dot2.c index 031bf48bc5..0b6ed840c8 100644 --- a/epan/dissectors/packet-ieee1609dot2.c +++ b/epan/dissectors/packet-ieee1609dot2.c @@ -2112,9 +2112,9 @@ ieee1609dot2_NinetyDegreeInt_fmt(gchar *s, guint32 v) { gint32 lat = (gint32)v; if (lat == 900000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lat); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lat); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lat) / 10000000, abs(lat) % 10000000 * 6 / 1000000, abs(lat) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -2128,9 +2128,9 @@ ieee1609dot2_OneEightyDegreeInt_fmt(gchar *s, guint32 v) { gint32 lng = (gint32)v; if (lng == 1800000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lng); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable(%d)", lng); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lng) / 10000000, abs(lng) % 10000000 * 6 / 1000000, abs(lng) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -2144,7 +2144,7 @@ ieee1609dot2_ElevInt_fmt(gchar *s, guint32 v) { // Range is from -4096 to 61439 in units of one-tenth of a meter gint32 alt = (gint32)v - 4096; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%u)", alt * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%u)", alt * 0.1, v); } static void @@ -2152,7 +2152,7 @@ ieee1609dot2_Time32_fmt(gchar *s, guint32 v) { time_t secs = v + 1072915200 - 5; struct tm *tm = gmtime(&secs); - g_snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u (%u)", + snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u (%u)", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, v ); } @@ -2163,7 +2163,7 @@ ieee1609dot2_Time64_fmt(gchar *s, guint64 v) time_t secs = v / 1000000 + 1072915200 - 5; guint32 usecs = v % 1000000; struct tm *tm = gmtime(&secs); - g_snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u.%06u (%" G_GUINT64_FORMAT ")", + snprintf(s, ITEM_LABEL_LENGTH, "%u-%02u-%02u %02u:%02u:%02u.%06u (%" G_GUINT64_FORMAT ")", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, usecs, v ); } diff --git a/epan/dissectors/packet-its.c b/epan/dissectors/packet-its.c index 52c0a0cc09..4b8fe5fb66 100644 --- a/epan/dissectors/packet-its.c +++ b/epan/dissectors/packet-its.c @@ -18567,9 +18567,9 @@ its_latitude_fmt(gchar *s, guint32 v) { gint32 lat = (gint32)v; if (lat == 900000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lat) / 10000000, abs(lat) % 10000000 * 6 / 1000000, abs(lat) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -18583,9 +18583,9 @@ its_longitude_fmt(gchar *s, guint32 v) { gint32 lng = (gint32)v; if (lng == 1800000001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lng) / 10000000, abs(lng) % 10000000 * 6 / 1000000, abs(lng) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -18599,9 +18599,9 @@ its_altitude_fmt(gchar *s, guint32 v) { gint32 alt = (gint32)v; if (alt == 800001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); } } @@ -18610,9 +18610,9 @@ its_delta_latitude_fmt(gchar *s, guint32 v) { gint32 lat = (gint32)v; if (lat == 131072) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lat); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lat) / 10000000, abs(lat) % 10000000 * 6 / 1000000, abs(lat) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -18626,9 +18626,9 @@ its_delta_longitude_fmt(gchar *s, guint32 v) { gint32 lng = (gint32)v; if (lng == 131072) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", lng); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%u°%u'%.3f\"%c (%d)", abs(lng) / 10000000, abs(lng) % 10000000 * 6 / 1000000, abs(lng) % 10000000 * 6 % 1000000 * 6.0 / 100000.0, @@ -18642,9 +18642,9 @@ its_delta_altitude_fmt(gchar *s, guint32 v) { gint32 alt = (gint32)v; if (alt == 12800) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", alt); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", alt * 0.01, alt); } } @@ -18652,7 +18652,7 @@ static void its_path_delta_time_fmt(gchar *s, guint32 v) { gint32 dt = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%d)", dt * 0.01, dt); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%d)", dt * 0.01, dt); } @@ -18660,11 +18660,11 @@ static void its_sax_length_fmt(gchar *s, guint32 v) { if (v == 4095) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 4094) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); } } @@ -18673,9 +18673,9 @@ its_heading_value_fmt(gchar *s, guint32 v) { const gchar *p = try_val_to_str(v, VALS(its_HeadingValue_vals)); if (p) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", p, v); + snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", p, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } @@ -18683,11 +18683,11 @@ static void its_heading_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } @@ -18695,12 +18695,12 @@ static void its_speed_value_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", v); } else if (v == 16383) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { double vms = v * 0.01; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", vms, vms * 3.6, v); } } @@ -18709,11 +18709,11 @@ static void its_speed_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s (%d)", v * 0.01, v); } } @@ -18721,11 +18721,11 @@ static void its_vehicle_length_value_fmt(gchar *s, guint32 v) { if (v == 1023) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 1022) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); } } @@ -18733,11 +18733,11 @@ static void its_vehicle_width_fmt(gchar *s, guint32 v) { if (v == 62) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 61) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); } } @@ -18746,9 +18746,9 @@ its_acceleration_value_fmt(gchar *s, guint32 v) { gint32 acc = (gint32)v; if (acc == 161) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", acc * 0.1, acc); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", acc * 0.1, acc); } } @@ -18756,11 +18756,11 @@ static void its_acceleration_confidence_fmt(gchar *s, guint32 v) { if (v == 102) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm/s² (%d)", v * 0.1, v); } } @@ -18769,11 +18769,11 @@ its_curvature_value_fmt(gchar *s, guint32 v) { gint32 curv = (gint32)v; if (curv == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); } else if (curv == 30001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.3fm %s (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.3fm %s (%d)", 30000.0 / curv, (curv > 0) ? "left" : "right", curv); @@ -18785,11 +18785,11 @@ its_yaw_rate_value_fmt(gchar *s, guint32 v) { gint32 yaw = (gint32)v; if (yaw == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); } else if (yaw == 32767) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f°/s %s (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2f°/s %s (%d)", yaw * 0.01, (yaw > 0) ? "left" : "right", yaw); @@ -18801,11 +18801,11 @@ its_swa_value_fmt(gchar *s, guint32 v) { gint32 swa = (gint32)v; if (swa == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "straight (%d)", v); } else if (swa == 512) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° %s (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° %s (%d)", swa * 1.5, (swa > 0) ? "left" : "right", swa); @@ -18816,11 +18816,11 @@ static void its_swa_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 1.5, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 1.5, v); } } @@ -18828,9 +18828,9 @@ static void dsrc_moi_fmt(gchar *s, guint32 v) { if (v == 527040) { - g_snprintf(s, ITEM_LABEL_LENGTH, "invalid (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "invalid (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ud %02u:%02u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%ud %02u:%02u (%d)", v / 1440, v % 1440 / 60, v % 60, v); } } @@ -18839,11 +18839,11 @@ static void dsrc_dsecond_fmt(gchar *s, guint32 v) { if (v == 65535) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if ((61000 <= v) && (v <= 65534)) { - g_snprintf(s, ITEM_LABEL_LENGTH, "reserved (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "reserved (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%02u.%03u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%02u.%03u (%d)", v / 1000, v % 1000, v); } } @@ -18852,11 +18852,11 @@ static void dsrc_time_mark_fmt(gchar *s, guint32 v) { if (v == 36001) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", v); } else if (v == 36000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "moreThanHour (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "moreThanHour (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%02u:%02u.%u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%02u:%02u.%u (%d)", v / 600, v % 600 / 10, v % 10, v); } } @@ -18885,10 +18885,10 @@ static void dsrc_velocity_fmt(gchar *s, guint32 v) { if (v == 8191) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { double vms = v * 0.02; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %ukm/h (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %ukm/h (%d)", vms, (int)lround(vms * 3.6), v); } } @@ -18896,7 +18896,7 @@ dsrc_velocity_fmt(gchar *s, guint32 v) static void dsrc_angle_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f° (%d)", v * 0.0125, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f° (%d)", v * 0.0125, v); } static void @@ -18904,13 +18904,13 @@ dsrc_delta_time_fmt(gchar *s, guint32 v) { gint32 dt = (gint32)v; if (dt == -122) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", dt); + snprintf(s, ITEM_LABEL_LENGTH, "unknown (%d)", dt); } else if (dt == -121) { - g_snprintf(s, ITEM_LABEL_LENGTH, "moreThanMinus20Minutes (%d)", dt); + snprintf(s, ITEM_LABEL_LENGTH, "moreThanMinus20Minutes (%d)", dt); } else if (dt == 121) { - g_snprintf(s, ITEM_LABEL_LENGTH, "moreThanPlus20Minutes (%d)", dt); + snprintf(s, ITEM_LABEL_LENGTH, "moreThanPlus20Minutes (%d)", dt); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%s%d:%02u (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%s%d:%02u (%d)", (dt < 0) ? "-" : "", abs(dt) / 6, abs(dt) % 6 * 10, dt); } } @@ -18919,11 +18919,11 @@ static void cpm_general_confidence_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unknown (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unknown (%u)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u%% (%u)", v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u%% (%u)", v, v); } } @@ -18931,18 +18931,18 @@ static void cpm_distance_value_fmt(gchar *s, guint32 v) { gint32 sv = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", sv * 0.01, sv); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", sv * 0.01, sv); } static void cpm_distance_confidence_fmt(gchar *s, guint32 v) { if (v == 102) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); } } @@ -18951,12 +18951,12 @@ cpm_speed_value_ext_fmt(gchar *s, guint32 v) { gint32 sv = (gint32)v; if (sv == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", sv); + snprintf(s, ITEM_LABEL_LENGTH, "standstill (%d)", sv); } else if (sv == 16383) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", sv); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", sv); } else { double vms = sv * 0.01; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm/s = %.1fkm/h (%d)", vms, vms * 3.6, sv); } } @@ -18965,9 +18965,9 @@ static void cpm_cartesian_angle_value_fmt(gchar *s, guint32 v) { if (v == 3601) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } @@ -18975,29 +18975,29 @@ static void cpm_angle_confidence_fmt(gchar *s, guint32 v) { if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f° (%d)", v * 0.1, v); } } static void cpm_object_dimension_value_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%d)", v * 0.1, v); } static void cpm_object_dimension_confidence_fmt(gchar *s, guint32 v) { if (v == 102) { - g_snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "unavailable (%d)", v); } else if (v == 101) { - g_snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); + snprintf(s, ITEM_LABEL_LENGTH, "outOfRange (%d)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fm (%d)", v * 0.01, v); } } @@ -19022,7 +19022,7 @@ its_msgid_prompt(packet_info *pinfo, gchar *result) { guint32 msgid = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, hf_its_messageID, pinfo->curr_layer_num)); - g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "MsgId (%s%u)", UTF8_RIGHTWARDS_ARROW, msgid); + snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "MsgId (%s%u)", UTF8_RIGHTWARDS_ARROW, msgid); } static gpointer diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 10f7ba4598..8e5f031d10 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -1139,11 +1139,11 @@ add_encryption_key(packet_info *pinfo, } new_key = wmem_new0(key_scope, enc_key_t); - g_snprintf(new_key->key_origin, KRB_MAX_ORIG_LEN, "%s %s in frame %u", + snprintf(new_key->key_origin, KRB_MAX_ORIG_LEN, "%s %s in frame %u", methodl, origin, pinfo->num); new_key->fd_num = pinfo->num; new_key->id = ++private_data->learnt_key_ids; - g_snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "%d.%u", + snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "%d.%u", new_key->fd_num, new_key->id); new_key->keytype=keytype; new_key->keylength=keylength; @@ -1204,7 +1204,7 @@ save_encryption_key(tvbuff_t *tvb _U_, int offset _U_, int length _U_, const char *element = proto_registrar_get_name(hf_index); char origin[KRB_MAX_ORIG_LEN] = { 0, }; - g_snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); + snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); add_encryption_key(actx->pinfo, private_data, @@ -1375,12 +1375,12 @@ static void missing_encryption_key(proto_tree *tree, packet_info *pinfo, enc_key_t *mek = NULL; mek = wmem_new0(pinfo->pool, enc_key_t); - g_snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, + snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, "keytype %d usage %d missing in frame %u", keytype, usage, pinfo->num); mek->fd_num = pinfo->num; mek->id = ++private_data->missing_key_ids; - g_snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", + snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", mek->id); mek->keytype=keytype; @@ -1451,12 +1451,12 @@ static void missing_signing_key(proto_tree *tree, packet_info *pinfo, enc_key_t *mek = NULL; mek = wmem_new0(pinfo->pool, enc_key_t); - g_snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, + snprintf(mek->key_origin, KRB_MAX_ORIG_LEN, "checksum %d keytype %d missing in frame %u", checksum, keytype, pinfo->num); mek->fd_num = pinfo->num; mek->id = ++private_data->missing_key_ids; - g_snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", + snprintf(mek->id_str, KRB_MAX_ID_STR_LEN, "missing.%u", mek->id); mek->keytype=keytype; @@ -1583,19 +1583,19 @@ read_keytab_file(const char *filename) new_key = wmem_new0(wmem_epan_scope(), enc_key_t); new_key->fd_num = -1; new_key->id = ++kerberos_longterm_ids; - g_snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); + snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); new_key->next = enc_key_list; /* generate origin string, describing where this key came from */ pos=new_key->key_origin; pos+=MIN(KRB_MAX_ORIG_LEN, - g_snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); + snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); for(i=0;i<key.principal->length;i++){ pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "%s%s",(i?"/":""),(key.principal->data[i]).data)); + snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "%s%s",(i?"/":""),(key.principal->data[i]).data)); } pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "@%s",key.principal->realm.data)); + snprintf(pos, (gulong)(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin)), "@%s",key.principal->realm.data)); *pos=0; new_key->keytype=key.key.enctype; new_key->keylength=key.key.length; @@ -2775,19 +2775,19 @@ read_keytab_file(const char *filename) new_key = wmem_new0(wmem_epan_scope(), enc_key_t); new_key->fd_num = -1; new_key->id = ++kerberos_longterm_ids; - g_snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); + snprintf(new_key->id_str, KRB_MAX_ID_STR_LEN, "keytab.%u", new_key->id); new_key->next = enc_key_list; /* generate origin string, describing where this key came from */ pos=new_key->key_origin; pos+=MIN(KRB_MAX_ORIG_LEN, - g_snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); + snprintf(pos, KRB_MAX_ORIG_LEN, "keytab principal ")); for(i=0;i<key.principal->name.name_string.len;i++){ pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "%s%s",(i?"/":""),key.principal->name.name_string.val[i])); + snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "%s%s",(i?"/":""),key.principal->name.name_string.val[i])); } pos+=MIN(KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), - g_snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "@%s",key.principal->realm)); + snprintf(pos, KRB_MAX_ORIG_LEN-(pos-new_key->key_origin), "@%s",key.principal->realm)); *pos=0; new_key->keytype=key.keyblock.keytype; new_key->keylength=(int)key.keyblock.keyvalue.length; @@ -2924,7 +2924,7 @@ add_encryption_key(packet_info *pinfo, int keytype, int keylength, const char *k new_key->keytype = keytype; new_key->length = keylength; new_key->contents = g_memdup2(keyvalue, keylength); - g_snprintf(new_key->origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %u", origin, pinfo->num); + snprintf(new_key->origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %u", origin, pinfo->num); service_key_list = g_slist_append(service_key_list, (gpointer) new_key); } @@ -2939,7 +2939,7 @@ save_encryption_key(tvbuff_t *tvb _U_, int offset _U_, int length _U_, const char *element = proto_registrar_get_name(hf_index); char origin[KRB_MAX_ORIG_LEN] = { 0, }; - g_snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); + snprintf(origin, KRB_MAX_ORIG_LEN, "%s_%s", parent, element); add_encryption_key(actx->pinfo, private_data->key.keytype, @@ -3052,7 +3052,7 @@ read_keytab_file(const char *service_key_file) sk->keytype = KEYTYPE_DES3_CBC_MD5; sk->length = DES3_KEY_SIZE; sk->contents = g_memdup2(buf + 2, DES3_KEY_SIZE); - g_snprintf(sk->origin, KRB_MAX_ORIG_LEN, "3DES service key file, key #%d, offset %ld", count, ftell(skf)); + snprintf(sk->origin, KRB_MAX_ORIG_LEN, "3DES service key file, key #%d, offset %ld", count, ftell(skf)); service_key_list = g_slist_append(service_key_list, (gpointer) sk); if (fseek(skf, newline_skip, SEEK_CUR) < 0) { fprintf(stderr, "unable to seek...\n"); diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 7c2ef2f636..8ec97cb899 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -891,7 +891,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as dissect_dcerpc_uuid_t(tvb, offset, actx->pinfo, tree, drep, hf_ldap_guid, &uuid); ldapvalue_string=(char*)wmem_alloc(actx->pinfo->pool, 1024); - g_snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid.data1, uuid.data2, uuid.data3, uuid.data4[0], uuid.data4[1], uuid.data4[2], uuid.data4[3], uuid.data4[4], uuid.data4[5], uuid.data4[6], uuid.data4[7]); @@ -905,7 +905,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as flags=tvb_get_letohl(tvb, offset); ldapvalue_string=(char*)wmem_alloc(actx->pinfo->pool, 1024); - g_snprintf(ldapvalue_string, 1023, "0x%08x",flags); + snprintf(ldapvalue_string, 1023, "0x%08x",flags); /* populate bitmask subtree */ offset = dissect_mscldap_ntver_flags(tree, tvb, offset); @@ -4642,7 +4642,7 @@ dissect_ldap_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat dissect_dcerpc_uuid_t(tvb, 0, pinfo, tree, drep, hf_ldap_guid, &uuid); ldapvalue_string=(char*)wmem_alloc(pinfo->pool, 1024); - g_snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + snprintf(ldapvalue_string, 1023, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid.data1, uuid.data2, uuid.data3, uuid.data4[0], uuid.data4[1], uuid.data4[2], uuid.data4[3], uuid.data4[4], uuid.data4[5], uuid.data4[6], uuid.data4[7]); diff --git a/epan/dissectors/packet-lpp.c b/epan/dissectors/packet-lpp.c index 3ec627d8cf..875dcfc74d 100644 --- a/epan/dissectors/packet-lpp.c +++ b/epan/dissectors/packet-lpp.c @@ -3257,7 +3257,7 @@ static int dissect_NR_UEB_TRP_RTD_Info_r16_PDU(tvbuff_t *tvb _U_, packet_info *p static void lpp_degreesLatitude_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", ((float)v/8388607.0)*90, v); } @@ -3266,7 +3266,7 @@ lpp_degreesLongitude_fmt(gchar *s, guint32 v) { gint32 longitude = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", ((float)longitude/8388608.0)*180, longitude); } @@ -3276,25 +3276,25 @@ lpp_uncertainty_fmt(gchar *s, guint32 v) double uncertainty = 10*(pow(1.1, (double)v)-1); if (uncertainty < 1000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); } } static void lpp_angle_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u degrees (%u)", 2*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u degrees (%u)", 2*v, v); } static void lpp_confidence_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "no information (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "no information (0)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u%%", v); + snprintf(s, ITEM_LABEL_LENGTH, "%u%%", v); } } @@ -3303,7 +3303,7 @@ lpp_1_10_degrees_fmt(gchar *s, guint32 v) { double val = (double)v/10; - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", val, v); } static void @@ -3311,19 +3311,19 @@ lpp_1_100_m_fmt(gchar *s, guint32 v) { double val = (double)v/100; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", val, v); } static void lpp_measurementLimit_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u octets (%u)", 100*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u octets (%u)", 100*v, v); } static void lpp_altitude_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um", v); + snprintf(s, ITEM_LABEL_LENGTH, "%um", v); } static void @@ -3331,19 +3331,19 @@ lpp_uncertaintyAltitude_fmt(gchar *s, guint32 v) { double uncertainty = 45*(pow(1.025, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } static void lpp_radius_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", 5*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", 5*v, v); } static void lpp_nr_LTE_fineTiming_Offset_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void @@ -3351,32 +3351,32 @@ lpp_expectedRSTD_fmt(gchar *s, guint32 v) { gint32 rstd = 3*((gint32)v-8192); - g_snprintf(s, ITEM_LABEL_LENGTH, "%dTs (%u)", rstd, v); + snprintf(s, ITEM_LABEL_LENGTH, "%dTs (%u)", rstd, v); } static void lpp_expectedRSTD_Uncertainty_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 3*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 3*v, v); } static void lpp_rstd_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSTD < -15391Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSTD < -15391Ts (0)"); } else if (v < 2260) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 15391-5*(v-1), 15391-5*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 15391-5*(v-1), 15391-5*v, v); } else if (v < 6355) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 6356-v, 6355-v, v); + snprintf(s, ITEM_LABEL_LENGTH, "-%uTs <= RSTD < -%uTs (%u)", 6356-v, 6355-v, v); } else if (v == 6355) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-1Ts <= RSTD <= 0Ts (6355)"); + snprintf(s, ITEM_LABEL_LENGTH, "-1Ts <= RSTD <= 0Ts (6355)"); } else if (v < 10452) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", v-6356, v-6355, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", v-6356, v-6355, v); } else if (v < 12711) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", 5*(v-1)-48159, 5*v-48159, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs < RSTD <= %uTs (%u)", 5*(v-1)-48159, 5*v-48159, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "15391Ts < RSTD (12711)"); + snprintf(s, ITEM_LABEL_LENGTH, "15391Ts < RSTD (12711)"); } } @@ -3442,7 +3442,7 @@ lpp_relativeTimeDifference_fmt(gchar *s, guint32 v) { double rtd = (double)((gint32)v)*0.5; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f Ts (%d)", rtd, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f Ts (%d)", rtd, (gint32)v); } static void @@ -3450,7 +3450,7 @@ lpp_referenceTimeUnc_fmt(gchar *s, guint32 v) { double referenceTimeUnc = 0.5*(pow(1.14, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", referenceTimeUnc, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", referenceTimeUnc, v); } static const value_string lpp_kp_vals[] = { @@ -3465,7 +3465,7 @@ lpp_fractionalSecondsFromFrameStructureStart_fmt(gchar *s, guint32 v) { float frac = ((float)v)/4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", frac, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", frac, v); } static void @@ -3473,7 +3473,7 @@ lpp_frameDrift_fmt(gchar *s, guint32 v) { double drift = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", drift, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", drift, (gint32)v); } static const value_string lpp_dataID_vals[] = { @@ -3488,7 +3488,7 @@ lpp_alpha0_fmt(gchar *s, guint32 v) { double alpha = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", alpha, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", alpha, (gint32)v); } static void @@ -3496,7 +3496,7 @@ lpp_alpha1_fmt(gchar *s, guint32 v) { double alpha = (double)((gint32)v)*pow(2, -27); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); } static void @@ -3504,7 +3504,7 @@ lpp_alpha2_3_fmt(gchar *s, guint32 v) { double alpha = (double)((gint32)v)*pow(2, -24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", alpha, (gint32)v); } static void @@ -3512,7 +3512,7 @@ lpp_beta0_fmt(gchar *s, guint32 v) { double beta = (double)((gint32)v)*pow(2, 11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", beta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", beta, (gint32)v); } static void @@ -3520,7 +3520,7 @@ lpp_beta1_fmt(gchar *s, guint32 v) { double beta = (double)((gint32)v)*pow(2, 14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); } static void @@ -3528,7 +3528,7 @@ lpp_beta2_3_fmt(gchar *s, guint32 v) { double beta = (double)((gint32)v)*pow(2, 16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/semi-circle (%d)", beta, (gint32)v); } static void @@ -3536,7 +3536,7 @@ lpp_ai0_fmt(gchar *s, guint32 v) { double ai = (double)v*pow(2, -2); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gsfu (%u)", ai, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gsfu (%u)", ai, v); } static void @@ -3544,7 +3544,7 @@ lpp_ai1_fmt(gchar *s, guint32 v) { double ai = (double)v*pow(2, -8); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree (%u)", ai, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree (%u)", ai, v); } static void @@ -3552,13 +3552,13 @@ lpp_ai2_fmt(gchar *s, guint32 v) { double ai = (double)v*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree2 (%u)", ai, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gsfu/degree2 (%u)", ai, v); } static void lpp_teop_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -3566,7 +3566,7 @@ lpp_pmX_Y_fmt(gchar *s, guint32 v) { double pm = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds (%d)", pm, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds (%d)", pm, (gint32)v); } static void @@ -3574,7 +3574,7 @@ lpp_pmX_Ydot_fmt(gchar *s, guint32 v) { double pmDot = (double)((gint32)v)*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds/day (%d)", pmDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g arc-seconds/day (%d)", pmDot, (gint32)v); } static void @@ -3582,7 +3582,7 @@ lpp_deltaUT1_fmt(gchar *s, guint32 v) { double deltaUT1 = (double)((gint32)v)*pow(2, -24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", deltaUT1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", deltaUT1, (gint32)v); } static void @@ -3590,19 +3590,19 @@ lpp_deltaUT1dot_fmt(gchar *s, guint32 v) { double deltaUT1dot = (double)((gint32)v)*pow(2, -25); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/day (%d)", deltaUT1dot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/day (%d)", deltaUT1dot, (gint32)v); } static void -lpp_1_1000m_64_fmt(gchar *s, guint64 v) +lpp_1_1000m_64_fmt(gchar *s, uint64_t v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%" G_GINT64_MODIFIER "d)", (double)v/1000, (gint64)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%"PRId64")", (double)v/1000, (int64_t)v); } static void lpp_1_1000m_32_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (double)v/1000, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (double)v/1000, (gint32)v); } static const value_string lpp_clockSteeringIndicator_vals[] = { @@ -3643,13 +3643,13 @@ static void lpp_aux_master_delta_fmt(gchar *s, guint32 v) { double delta = (double)((gint32)v)*25*pow(10, -6); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", delta, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", delta, (gint32)v); } static void lpp_gnss_TimeModelRefTime_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*16, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*16, v); } static void @@ -3657,7 +3657,7 @@ lpp_tA0_fmt(gchar *s, guint32 v) { double tA0 = (double)((gint32)v)*pow(2, -35); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tA0, (gint32)v); } static void @@ -3665,7 +3665,7 @@ lpp_tA1_fmt(gchar *s, guint32 v) { double tA1 = (double)((gint32)v)*pow(2, -51); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", tA1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", tA1, (gint32)v); } static void @@ -3673,7 +3673,7 @@ lpp_tA2_fmt(gchar *s, guint32 v) { double tA2 = (double)((gint32)v)*pow(2, -68); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", tA2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", tA2, (gint32)v); } static const value_string lpp_gnss_TO_ID_vals[] = { @@ -3709,7 +3709,7 @@ lpp_pseudoRangeCor_fmt(gchar *s, guint32 v) { double pseudoRangeCor = ((double)(gint32)v)*0.32; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", pseudoRangeCor, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", pseudoRangeCor, (gint32)v); } static void @@ -3717,7 +3717,7 @@ lpp_rangeRateCor_fmt(gchar *s, guint32 v) { double rangeRateCor = ((double)(gint32)v)*0.032; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", rangeRateCor, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", rangeRateCor, (gint32)v); } static const value_string lpp_udreGrowthRate_vals[] = { @@ -3754,7 +3754,7 @@ static const value_string lpp_signal_health_status_vals[] = { static void lpp_stanClockToc_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", 60*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", 60*v, v); } static void @@ -3762,7 +3762,7 @@ lpp_stanClockAF2_fmt(gchar *s, guint32 v) { double stanClockAF2 = (double)((gint32)v)*pow(2, -59); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", stanClockAF2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", stanClockAF2, (gint32)v); } static void @@ -3770,7 +3770,7 @@ lpp_stanClockAF1_fmt(gchar *s, guint32 v) { double stanClockAF1 = (double)((gint32)v)*pow(2, -46); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", stanClockAF1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", stanClockAF1, (gint32)v); } static void @@ -3778,7 +3778,7 @@ lpp_stanClockAF0_fmt(gchar *s, guint32 v) { double stanClockAF0 = (double)((gint32)v)*pow(2, -34); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockAF0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockAF0, (gint32)v); } static void @@ -3786,24 +3786,24 @@ lpp_stanClockTgd_fmt(gchar *s, guint32 v) { double stanClockTgd = (double)((gint32)v)*pow(2, -32); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockTgd, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", stanClockTgd, (gint32)v); } static void lpp_sisa_fmt(gchar *s, guint32 v) { if (v < 50) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", v, v); } else if (v < 75) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 50+((v-50)*2), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 50+((v-50)*2), v); } else if (v < 100) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 100+((v-75)*4), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 100+((v-75)*4), v); } else if (v < 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 200+((v-100)*16), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ucm (%u)", 200+((v-100)*16), v); } else if (v < 255) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "No Accuracy Prediction Available (255)"); + snprintf(s, ITEM_LABEL_LENGTH, "No Accuracy Prediction Available (255)"); } } @@ -3816,7 +3816,7 @@ static const value_string lpp_stanModelID_vals[] = { static void lpp_navToc_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -3824,7 +3824,7 @@ lpp_navaf2_fmt(gchar *s, guint32 v) { double navaf2 = (double)((gint32)v)*pow(2, -55); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", navaf2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", navaf2, (gint32)v); } static void @@ -3832,7 +3832,7 @@ lpp_navaf1_fmt(gchar *s, guint32 v) { double navaf1 = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf1, (gint32)v); } static void @@ -3840,13 +3840,13 @@ lpp_navaf0_navTgd_fmt(gchar *s, guint32 v) { double navaf0_navTgd = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf0_navTgd, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navaf0_navTgd, (gint32)v); } static void lpp_cnavToc_cnavTop_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 300*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 300*v, v); } static void @@ -3854,7 +3854,7 @@ lpp_cnavAf2_fmt(gchar *s, guint32 v) { double cnavAf2 = (double)((gint32)v)*pow(2, -60); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", cnavAf2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", cnavAf2, (gint32)v); } static void @@ -3862,7 +3862,7 @@ lpp_cnavAf1_fmt(gchar *s, guint32 v) { double cnavAf1 = (double)((gint32)v)*pow(2, -48); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", cnavAf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", cnavAf1, (gint32)v); } static void @@ -3870,7 +3870,7 @@ lpp_cnavX_fmt(gchar *s, guint32 v) { double cnavX = (double)((gint32)v)*pow(2, -35); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", cnavX, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", cnavX, (gint32)v); } static void @@ -3878,7 +3878,7 @@ lpp_gloTau_gloDeltaTau_fmt(gchar *s, guint32 v) { double gloTau_gloDeltaTau = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloTau_gloDeltaTau, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloTau_gloDeltaTau, (gint32)v); } static void @@ -3886,13 +3886,13 @@ lpp_gloGamma_fmt(gchar *s, guint32 v) { double gloGamma = (double)((gint32)v)*pow(2, -40); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%d)", gloGamma, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%d)", gloGamma, (gint32)v); } static void lpp_sbasTo_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -3900,7 +3900,7 @@ lpp_sbasAgfo_fmt(gchar *s, guint32 v) { double sbasAgfo = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", sbasAgfo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", sbasAgfo, (gint32)v); } static void @@ -3908,18 +3908,18 @@ lpp_sbasAgf1_fmt(gchar *s, guint32 v) { double sbasAgf1 = (double)((gint32)v)*pow(2, -40); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", sbasAgf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", sbasAgf1, (gint32)v); } static void lpp_bdsAODC_AODE_r12_fmt(gchar *s, guint32 v) { if (v < 25) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u hours (%u)", v, v); + snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u hours (%u)", v, v); } else if (v < 31) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u days (%u)", v-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is %u days (%u)", v-23, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is over 7 days (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Age of the satellite clock correction parameters is over 7 days (%u)", v); } } @@ -3929,7 +3929,7 @@ lpp_bdsToc_Toe_r12_fmt(gchar *s, guint32 v) { double bdsToc = (double)((gint32)v)*pow(2, 3); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsToc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsToc, (gint32)v); } static void @@ -3937,7 +3937,7 @@ lpp_bdsA0_r12_fmt(gchar *s, guint32 v) { double bdsA0 = (double)((gint32)v)*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsA0, (gint32)v); } static void @@ -3945,7 +3945,7 @@ lpp_bdsA1_r12_fmt(gchar *s, guint32 v) { double bdsA1 = (double)((gint32)v)*pow(2, -50); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsA1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsA1, (gint32)v); } static void @@ -3953,19 +3953,19 @@ lpp_bdsA2_r12_fmt(gchar *s, guint32 v) { double bdsA2 = (double)((gint32)v)*pow(2, -66); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", bdsA2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s2 (%d)", bdsA2, (gint32)v); } static void lpp_bdsTgd1_r12_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gns (%d)", (float)((gint32)v)*0.1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gns (%d)", (float)((gint32)v)*0.1, (gint32)v); } static void lpp_keplerToe_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 60*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 60*v, v); } static void @@ -3973,7 +3973,7 @@ lpp_keplerW_M0_I0_Omega0_fmt(gchar *s, guint32 v) { double keplerW_M0_I0_Omega0 = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", keplerW_M0_I0_Omega0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", keplerW_M0_I0_Omega0, (gint32)v); } static void @@ -3981,7 +3981,7 @@ lpp_keplerDeltaN_OmegaDot_IDot_fmt(gchar *s, guint32 v) { double keplerDeltaN_OmegaDot_IDot = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", keplerDeltaN_OmegaDot_IDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", keplerDeltaN_OmegaDot_IDot, (gint32)v); } static void @@ -3989,7 +3989,7 @@ lpp_keplerE_fmt(gchar *s, guint32 v) { double keplerE = (double)v*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", keplerE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", keplerE, v); } static void @@ -3997,7 +3997,7 @@ lpp_keplerAPowerHalf_fmt(gchar *s, guint32 v) { double keplerAPowerHalf = (double)v*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", keplerAPowerHalf, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", keplerAPowerHalf, v); } static void @@ -4005,7 +4005,7 @@ lpp_keplerCrs_Crc_fmt(gchar *s, guint32 v) { double keplerCrs_Crc = (double)((gint32)v)*pow(2, -5); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", keplerCrs_Crc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", keplerCrs_Crc, (gint32)v); } static void @@ -4013,13 +4013,13 @@ lpp_keplerCx_fmt(gchar *s, guint32 v) { double keplerCx = (double)((gint32)v)*pow(2, -29); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", keplerCx, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", keplerCx, (gint32)v); } static void lpp_navToe_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", 16*v, v); } static void @@ -4027,7 +4027,7 @@ lpp_navOmega_M0_I0_OmegaA0_fmt(gchar *s, guint32 v) { double navOmega_M0_I0_OmegaA0 = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navOmega_M0_I0_OmegaA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navOmega_M0_I0_OmegaA0, (gint32)v); } static void @@ -4035,7 +4035,7 @@ lpp_navDeltaN_OmegaADot_IDot_fmt(gchar *s, guint32 v) { double navDeltaN_OmegaADot_IDot = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navDeltaN_OmegaADot_IDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navDeltaN_OmegaADot_IDot, (gint32)v); } static void @@ -4043,7 +4043,7 @@ lpp_navE_fmt(gchar *s, guint32 v) { double navE = (double)v*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navE, v); } static void @@ -4051,7 +4051,7 @@ lpp_navAPowerHalf_fmt(gchar *s, guint32 v) { double navAPowerHalf = (double)v*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAPowerHalf, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAPowerHalf, v); } static void @@ -4059,7 +4059,7 @@ lpp_navCrs_Crc_fmt(gchar *s, guint32 v) { double navCrs_Crc = (double)((gint32)v)*pow(2, -5); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", navCrs_Crc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", navCrs_Crc, (gint32)v); } static void @@ -4067,7 +4067,7 @@ lpp_navCx_fmt(gchar *s, guint32 v) { double navCx = (double)((gint32)v)*pow(2, -29); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", navCx, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", navCx, (gint32)v); } static void @@ -4075,7 +4075,7 @@ lpp_cnavDeltaA_fmt(gchar *s, guint32 v) { double cnavDeltaA = (double)((gint32)v)*pow(2, -9); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavDeltaA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavDeltaA, (gint32)v); } static void @@ -4083,7 +4083,7 @@ lpp_cnavAdot_fmt(gchar *s, guint32 v) { double cnavAdot = (double)((gint32)v)*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", cnavAdot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", cnavAdot, (gint32)v); } static void @@ -4091,7 +4091,7 @@ lpp_cnavDeltaNo_fmt(gchar *s, guint32 v) { double cnavDeltaNo = (double)((gint32)v)*pow(2, -44); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaNo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaNo, (gint32)v); } static void @@ -4099,7 +4099,7 @@ lpp_cnavDeltaNoDot_fmt(gchar *s, guint32 v) { double cnavDeltaNoDot = (double)((gint32)v)*pow(2, -57); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s2 (%d)", cnavDeltaNoDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s2 (%d)", cnavDeltaNoDot, (gint32)v); } static void @@ -4107,7 +4107,7 @@ lpp_cnavDeltaOmegaDot_IoDot_fmt(gchar *s, guint32 v) { double cnavDeltaOmegaDot_IoDot = (double)((gint32)v)*pow(2, -44); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaOmegaDot_IoDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", cnavDeltaOmegaDot_IoDot, (gint32)v); } static void @@ -4115,7 +4115,7 @@ lpp_cnavCx_fmt(gchar *s, guint32 v) { double cnavCx = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", cnavCx, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", cnavCx, (gint32)v); } static void @@ -4123,7 +4123,7 @@ lpp_cnavCrs_Crc_fmt(gchar *s, guint32 v) { double cnavCrs_Crc = (double)((gint32)v)*pow(2, -8); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavCrs_Crc, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", cnavCrs_Crc, (gint32)v); } static void @@ -4131,7 +4131,7 @@ lpp_gloX_Y_Z_fmt(gchar *s, guint32 v) { double gloX_Y_Z = (double)((gint32)v)*pow(2, -11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gkm (%d)", gloX_Y_Z, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gkm (%d)", gloX_Y_Z, (gint32)v); } static void @@ -4139,7 +4139,7 @@ lpp_gloXdot_Ydot_Zdot_fmt(gchar *s, guint32 v) { double gloXdot_Ydot_Zdot = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s (%d)", gloXdot_Ydot_Zdot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s (%d)", gloXdot_Ydot_Zdot, (gint32)v); } static void @@ -4147,7 +4147,7 @@ lpp_gloXdotdot_Ydotdot_Zdotdot_fmt(gchar *s, guint32 v) { double gloXdotdot_Ydotdot_Zdotdot = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s2 (%d)", gloXdotdot_Ydotdot_Zdotdot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gkm/s2 (%d)", gloXdotdot_Ydotdot_Zdotdot, (gint32)v); } static void @@ -4155,7 +4155,7 @@ lpp_sbasXg_Yg_fmt(gchar *s, guint32 v) { double sbasXg_Yg = (double)((gint32)v)*0.08; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasXg_Yg, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasXg_Yg, (gint32)v); } static void @@ -4163,7 +4163,7 @@ lpp_sbasZg_fmt(gchar *s, guint32 v) { double sbasZg = (double)((gint32)v)*0.4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasZg, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%d)", sbasZg, (gint32)v); } static void @@ -4171,7 +4171,7 @@ lpp_sbasXgDot_YgDot_fmt(gchar *s, guint32 v) { double sbasXgDot_YgDot = (double)((gint32)v)*0.000625; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasXgDot_YgDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasXgDot_YgDot, (gint32)v); } static void @@ -4179,7 +4179,7 @@ lpp_sbasZgDot_fmt(gchar *s, guint32 v) { double sbasZgDot = (double)((gint32)v)*0.004; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasZgDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", sbasZgDot, (gint32)v); } static void @@ -4187,7 +4187,7 @@ lpp_sbasXgDotDot_YgDotDot_fmt(gchar *s, guint32 v) { double sbasXgDotDot_YgDotDot = (double)((gint32)v)*0.0000125; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasXgDotDot_YgDotDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasXgDotDot_YgDotDot, (gint32)v); } static void @@ -4195,7 +4195,7 @@ lpp_sbasZgDotDot_fmt(gchar *s, guint32 v) { double sbasZgDotDot = (double)((gint32)v)*0.0000625; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasZgDotDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", sbasZgDotDot, (gint32)v); } static void @@ -4203,7 +4203,7 @@ lpp_bdsAPowerHalf_r12_fmt(gchar *s, guint32 v) { double bdsAPowerHalf = (double)v*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAPowerHalf, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAPowerHalf, v); } static void @@ -4211,7 +4211,7 @@ lpp_bdsE_r12_fmt(gchar *s, guint32 v) { double bdsE = (double)v*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", bdsE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", bdsE, v); } static void @@ -4219,7 +4219,7 @@ lpp_bdsW_M0_Omega0_I0_r12_fmt(gchar *s, guint32 v) { double bdsW_M0_Omega0_I0 = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsW_M0_Omega0_I0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsW_M0_Omega0_I0, (gint32)v); } static void @@ -4227,7 +4227,7 @@ lpp_bdsDeltaN_OmegaDot_IDot_r12_fmt(gchar *s, guint32 v) { double bdsDeltaN_OmegaDot_IDot = (double)((gint32)v)*pow(2, -43); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsDeltaN_OmegaDot_IDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsDeltaN_OmegaDot_IDot, (gint32)v); } static void @@ -4235,7 +4235,7 @@ lpp_bdsCuc_Cus_Cic_Cis_r12_fmt(gchar *s, guint32 v) { double bdsCuc_Cus_Cic_Cis = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCuc_Cus_Cic_Cis, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCuc_Cus_Cic_Cis, (gint32)v); } static void @@ -4243,7 +4243,7 @@ lpp_bdsCrc_Crs_r12_fmt(gchar *s, guint32 v) { double bdsCrc_Crs = (double)((gint32)v)*pow(2, -6); - g_snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCrc_Crs, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%grad (%d)", bdsCrc_Crs, (gint32)v); } static void @@ -4251,7 +4251,7 @@ lpp_doppler0_fmt(gchar *s, guint32 v) { double doppler0 = (double)((gint32)v)*0.5; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", doppler0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", doppler0, (gint32)v); } static void @@ -4259,7 +4259,7 @@ lpp_doppler1_fmt(gchar *s, guint32 v) { double doppler1 = (double)((gint32)(v-42))/210; - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s2 (%u)", doppler1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s2 (%u)", doppler1, v); } static const value_string lpp_dopplerUncertainty_vals[] = { @@ -4276,7 +4276,7 @@ lpp_codePhase_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -10); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } static const value_string lpp_codePhaseSearchWindow_vals[] = { @@ -4319,7 +4319,7 @@ static value_string_ext lpp_codePhaseSearchWindow_vals_ext = VALUE_STRING_EXT_IN static void lpp_azimuth_elevation_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", (float)v*0.703125, v); + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", (float)v*0.703125, v); } static void @@ -4327,7 +4327,7 @@ lpp_kepAlmanacE_fmt(gchar *s, guint32 v) { double kepAlmanacE = (double)v*pow(2, -16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", kepAlmanacE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", kepAlmanacE, v); } static void @@ -4335,7 +4335,7 @@ lpp_kepAlmanacDeltaI_fmt(gchar *s, guint32 v) { double kepAlmanacDeltaI = (double)((gint32)v)*pow(2, -14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacDeltaI, (gint32)v); } static void @@ -4343,7 +4343,7 @@ lpp_kepAlmanacOmegaDot_fmt(gchar *s, guint32 v) { double kepAlmanacOmegaDot = (double)((gint32)v)*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", kepAlmanacOmegaDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", kepAlmanacOmegaDot, (gint32)v); } static void @@ -4351,7 +4351,7 @@ lpp_kepAlmanacAPowerHalf_fmt(gchar *s, guint32 v) { double kepAlmanacAPowerHalf = (double)((gint32)v)*pow(2, -9); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%d)", kepAlmanacAPowerHalf, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%d)", kepAlmanacAPowerHalf, (gint32)v); } static void @@ -4359,7 +4359,7 @@ lpp_kepAlmanacOmega0_W_M0_fmt(gchar *s, guint32 v) { double kepAlmanacOmega0_W_M0 = (double)((gint32)v)*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacOmega0_W_M0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", kepAlmanacOmega0_W_M0, (gint32)v); } static void @@ -4367,7 +4367,7 @@ lpp_kepAlmanacAF0_fmt(gchar *s, guint32 v) { double kepAlmanacAF0 = (double)((gint32)v)*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", kepAlmanacAF0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", kepAlmanacAF0, (gint32)v); } static void @@ -4375,7 +4375,7 @@ lpp_kepAlmanacAF1_fmt(gchar *s, guint32 v) { double kepAlmanacAF1 = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", kepAlmanacAF1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", kepAlmanacAF1, (gint32)v); } static void @@ -4383,7 +4383,7 @@ lpp_navAlmE_fmt(gchar *s, guint32 v) { double navAlmE = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navAlmE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", navAlmE, v); } static void @@ -4391,7 +4391,7 @@ lpp_navAlmDeltaI_fmt(gchar *s, guint32 v) { double navAlmDeltaI = (double)((gint32)v)*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmDeltaI, (gint32)v); } static void @@ -4399,7 +4399,7 @@ lpp_navAlmOMEGADOT_fmt(gchar *s, guint32 v) { double navAlmOMEGADOT = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navAlmOMEGADOT, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", navAlmOMEGADOT, (gint32)v); } static void @@ -4407,7 +4407,7 @@ lpp_navAlmSqrtA_fmt(gchar *s, guint32 v) { double navAlmSqrtA = (double)v*pow(2, -11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAlmSqrtA, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", navAlmSqrtA, v); } static void @@ -4415,7 +4415,7 @@ lpp_navAlmOMEGAo_Omega_Mo_fmt(gchar *s, guint32 v) { double navAlmOMEGAo_Omega_Mo = (double)((gint32)v)*pow(2, -23); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmOMEGAo_Omega_Mo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", navAlmOMEGAo_Omega_Mo, (gint32)v); } static void @@ -4423,7 +4423,7 @@ lpp_navAlmaf0_fmt(gchar *s, guint32 v) { double navAlmaf0 = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", navAlmaf0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", navAlmaf0, (gint32)v); } static void @@ -4431,13 +4431,13 @@ lpp_navAlmaf1_fmt(gchar *s, guint32 v) { double navAlmaf1 = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navAlmaf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", navAlmaf1, (gint32)v); } static void lpp_redAlmDeltaA_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%dm (%d)", 512*(gint)v, (gint)v); + snprintf(s, ITEM_LABEL_LENGTH, "%dm (%d)", 512*(gint)v, (gint)v); } static void @@ -4445,7 +4445,7 @@ lpp_redAlmOmega0_Phi0_fmt(gchar *s, guint32 v) { double redAlmOmega0_Phi0 = (double)((gint32)v)*pow(2, -6); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", redAlmOmega0_Phi0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", redAlmOmega0_Phi0, (gint32)v); } static void @@ -4453,7 +4453,7 @@ lpp_midiAlmE_fmt(gchar *s, guint32 v) { double midiAlmE = (double)v*pow(2, -16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", midiAlmE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", midiAlmE, v); } static void @@ -4461,7 +4461,7 @@ lpp_midiAlmDeltaI_fmt(gchar *s, guint32 v) { double midiAlmDeltaI = (double)((gint32)v)*pow(2, -14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmDeltaI, (gint32)v); } static void @@ -4469,13 +4469,13 @@ lpp_midiAlmOmegaDot_fmt(gchar *s, guint32 v) { double midiAlmOmegaDot = (double)((gint32)v)*pow(2, -33); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", midiAlmOmegaDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", midiAlmOmegaDot, (gint32)v); } static void lpp_midiAlmSqrtA_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm1/2 (%u)", (float)v*0.0625, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm1/2 (%u)", (float)v*0.0625, v); } static void @@ -4483,7 +4483,7 @@ lpp_midiAlmOmega0_Omega_Mo_fmt(gchar *s, guint32 v) { double midiAlmOmega0_Omega_Mo = (double)((gint32)v)*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmOmega0_Omega_Mo, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", midiAlmOmega0_Omega_Mo, (gint32)v); } static void @@ -4491,7 +4491,7 @@ lpp_midiAlmaf0_fmt(gchar *s, guint32 v) { double midiAlmaf0 = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", midiAlmaf0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", midiAlmaf0, (gint32)v); } static void @@ -4499,7 +4499,7 @@ lpp_midiAlmaf1_fmt(gchar *s, guint32 v) { double midiAlmaf1 = (double)((gint32)v)*pow(2, -37); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", midiAlmaf1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", midiAlmaf1, (gint32)v); } static void @@ -4507,13 +4507,13 @@ lpp_gloAlmLambdaA_DeltaIa_fmt(gchar *s, guint32 v) { double gloAlmLambdaA_DeltaIa = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmLambdaA_DeltaIa, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmLambdaA_DeltaIa, (gint32)v); } static void lpp_gloAlmtlambdaA_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fs (%u)", (float)v*0.03125, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fs (%u)", (float)v*0.03125, v); } static void @@ -4521,7 +4521,7 @@ lpp_gloAlmDeltaTA_fmt(gchar *s, guint32 v) { double gloAlmDeltaTA = (double)((gint32)v)*pow(2, -9); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTA, (gint32)v); } static void @@ -4529,7 +4529,7 @@ lpp_gloAlmDeltaTdotA_fmt(gchar *s, guint32 v) { double gloAlmDeltaTdotA = (double)((gint32)v)*pow(2, -14); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTdotA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/orbit period (%d)", gloAlmDeltaTdotA, (gint32)v); } static void @@ -4537,7 +4537,7 @@ lpp_gloAlmEpsilonA_fmt(gchar *s, guint32 v) { double gloAlmEpsilonA = (double)v*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", gloAlmEpsilonA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", gloAlmEpsilonA, (gint32)v); } static void @@ -4545,7 +4545,7 @@ lpp_gloAlmOmegaA_fmt(gchar *s, guint32 v) { double gloAlmOmegaA = (double)((gint32)v)*pow(2, -15); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmOmegaA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", gloAlmOmegaA, (gint32)v); } static void @@ -4553,43 +4553,43 @@ lpp_gloAlmTauA_fmt(gchar *s, guint32 v) { double gloAlmTauA = (double)((gint32)v)*pow(2, -18); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloAlmTauA, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gloAlmTauA, (gint32)v); } static void lpp_sbasAlmXg_Yg_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%d)", (gint32)v*2.6, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%d)", (gint32)v*2.6, (gint32)v); } static void lpp_sbasAlmZg_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%dkm (%d)", (gint32)v*26, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%dkm (%d)", (gint32)v*26, (gint32)v); } static void lpp_sbasAlmXgdot_YgDot_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%dm/s (%d)", (gint32)v*10, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%dm/s (%d)", (gint32)v*10, (gint32)v); } static void lpp_sbasAlmZgDot_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", (gint32)v*40.96, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm/s (%d)", (gint32)v*40.96, (gint32)v); } static void lpp_sbasAlmTo_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", v*64, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um/s (%u)", v*64, v); } static void lpp_bdsAlmToa_r12_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); } static void @@ -4597,7 +4597,7 @@ lpp_bdsAlmSqrtA_r12_fmt(gchar *s, guint32 v) { double bdsAlmSqrtA = (double)v*pow(2, -11); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmSqrtA, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmSqrtA, v); } static void @@ -4605,7 +4605,7 @@ lpp_bdsAlmE_r12_fmt(gchar *s, guint32 v) { double bdsAlmE = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmE, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm1/2 (%u)", bdsAlmE, v); } static void @@ -4613,7 +4613,7 @@ lpp_bdsAlmW_M0_Omega0_r12_fmt(gchar *s, guint32 v) { double bdsAlmW_M0_Omega0 = (double)((gint32)v)*pow(2, -23); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmW_M0_Omega0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmW_M0_Omega0, (gint32)v); } static void @@ -4621,7 +4621,7 @@ lpp_bdsAlmOmegaDot_r12_fmt(gchar *s, guint32 v) { double bdsAlmOmegaDot = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsAlmOmegaDot, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles/s (%d)", bdsAlmOmegaDot, (gint32)v); } static void @@ -4629,7 +4629,7 @@ lpp_bdsAlmDeltaI_r12_fmt(gchar *s, guint32 v) { double bdsAlmDeltaI = (double)((gint32)v)*pow(2, -19); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmDeltaI, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%g semi-circles (%d)", bdsAlmDeltaI, (gint32)v); } static void @@ -4637,7 +4637,7 @@ lpp_bdsAlmA0_r12_fmt(gchar *s, guint32 v) { double bdsAlmA0 = (double)((gint32)v)*pow(2, -20); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsAlmA0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", bdsAlmA0, (gint32)v); } static void @@ -4645,7 +4645,7 @@ lpp_bdsAlmA1_r12_fmt(gchar *s, guint32 v) { double bdsAlmA1 = (double)((gint32)v)*pow(2, -38); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsAlmA1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", bdsAlmA1, (gint32)v); } static const true_false_string lpp_bdsSvHealth_r12_b1i_b2i_value = { @@ -4663,7 +4663,7 @@ lpp_gnss_Utc_A1_fmt(gchar *s, guint32 v) { double gnss_Utc_A1 = (double)((gint32)v)*pow(2, -50); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", gnss_Utc_A1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/s (%d)", gnss_Utc_A1, (gint32)v); } static void @@ -4671,13 +4671,13 @@ lpp_gnss_Utc_A0_fmt(gchar *s, guint32 v) { double gnss_Utc_A0 = (double)((gint32)v)*pow(2, -30); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gnss_Utc_A0, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", gnss_Utc_A0, (gint32)v); } static void lpp_gnss_Utc_Tot_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); + snprintf(s, ITEM_LABEL_LENGTH, "%us (%u)", v*4096, v); } static const value_string lpp_bds_UDREI_vals[] = { @@ -4726,16 +4726,16 @@ static void lpp_bds_ECC_DeltaT_r12_fmt(gchar *s, guint32 v) { if ((gint32)v == -4096) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Not available (%d)", (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "Not available (%d)", (gint32)v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.1, (gint32)v); } } static void lpp_bds_GridIonElement_dt_r12_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.125, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", (float)((gint32)v)*0.125, (gint32)v); } static const value_string lpp_bds_givei_vals[] = { @@ -4764,7 +4764,7 @@ lpp_fine_PseudoRange_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)*pow(2, -29); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); } static void @@ -4772,7 +4772,7 @@ lpp_fine_PhaseRange_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); } static void @@ -4780,7 +4780,7 @@ lpp_carrier_to_noise_ratio_r15_fmt(gchar *s, guint32 v) { double val = (double)v*pow(2, -4); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gdB-Hz (%d)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gdB-Hz (%d)", val, v); } static void @@ -4788,7 +4788,7 @@ lpp_fine_PhaseRangeRate_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/1000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%d)", val, (gint32)v); } static void @@ -4796,7 +4796,7 @@ lpp_cpBias_r15_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/50; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static const value_string lpp_ambiguityStatusFlag_r15_vals[] = { @@ -4812,7 +4812,7 @@ lpp_1_2000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/2000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -4820,7 +4820,7 @@ lpp_1_100ppm_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/100; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); } static void @@ -4828,7 +4828,7 @@ lpp_1_10ppm_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/10; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gppm (%d)", val, (gint32)v); } static const value_string lpp_ssrUpdateInterval_r15_vals[] = { @@ -4856,7 +4856,7 @@ lpp_1_10000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/10000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -4864,7 +4864,7 @@ lpp_4_10000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/10000*4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -4872,7 +4872,7 @@ lpp_1_1000000m_s_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/1000000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); } static void @@ -4880,7 +4880,7 @@ lpp_4_1000000m_s_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/1000000*4; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", val, (gint32)v); } static void @@ -4888,7 +4888,7 @@ lpp_2_100000000m_s2_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/100000000*2; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s2 (%d)", val, (gint32)v); } static void @@ -4896,7 +4896,7 @@ lpp_1_100000m_fmt(gchar *s, guint32 v) { double val = (double)((gint32)v)/100000; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%d)", val, (gint32)v); } static void @@ -4904,7 +4904,7 @@ lpp_tauC_fmt(gchar *s, guint32 v) { double tauC = (double)((gint32)v)*pow(2, -31); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tauC, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", tauC, (gint32)v); } static void @@ -4912,7 +4912,7 @@ lpp_b1_fmt(gchar *s, guint32 v) { double b1 = (double)((gint32)v)*pow(2, -10); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", b1, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%d)", b1, (gint32)v); } static void @@ -4920,7 +4920,7 @@ lpp_b2_fmt(gchar *s, guint32 v) { double b2 = (double)((gint32)v)*pow(2, -16); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs/msd (%d)", b2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs/msd (%d)", b2, (gint32)v); } static const value_string lpp_utcStandardID_vals[] = { @@ -4965,7 +4965,7 @@ lpp_GNSS_SatMeas_codePhase_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } static void @@ -4977,12 +4977,12 @@ lpp_codePhaseRMSError_fmt(gchar *s, guint32 v) guint8 exponent_1 = ((v - 1) & 0x38) >> 3; if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "P < 0.5 (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "P < 0.5 (0)"); } else if (v < 63) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f <= P < %f (%u)", 0.5*(1+mantissa_1/8)*pow(2, exponent_1), + snprintf(s, ITEM_LABEL_LENGTH, "%f <= P < %f (%u)", 0.5*(1+mantissa_1/8)*pow(2, exponent_1), 0.5*(1+mantissa/8)*pow(2, exponent), v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "112 <= P (63)"); + snprintf(s, ITEM_LABEL_LENGTH, "112 <= P (63)"); } } @@ -4991,7 +4991,7 @@ lpp_transmitterLatitude_fmt(gchar *s, guint32 v) { double lat = ((double)v*4.0/pow(2, 20))-90.0; - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", lat, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", lat, v); } static void @@ -4999,7 +4999,7 @@ lpp_transmitterLongitude_fmt(gchar *s, guint32 v) { double longitude = ((double)v*4.0/pow(2, 20))-180.0; - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); } static void @@ -5007,7 +5007,7 @@ lpp_transmitterAltitude_fmt(gchar *s, guint32 v) { double alt = ((double)v*0.29)-500.0; - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", alt, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", alt, v); } static void @@ -5015,7 +5015,7 @@ lpp_refPressure_fmt(gchar *s, guint32 v) { gint32 pressure = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%dPa (%d)", 101325+pressure, pressure); + snprintf(s, ITEM_LABEL_LENGTH, "%dPa (%d)", 101325+pressure, pressure); } static void @@ -5023,7 +5023,7 @@ lpp_refTemperature_fmt(gchar *s, guint32 v) { gint32 temp = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%dK (%d)", 273+temp, temp); + snprintf(s, ITEM_LABEL_LENGTH, "%dK (%d)", 273+temp, temp); } static void @@ -5031,19 +5031,19 @@ lpp_referencePressureRate_v1520_fmt(gchar *s, guint32 v) { gint32 rate = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%dPa/hour (%d)", 10*rate, rate); + snprintf(s, ITEM_LABEL_LENGTH, "%dPa/hour (%d)", 10*rate, rate); } static void lpp_PressureValidityPeriod_v1520_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%umin (%u)", 15*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%umin (%u)", 15*v, v); } static void lpp_doppler_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", (gint32)v*0.04, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm/s (%d)", (gint32)v*0.04, (gint32)v); } static void @@ -5051,13 +5051,13 @@ lpp_adr_fmt(gchar *s, guint32 v) { double adr = (double)v*pow(2, -10); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", adr, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gm (%u)", adr, v); } static void lpp_adrMSB_r15_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", v*32768, v); + snprintf(s, ITEM_LABEL_LENGTH, "%um (%u)", v*32768, v); } static void @@ -5065,24 +5065,24 @@ lpp_GNSS_SatMeas_delta_codePhase_r15_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } static void lpp_deliveryAmount_r15_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", pow(2, v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%g (%u)", pow(2, v), v); } static void lpp_rsrp_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); } else if (v < 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); } } @@ -5090,11 +5090,11 @@ static void lpp_rsrq_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (v < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); } } @@ -5102,11 +5102,11 @@ static void lpp_nrsrp_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); } else if (v < 113) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); } } @@ -5114,11 +5114,11 @@ static void lpp_nrsrq_Result_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (0)"); } else if (v < 74) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%u)", (((float)v-1)/2)-34, ((float)v/2)-34, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%u)", (((float)v-1)/2)-34, ((float)v/2)-34, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (%u)", v); } } @@ -5128,9 +5128,9 @@ lpp_rsrp_Result_v1470_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (d == -17) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -157dBm (-17)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -157dBm (-17)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%d)", d-141, d-140, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%d)", d-141, d-140, d); } } @@ -5140,11 +5140,11 @@ lpp_rsrq_Result_v1470_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -34.5dB (-30)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -34.5dB (-30)"); } else if (v < 46) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", ((float)d/2)-20, (((float)d+1)/2)-20, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", ((float)d/2)-20, (((float)d+1)/2)-20, d); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "3dB <= RSRQ (46)"); + snprintf(s, ITEM_LABEL_LENGTH, "3dB <= RSRQ (46)"); } } @@ -5152,13 +5152,13 @@ static void lpp_ue_RxTxTimeDiff_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); } else if (v < 2048) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); } else if (v < 4095) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); + snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); } } @@ -5167,7 +5167,7 @@ lpp_mbs_beaconMeasElt_codePhase_fmt(gchar *s, guint32 v) { double codePhase = (double)v*pow(2, -21); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gms (%u)", codePhase, v); } const unit_name_string units_dbhz = { "dB-Hz", NULL }; @@ -13573,7 +13573,7 @@ dissect_lpp_INTEGER_M65536_65535(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * static int dissect_lpp_T_cnavMo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 838 "./asn1/lpp/lpp.cnf" - gint64 cnavMo; + int64_t cnavMo; int curr_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, G_GINT64_CONSTANT(-4294967296), 4294967295U, &cnavMo, FALSE); @@ -13584,7 +13584,7 @@ dissect_lpp_T_cnavMo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr #line 843 "./asn1/lpp/lpp.cnf" proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavMo, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavMo, "%g semi-circles (%"PRId64")", (double)cnavMo*pow(2, -32), cnavMo); @@ -13596,7 +13596,7 @@ dissect_lpp_T_cnavMo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr static int dissect_lpp_T_cnavE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 849 "./asn1/lpp/lpp.cnf" - guint64 cnavE; + uint64_t cnavE; int curr_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, 0U, G_GUINT64_CONSTANT(8589934591), &cnavE, FALSE); @@ -13607,7 +13607,7 @@ dissect_lpp_T_cnavE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro #line 854 "./asn1/lpp/lpp.cnf" proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_uint64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavE, "%g (%"G_GINT64_MODIFIER"u)", + cnavE, "%g (%"PRIu64")", (double)cnavE*pow(2, -34), cnavE); @@ -13619,7 +13619,7 @@ dissect_lpp_T_cnavE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro static int dissect_lpp_T_cnavOmega(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 860 "./asn1/lpp/lpp.cnf" - gint64 cnavOmega; + int64_t cnavOmega; int curr_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, G_GINT64_CONSTANT(-4294967296), 4294967295U, &cnavOmega, FALSE); @@ -13630,7 +13630,7 @@ dissect_lpp_T_cnavOmega(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, #line 865 "./asn1/lpp/lpp.cnf" proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavOmega, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavOmega, "%g semi-circles (%"PRId64")", (double)cnavOmega*pow(2, -32), cnavOmega); @@ -13642,7 +13642,7 @@ dissect_lpp_T_cnavOmega(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_lpp_T_cnavOMEGA0(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 871 "./asn1/lpp/lpp.cnf" - gint64 cnavOMEGA0; + int64_t cnavOMEGA0; int curr_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, G_GINT64_CONSTANT(-4294967296), 4294967295U, &cnavOMEGA0, FALSE); @@ -13653,7 +13653,7 @@ dissect_lpp_T_cnavOMEGA0(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ #line 876 "./asn1/lpp/lpp.cnf" proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavOMEGA0, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavOMEGA0, "%g semi-circles (%"PRId64")", (double)cnavOMEGA0*pow(2, -32), cnavOMEGA0); @@ -13665,7 +13665,7 @@ dissect_lpp_T_cnavOMEGA0(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ static int dissect_lpp_T_cnavIo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 885 "./asn1/lpp/lpp.cnf" - gint64 cnavIo; + int64_t cnavIo; int curr_offset = offset; offset = dissect_per_constrained_integer_64b(tvb, offset, actx, tree, hf_index, G_GINT64_CONSTANT(-4294967296), 4294967295U, &cnavIo, FALSE); @@ -13676,7 +13676,7 @@ dissect_lpp_T_cnavIo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr #line 890 "./asn1/lpp/lpp.cnf" proto_item_set_hidden(actx->created_item); actx->created_item = proto_tree_add_int64_format_value(tree, hf_index, tvb, curr_offset>>3, (offset+7-curr_offset)>>3, - cnavIo, "%g semi-circles (%"G_GINT64_MODIFIER"d)", + cnavIo, "%g semi-circles (%"PRId64")", (double)cnavIo*pow(2, -32), cnavIo); diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index d9eeb20db5..c25b8667eb 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -13359,7 +13359,7 @@ static value_string_ext lte_rrc_messageSize_r14_vals_ext = VALUE_STRING_EXT_INIT static void lte_rrc_timeConnFailure_r10_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); } static const value_string lte_rrc_n_r12_vals[] = { @@ -13378,9 +13378,9 @@ static void lte_rrc_m_r12_fmt(gchar *s, guint32 v) { if (v == 255) { - g_snprintf(s, ITEM_LABEL_LENGTH, "255 <= f(Nr) (255)"); + snprintf(s, ITEM_LABEL_LENGTH, "255 <= f(Nr) (255)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u <= f(Nr) < %u (%u)", v, v+1, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u <= f(Nr) < %u (%u)", v, v+1, v); } } @@ -14586,13 +14586,13 @@ static void lte_rrc_RSRP_RangeNR_r15_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); + snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Infinity (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "Infinity (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", -157+v, -156+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", -157+v, -156+v, v); } } @@ -14686,11 +14686,11 @@ static void lte_rrc_RSRQ_RangeNR_r15_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "20dB < SS-RSRQ (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "20dB < SS-RSRQ (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); } } @@ -14734,20 +14734,20 @@ static value_string_ext lte_rrc_MBSFN_RSRQ_Range_vals_ext = VALUE_STRING_EXT_INI static void lte_rrc_availableAdmissionCapacityWLAN_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uus/s (%u)", 32*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uus/s (%u)", 32*v, v); } static void lte_rrc_ue_RxTxTimeDiffResult_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "T < 2Ts (0)"); } else if (v < 2048) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", v*2, (v+1)*2, v); } else if (v < 4095) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs <= T < %uTs (%u)", (v*8)-12288, ((v+1)*8)-12288, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); + snprintf(s, ITEM_LABEL_LENGTH, "20472Ts <= T (4095)"); } } @@ -14952,18 +14952,18 @@ static value_string_ext lte_rrc_excessDelay_r13_vals_ext = VALUE_STRING_EXT_INIT static void lte_rrc_averageDelay_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); } static void lte_rrc_subframeBoundaryOffsetResult_r13_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "abs(deltaZ) < 700Ts (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "abs(deltaZ) < 700Ts (0)"); } else if (v == 63) { - g_snprintf(s, ITEM_LABEL_LENGTH, "1320Ts < abs(deltaZ) (63)"); + snprintf(s, ITEM_LABEL_LENGTH, "1320Ts < abs(deltaZ) (63)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs < abs(deltaZ) <= %uTs (%u)", 700+(v-1)*10, 700+v*10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs < abs(deltaZ) <= %uTs (%u)", 700+(v-1)*10, 700+v*10, v); } } @@ -14971,11 +14971,11 @@ static void lte_rrc_RS_SINR_Range_r13_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RS-SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RS-SINR < -23dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB <= RS-SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB <= RS-SINR (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } } @@ -14983,11 +14983,11 @@ static void lte_rrc_RS_SINR_RangeNR_r15_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB < SS-SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB < SS-SINR (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } } @@ -14995,47 +14995,47 @@ static void lte_rrc_RSSI_Range_r13_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); } else if (v == 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); + snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -100+(v-1), -100+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -100+(v-1), -100+v, v); } } static void lte_rrc_scptm_FreqOffset_r14_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2*v, v); } static void lte_rrc_offsetDFN_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "0ms (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "0ms (0)"); } else if (v < 1000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.3fms (%u)", ((float)v)/1000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.3fms (%u)", ((float)v)/1000, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "1ms (1000)"); + snprintf(s, ITEM_LABEL_LENGTH, "1ms (1000)"); } } static void lte_rrc_thresholdWLAN_RSSI_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -128+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -128+v, v); } static void lte_rrc_cr_Limit_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); } else if (v < 10000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.4f (%u)", ((float)v)/10000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.4f (%u)", ((float)v)/10000, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "1 (10000)"); + snprintf(s, ITEM_LABEL_LENGTH, "1 (10000)"); } } @@ -15043,18 +15043,18 @@ static void lte_rrc_SL_CBR_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "0 (0)"); } else if (v < 100) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2f (%u)", ((float)v)/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2f (%u)", ((float)v)/100, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "1 (100)"); + snprintf(s, ITEM_LABEL_LENGTH, "1 (100)"); } } static void lte_rrc_threshS_RSSI_CBR_r14_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -112+(2*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", -112+(2*v), v); } static const value_string lte_rrc_schedulingInfoSIB1_NB_r13_vals[] = { @@ -15078,11 +15078,11 @@ static void lte_rrc_NRSRP_Range_NB_r14_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRP < -156dBm (0)"); } else if (v < 113) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= NRSRP < %ddBm (%u)", v-157, v-156, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= NRSRP (97)"); } } @@ -15091,32 +15091,32 @@ lte_rrc_NRSRQ_Range_NB_r14_fmt(gchar *s, guint32 v) { gint32 rsrq = (guint32)v; if (rsrq == -30) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (-30)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -34dB (-30)"); } else if (rsrq < 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19, ((float)rsrq/2)-19, rsrq); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19, ((float)rsrq/2)-19, rsrq); } else if (rsrq == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "NRSRQ < -19.5dB (0)"); } else if (rsrq < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19.5, ((float)rsrq/2)-19.5, rsrq); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-19.5, ((float)rsrq/2)-19.5, rsrq); } else if (rsrq == 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3 <= NRSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3 <= NRSRQ (34)"); } else if (rsrq < 46) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-20, ((float)rsrq/2)-20, rsrq); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= NRSRQ < %.1fdB (%d)", (((float)rsrq-1)/2)-20, ((float)rsrq/2)-20, rsrq); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (46)"); + snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= NRSRQ (46)"); } } static void lte_rrc_mbms_MaxBW_r14_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u MHz (%u)", 40*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u MHz (%u)", 40*v, v); } static void lte_rrc_dl_1024QAM_TotalWeightedLayers_r15_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); } static void @@ -15371,7 +15371,7 @@ lte_rrc_localTimeOffset_fmt(gchar *s, guint32 v) { gint32 time_offset = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", (time_offset < 0) ? '-':'+', abs(time_offset) >> 2, (abs(time_offset) & 0x03) * 15, time_offset); } diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c index 6a64c7ef5d..009f178c95 100644 --- a/epan/dissectors/packet-mms.c +++ b/epan/dissectors/packet-mms.c @@ -1001,7 +1001,7 @@ static void private_data_add_preCinfo(asn1_ctx_t *actx, guint32 val) { mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx); - g_snprintf(private_data->preCinfo, BUFFER_SIZE_PRE, "%02d ", val); + snprintf(private_data->preCinfo, BUFFER_SIZE_PRE, "%02d ", val); } static char* @@ -1024,7 +1024,7 @@ static void private_data_add_moreCinfo_float(asn1_ctx_t *actx, tvbuff_t *tvb) { mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx); - g_snprintf(private_data->moreCinfo, BUFFER_SIZE_MORE, + snprintf(private_data->moreCinfo, BUFFER_SIZE_MORE, " %f", tvb_get_ieee_float(tvb, 1, ENC_BIG_ENDIAN)); } diff --git a/epan/dissectors/packet-ngap.c b/epan/dissectors/packet-ngap.c index eeecc2fbd7..76719f17fd 100644 --- a/epan/dissectors/packet-ngap.c +++ b/epan/dissectors/packet-ngap.c @@ -2753,19 +2753,19 @@ dissect_ngap_warningMessageContents(tvbuff_t *warning_msg_tvb, proto_tree *tree, static void ngap_PacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void ngap_PacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void ngap_TimeUEStayedInCellEnhancedGranularity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); } static void @@ -2775,26 +2775,26 @@ ngap_PeriodicRegistrationUpdateTimer_fmt(gchar *s, guint32 v) switch (v>>5) { case 0: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val * 10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val * 10, v); break; case 1: default: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val, v); break; case 2: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val * 10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u hr (%u)", val * 10, v); break; case 3: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 2, v); break; case 4: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 30, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u sec (%u)", val * 30, v); break; case 5: - g_snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val, v); + snprintf(s, ITEM_LABEL_LENGTH, "%u min (%u)", val, v); break; case 7: - g_snprintf(s, ITEM_LABEL_LENGTH, "deactivated (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "deactivated (%u)", v); break; } } @@ -2802,25 +2802,25 @@ ngap_PeriodicRegistrationUpdateTimer_fmt(gchar *s, guint32 v) static void ngap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static void ngap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); } static void ngap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); } static void ngap_Threshold_SINR_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); } static struct ngap_private_data* diff --git a/epan/dissectors/packet-nr-rrc.c b/epan/dissectors/packet-nr-rrc.c index 9484f9e267..1e62d14a4b 100644 --- a/epan/dissectors/packet-nr-rrc.c +++ b/epan/dissectors/packet-nr-rrc.c @@ -9116,7 +9116,7 @@ nr_rrc_q_RxLevMin_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", 2*d, d); + snprintf(s, ITEM_LABEL_LENGTH, "%d dB (%d)", 2*d, d); } static const value_string nr_rrc_serialNumber_gs_vals[] = { @@ -9212,7 +9212,7 @@ nr_rrc_localTimeOffset_fmt(gchar *s, guint32 v) { gint32 time_offset = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "UTC time %c %dhr %dmin (%d)", (time_offset < 0) ? '-':'+', abs(time_offset) >> 2, (abs(time_offset) & 0x03) * 15, time_offset); } @@ -9220,13 +9220,13 @@ nr_rrc_localTimeOffset_fmt(gchar *s, guint32 v) static void nr_rrc_drx_SlotOffset_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%g ms (%u)", 1./32 * v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g ms (%u)", 1./32 * v, v); } static void nr_rrc_Hysteresis_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gdB (%u)", 0.5 * v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gdB (%u)", 0.5 * v, v); } static void @@ -9234,7 +9234,7 @@ nr_rrc_msg3_DeltaPreamble_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddB (%d)", 2 * d, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddB (%d)", 2 * d, d); } static void @@ -9242,18 +9242,18 @@ nr_rrc_Q_RxLevMin_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", 2 * d, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", 2 * d, d); } static void nr_rrc_RSRP_RangeEUTRA_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); } else if (v < 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", v-141, v-140, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= RSRP (97)"); } } @@ -9261,11 +9261,11 @@ static void nr_rrc_RSRQ_RangeEUTRA_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (v < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", ((float)v/2)-20, (((float)v+1)/2)-20, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); } } @@ -9273,31 +9273,31 @@ static void nr_rrc_SINR_RangeEUTRA_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SINR < -23dB (0)"); } else if (v == 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SINR (127)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } } static void nr_rrc_ReselectionThreshold_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2 * v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%udB (%u)", 2 * v, v); } static void nr_rrc_RSRP_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRP < -156dBm (0)"); } else if (v < 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", v-157, v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SS-RSRP < %ddBm (%u)", v-157, v-156, v); } else if (v == 126) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); + snprintf(s, ITEM_LABEL_LENGTH, "-31dBm <= SS-RSRP (126)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "infinity (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "infinity (127)"); } } @@ -9305,11 +9305,11 @@ static void nr_rrc_RSRQ_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-RSRQ < -43dB (0)"); } else if (v < 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-RSRQ < %.1fdB (%u)", (((float)v-1)/2)-43, ((float)v/2)-43, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-20dB <= SS-RSRQ (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "-20dB <= SS-RSRQ (127)"); } } @@ -9317,35 +9317,35 @@ static void nr_rrc_SINR_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SS-SINR < -23dB (0)"); } else if (v < 127) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= SS-SINR < %.1fdB (%u)", (((float)v-1)/2)-23, ((float)v/2)-23, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)"); + snprintf(s, ITEM_LABEL_LENGTH, "40dB <= SS-SINR (127)"); } } static void nr_rrc_dl_1024QAM_TotalWeightedLayers_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%u (%u)", 10+(2*v), v); } static void nr_rrc_timeConnFailure_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ums (%u)", 100*v, v); } static void nr_rrc_RSSI_Range_r16_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); } else if (v < 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", v-101, v-100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", v-101, v-100, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); + snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSSI (76)"); } } @@ -9355,19 +9355,19 @@ nr_rrc_RSRQ_RangeEUTRA_r16_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (d == -34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -36dB (-34)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -36dB (-34)"); } else if (d < 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19, ((float)d/2)-19, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19, ((float)d/2)-19, d); } else if (d == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (d < 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19.5, ((float)d/2)-19.5, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-19.5, ((float)d/2)-19.5, d); } else if (d == 34) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "-3dB <= RSRQ (34)"); } else if (d < 46) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-20, ((float)d/2)-20, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%d)", (((float)d-1)/2)-20, ((float)d/2)-20, d); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= RSRQ (46)"); + snprintf(s, ITEM_LABEL_LENGTH, "2.5dB <= RSRQ (46)"); } } @@ -9377,11 +9377,11 @@ nr_rrc_utra_FDD_RSCP_r16_fmt(gchar *s, guint32 v) gint32 d = (gint32)v; if (d == -5) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -120dBm (-5)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -120dBm (-5)"); } else if (d < 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddB (%d)", d-116, d-115, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddB (%d)", d-116, d-115, d); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSCP (91)"); + snprintf(s, ITEM_LABEL_LENGTH, "-25dBm <= RSCP (91)"); } } @@ -9389,18 +9389,18 @@ static void nr_rrc_utra_FDD_EcN0_r16_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Ec/No < -24dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "Ec/No < -24dB (0)"); } else if (v < 49) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= Ec/No < %.1fdB (%u)", (((float)v-1)/2)-24, ((float)v/2)-24, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= Ec/No < %.1fdB (%u)", (((float)v-1)/2)-24, ((float)v/2)-24, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "0dB <= Ec/No (49)"); + snprintf(s, ITEM_LABEL_LENGTH, "0dB <= Ec/No (49)"); } } static void nr_rrc_averageDelay_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/10, v); } static void @@ -9408,26 +9408,26 @@ nr_rrc_measTriggerQuantity_utra_FDD_RSCP_r16_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", d-115, d); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%d)", d-115, d); } static void nr_rrc_measTriggerQuantity_utra_FDD_EcN0_r16_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", (float)v/2-24.5, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", (float)v/2-24.5, v); } static void nr_rrc_SRS_RSRP_r16_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "SRS-RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "SRS-RSRP < -140dBm (0)"); } else if (v < 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SRS-RSRP < %ddB (%u)", v-141, v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= SRS-RSRP < %ddB (%u)", v-141, v-140, v); } else if (v == 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= SRS-RSRP (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "-44dBm <= SRS-RSRP (97)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "Infinity (98)"); + snprintf(s, ITEM_LABEL_LENGTH, "Infinity (98)"); } } @@ -9436,7 +9436,7 @@ nr_rrc_MeasTriggerQuantityOffset_fmt(gchar *s, guint32 v) { gint32 d = (gint32)v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", (float)d/2, d); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", (float)d/2, d); } static int diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c index 9526a9177c..7f569f7729 100644 --- a/epan/dissectors/packet-s1ap.c +++ b/epan/dissectors/packet-s1ap.c @@ -2035,13 +2035,13 @@ static int dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU(tvbuff_t *tvb, static void s1ap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); } static void s1ap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); } static const true_false_string s1ap_tfs_interfacesToTrace = { @@ -2052,7 +2052,7 @@ static const true_false_string s1ap_tfs_interfacesToTrace = { static void s1ap_Time_UE_StayedInCell_EnhancedGranularity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); } const value_string s1ap_serialNumber_gs_vals[] = { @@ -2104,7 +2104,7 @@ dissect_s1ap_warningMessageContents(tvbuff_t *warning_msg_tvb, proto_tree *tree, static void s1ap_EUTRANRoundTripDelayEstimationInfo_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 16*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uTs (%u)", 16*v, v); } static const true_false_string s1ap_tfs_activate_do_not_activate = { @@ -2115,25 +2115,25 @@ static const true_false_string s1ap_tfs_activate_do_not_activate = { static void s1ap_Packet_LossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); } static void s1ap_threshold_nr_rsrp_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); } static void s1ap_threshold_nr_rsrq_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); } static void s1ap_threshold_nr_sinr_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); } static struct s1ap_private_data* diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index 1dc3aba3ba..e17f34fce4 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -596,14 +596,14 @@ dissect_t38_T_field_type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ } else { col_append_str(actx->pinfo->cinfo, COL_INFO, " (t4-data Reassembled: No packet lost)"); - g_snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); + snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); } if (p_t38_packet_conv_info->packet_lost) { - g_snprintf(t38_info->desc_comment, MAX_T38_DESC, " Pack lost: %d, Pack burst lost: %d", p_t38_packet_conv_info->packet_lost, p_t38_packet_conv_info->burst_lost); + snprintf(t38_info->desc_comment, MAX_T38_DESC, " Pack lost: %d, Pack burst lost: %d", p_t38_packet_conv_info->packet_lost, p_t38_packet_conv_info->burst_lost); } else { - g_snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); + snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost"); } process_reassembled_data(tvb, offset, actx->pinfo, diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c index b40fdb2392..44e5792433 100644 --- a/epan/dissectors/packet-ulp.c +++ b/epan/dissectors/packet-ulp.c @@ -1026,18 +1026,18 @@ static void ulp_ganssDataBitInterval_fmt(gchar *s, guint32 v) { if (v == 15) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Time interval is not specified (15)"); + snprintf(s, ITEM_LABEL_LENGTH, "Time interval is not specified (15)"); } else { double interval = (0.1*pow(2, (double)v)); - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", interval, v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", interval, v); } } static void ulp_ExtendedEphemeris_validity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%uh (%u)", 4*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%uh (%u)", 4*v, v); } static void @@ -1045,7 +1045,7 @@ ulp_PositionEstimate_latitude_fmt(gchar *s, guint32 v) { double latitude = ((double)v*90)/pow(2,23); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", latitude, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", latitude, v); } static void @@ -1053,18 +1053,18 @@ ulp_PositionEstimate_longitude_fmt(gchar *s, guint32 v) { double longitude = ((double)(gint32)v*360)/pow(2,24); - g_snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); + snprintf(s, ITEM_LABEL_LENGTH, "%g degrees (%u)", longitude, v); } static void ulp_NMRelement_rxLev_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RxLev < -110dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RxLev < -110dBm (0)"); } else if (v == 63) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RxLev >= -48dBm (63)"); + snprintf(s, ITEM_LABEL_LENGTH, "RxLev >= -48dBm (63)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RxLev < %ddBm (%u)", -111+v, -110+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RxLev < %ddBm (%u)", -111+v, -110+v, v); } } @@ -1072,13 +1072,13 @@ static void ulp_UTRA_CarrierRSSI_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI < -100dBm (0)"); } else if (v == 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSSI >= -25dBm (76)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSSI >= -25dBm (76)"); } else if (v > 76) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -101+v, -100+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSSI < %ddBm (%u)", -101+v, -100+v, v); } } @@ -1086,13 +1086,13 @@ static void ulp_PrimaryCCPCH_RSCP_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -115dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSCP < -115dBm (0)"); } else if (v == 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSCP >= -25dBm (91)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSCP >= -25dBm (91)"); } else if (v > 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddBm (%u)", -116+v, -115+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSCP < %ddBm (%u)", -116+v, -115+v, v); } } @@ -1100,13 +1100,13 @@ static void ulp_CPICH_Ec_N0_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 < -24dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 < -24dB (0)"); } else if (v == 49) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 >= 0dB (49)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH Ec/N0 >= 0dB (49)"); } else if (v > 49) { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= CPICH Ec/N0 < %.1fdB (%u)", -24.5+((float)v/2), -24+((float)v/2), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= CPICH Ec/N0 < %.1fdB (%u)", -24.5+((float)v/2), -24+((float)v/2), v); } } @@ -1114,15 +1114,15 @@ static void ulp_CPICH_RSCP_fmt(gchar *s, guint32 v) { if (v == 123) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP < -120dBm (123)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP < -120dBm (123)"); } else if (v > 123) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= CPICH RSCP < %ddBm (%u)", -244+v, -243+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= CPICH RSCP < %ddBm (%u)", -244+v, -243+v, v); } else if (v == 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP >= -25dBm (91)"); + snprintf(s, ITEM_LABEL_LENGTH, "CPICH RSCP >= -25dBm (91)"); } else if (v < 91) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm < CPICH RSCP <= %ddBm (%u)", -116+v, -115+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm < CPICH RSCP <= %ddBm (%u)", -116+v, -115+v, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); + snprintf(s, ITEM_LABEL_LENGTH, "Spare (%u)", v); } } @@ -1132,9 +1132,9 @@ ulp_QoP_horacc_fmt(gchar *s, guint32 v) double uncertainty = 10*(pow(1.1, (double)v)-1); if (uncertainty < 1000) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fkm (%u)", uncertainty/1000, v); } } @@ -1143,13 +1143,13 @@ ulp_QoP_veracc_fmt(gchar *s, guint32 v) { double uncertainty = 45*(pow(1.025, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fm (%u)", uncertainty, v); } static void ulp_QoP_delay_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", pow(2, (double)v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%gs (%u)", pow(2, (double)v), v); } static const true_false_string ulp_vertical_dir_val = { @@ -1160,18 +1160,18 @@ static const true_false_string ulp_vertical_dir_val = { static void ulp_RelativeTime_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%u)", 0.01*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fs (%u)", 0.01*v, v); } static void ulp_RSRP_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP < -140dBm (0)"); } else if (v == 97) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRP >= -44dBm (97)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRP >= -44dBm (97)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", -141+v, -140+v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm <= RSRP < %ddBm (%u)", -141+v, -140+v, v); } } @@ -1179,36 +1179,36 @@ static void ulp_RSRQ_Range_fmt(gchar *s, guint32 v) { if (v == 0) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ < -19.5dB (0)"); } else if (v == 64) { - g_snprintf(s, ITEM_LABEL_LENGTH, "RSRQ >= -3dB (34)"); + snprintf(s, ITEM_LABEL_LENGTH, "RSRQ >= -3dB (34)"); } else { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", -20+((float)v/2), -19.5+((float)v/2), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB <= RSRQ < %.1fdB (%u)", -20+((float)v/2), -19.5+((float)v/2), v); } } static void ulp_SignalDelta_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%sdB (%u)", v ? "0.5" : "0", v); + snprintf(s, ITEM_LABEL_LENGTH, "%sdB (%u)", v ? "0.5" : "0", v); } static void ulp_locationAccuracy_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%u)", 0.1*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fm (%u)", 0.1*v, v); } static void ulp_WimaxRTD_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.01*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.01*v, v); } static void ulp_WimaxNMR_rssi_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fdBm (%u)", -103.75+(0.25*v), v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fdBm (%u)", -103.75+(0.25*v), v); } static void @@ -1216,7 +1216,7 @@ ulp_UTRAN_gpsReferenceTimeUncertainty_fmt(gchar *s, guint32 v) { double uncertainty = 0.0022*(pow(1.18, (double)v)-1); - g_snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", uncertainty, v); + snprintf(s, ITEM_LABEL_LENGTH, "%fus (%u)", uncertainty, v); } static const value_string ulp_ganss_time_id_vals[] = { @@ -1230,13 +1230,13 @@ static const value_string ulp_ganss_time_id_vals[] = { static void ulp_utran_GANSSTimingOfCell_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.25*v, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fus (%u)", 0.25*v, v); } static void ulp_Coordinate_latitude_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%u)", ((float)v/8388607.0)*90, v); } @@ -1245,7 +1245,7 @@ ulp_Coordinate_longitude_fmt(gchar *s, guint32 v) { gint32 longitude = (gint32) v; - g_snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", + snprintf(s, ITEM_LABEL_LENGTH, "%f degrees (%d)", ((float)longitude/8388608.0)*180, longitude); } diff --git a/epan/dissectors/packet-x2ap.c b/epan/dissectors/packet-x2ap.c index e9bea885ae..f83b308bf3 100644 --- a/epan/dissectors/packet-x2ap.c +++ b/epan/dissectors/packet-x2ap.c @@ -2585,31 +2585,31 @@ static const true_false_string x2ap_tfs_activate_do_not_activate = { static void x2ap_Time_UE_StayedInCell_EnhancedGranularity_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fs", ((float)v)/10); } static void x2ap_handoverTriggerChange_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); } static void x2ap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-140, v); } static void x2ap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-20, v); } static void x2ap_Packet_LossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f %% (%u)", (float)v/10, v); } static struct x2ap_private_data* diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index 6f57ff6178..c8cbfe67f8 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -735,7 +735,7 @@ dissect_x509if_T_type_02(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse last_ava = (char *)wmem_alloc(actx->pinfo->pool, MAX_AVA_STR_LEN); *last_ava = '\0'; register_frame_end_routine (actx->pinfo, x509if_frame_end); - g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s", name, fmt); + snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s", name, fmt); proto_item_append_text(tree, " %s", last_ava); @@ -791,7 +791,7 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o if(!(name = oid_resolved_from_string(actx->pinfo->pool, actx->external.direct_reference))) name = actx->external.direct_reference; - g_snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s %s", name, fmt, value); + snprintf(last_ava, MAX_AVA_STR_LEN, "%s %s %s", name, fmt, value); proto_item_append_text(tree, " %s", last_ava); diff --git a/epan/dissectors/packet-xnap.c b/epan/dissectors/packet-xnap.c index 6a945e5144..697ca8f9f1 100644 --- a/epan/dissectors/packet-xnap.c +++ b/epan/dissectors/packet-xnap.c @@ -2379,43 +2379,43 @@ static dissector_handle_t xnap_handle; static void xnap_PacketLossRate_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1f%% (%u)", (float)v/10, v); } static void xnap_PacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fms (%u)", (float)v/2, v); } static void xnap_ExtendedPacketDelayBudget_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.2fms (%u)", (float)v/100, v); } static void xnap_handoverTriggerChange_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", ((float)v)/2, (gint32)v); } static void xnap_Threshold_RSRP_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); + snprintf(s, ITEM_LABEL_LENGTH, "%ddBm (%u)", (gint32)v-156, v); } static void xnap_Threshold_RSRQ_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-43, v); } static void xnap_Threshold_SINR_fmt(gchar *s, guint32 v) { - g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); + snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%u)", ((float)v/2)-23, v); } static const true_false_string xnap_tfs_activate_do_not_activate = { |