use %p to print pointers

This commit is contained in:
matthias.ringwald 2011-10-19 17:19:16 +00:00
parent 93f1e93b9a
commit 79bbfa0b87
2 changed files with 5 additions and 5 deletions

View File

@ -1110,7 +1110,7 @@ void hci_run(){
// send disconnect
if (!hci_can_send_packet_now(HCI_COMMAND_DATA_PACKET)) return;
log_info("HCI_STATE_HALTING, connection %lu, handle %u\n", (uintptr_t) connection, (uint16_t)connection->con_handle);
log_info("HCI_STATE_HALTING, connection %p, handle %u\n", connection, (uint16_t)connection->con_handle);
hci_send_cmd(&hci_disconnect, connection->con_handle, 0x13); // remote closed connection
// send disconnected event right away - causes higher layer connections to get closed, too.
@ -1145,7 +1145,7 @@ void hci_run(){
// send disconnect
if (!hci_can_send_packet_now(HCI_COMMAND_DATA_PACKET)) return;
log_info("HCI_STATE_FALLING_ASLEEP, connection %lu, handle %u\n", (uintptr_t) connection, (uint16_t)connection->con_handle);
log_info("HCI_STATE_FALLING_ASLEEP, connection %p, handle %u\n", connection, (uint16_t)connection->con_handle);
hci_send_cmd(&hci_disconnect, connection->con_handle, 0x13); // remote closed connection
// send disconnected event right away - causes higher layer connections to get closed, too.

View File

@ -36,7 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h> // memcpy
#include <inttypes.h>
#include <stdint.h>
#include <btstack/btstack.h>
#include <btstack/hci_cmds.h>
@ -833,7 +833,7 @@ static void rfcomm_multiplexer_state_machine(rfcomm_multiplexer_t * multiplexer,
case RFCOMM_MULTIPLEXER_SEND_SABM_0:
switch (event) {
case MULT_EV_READY_TO_SEND:
log_info("Sending SABM #0 - (multi 0x%08"PRIxPTR")\n", (uintptr_t) multiplexer);
log_info("Sending SABM #0 - (multi 0x%p)\n", multiplexer);
multiplexer->state = RFCOMM_MULTIPLEXER_W4_UA_0;
rfcomm_send_sabm(multiplexer, 0);
break;
@ -1374,7 +1374,7 @@ static void rfcomm_channel_state_machine(rfcomm_channel_t *channel, rfcomm_chann
case RFCOMM_CHANNEL_SEND_UIH_PN:
switch (event->type) {
case CH_EVT_READY_TO_SEND:
log_info("Sending UIH Parameter Negotiation Command for #%u (channel 0x%08"PRIxPTR")\n", channel->dlci, (uintptr_t) channel );
log_info("Sending UIH Parameter Negotiation Command for #%u (channel 0x%p)\n", channel->dlci, channel );
channel->state = RFCOMM_CHANNEL_W4_PN_RSP;
rfcomm_send_uih_pn_command(multiplexer, channel->dlci, channel->max_frame_size);
break;