forked from osmocom/wireshark
Fix stdio.h conversions to use the scanf macros
This commit is contained in:
parent
dec5590b5b
commit
ce1dc88173
|
@ -1650,7 +1650,7 @@ cap_pipe_open_live(char *pipename,
|
|||
}
|
||||
|
||||
#else /* _WIN32 */
|
||||
if (sscanf(pipename, EXTCAP_PIPE_PREFIX "%" PRIuPTR, &extcap_pipe_handle) == 1)
|
||||
if (sscanf(pipename, EXTCAP_PIPE_PREFIX "%" SCNuPTR, &extcap_pipe_handle) == 1)
|
||||
{
|
||||
/* The client is already connected to extcap pipe.
|
||||
* We have inherited the handle from parent process.
|
||||
|
|
|
@ -895,7 +895,7 @@ pbl_node_t* pbl_create_field_node(pbl_file_descriptor_t* file, int lineno, const
|
|||
case PROTOBUF_TYPE_INT32:
|
||||
case PROTOBUF_TYPE_SINT32:
|
||||
case PROTOBUF_TYPE_SFIXED32:
|
||||
sscanf(node->orig_default_value, "%" PRId32, &node->default_value.i32);
|
||||
sscanf(node->orig_default_value, "%" SCNd32, &node->default_value.i32);
|
||||
break;
|
||||
|
||||
case PROTOBUF_TYPE_INT64:
|
||||
|
@ -906,7 +906,7 @@ pbl_node_t* pbl_create_field_node(pbl_file_descriptor_t* file, int lineno, const
|
|||
|
||||
case PROTOBUF_TYPE_UINT32:
|
||||
case PROTOBUF_TYPE_FIXED32:
|
||||
sscanf(node->orig_default_value, "%" PRIu32, &node->default_value.u32);
|
||||
sscanf(node->orig_default_value, "%" SCNu32, &node->default_value.u32);
|
||||
break;
|
||||
|
||||
case PROTOBUF_TYPE_UINT64:
|
||||
|
|
|
@ -292,7 +292,7 @@ WSLUA_CONSTRUCTOR Int64_fromhex(lua_State* L) {
|
|||
const gchar *s = luaL_checklstring(L,WSLUA_ARG_Int64_fromhex_HEX,&len);
|
||||
|
||||
if (len > 0) {
|
||||
if (sscanf(s, "%" PRIx64, &result) != 1) {
|
||||
if (sscanf(s, "%" SCNx64, &result) != 1) {
|
||||
return luaL_error(L, "Error decoding the passed-in hex string");
|
||||
}
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ WSLUA_CONSTRUCTOR UInt64_fromhex(lua_State* L) {
|
|||
const gchar *s = luaL_checklstring(L,WSLUA_ARG_UInt64_fromhex_HEX,&len);
|
||||
|
||||
if (len > 0) {
|
||||
if (sscanf(s, "%" PRIx64, &result) != 1) {
|
||||
if (sscanf(s, "%" SCNx64, &result) != 1) {
|
||||
return luaL_error(L, "Error decoding the passed-in hex string");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ daintree_sna_read_packet(FILE_T fh, wtap_rec *rec, Buffer *buf,
|
|||
rec->block = wtap_block_create(WTAP_BLOCK_PACKET);
|
||||
rec->presence_flags = WTAP_HAS_TS|WTAP_HAS_CAP_LEN;
|
||||
|
||||
if (sscanf(readLine, "%*s %18" PRIu64 ".%9d %9u %" READDATA_MAX_FIELD_SIZE "s",
|
||||
if (sscanf(readLine, "%*s %18" SCNu64 ".%9d %9u %" READDATA_MAX_FIELD_SIZE "s",
|
||||
&seconds, &useconds, &rec->rec_header.packet_header.len, readData) != 4) {
|
||||
*err = WTAP_ERR_BAD_FILE;
|
||||
*err_info = g_strdup("daintree_sna: invalid read record");
|
||||
|
|
Loading…
Reference in New Issue