summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-18 16:15:42 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-18 16:15:42 +0200
commit55a656743b858c5031fb2b0eb0eec0ab64093148 (patch)
tree1b5f03f5302782eb0ba805bf07cc054ce15521ce
parent6218cfa9b282615addb2a49efd21c9701dbff01a (diff)
Fix getting non-int va_arg values
-rw-r--r--common/btio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/btio.c b/common/btio.c
index 9084f2ad..a78c00dc 100644
--- a/common/btio.c
+++ b/common/btio.c
@@ -658,14 +658,14 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
return FALSE;
break;
case BT_IO_OPT_PSM:
- *(va_arg(args, int *)) = src.l2_psm ?
+ *(va_arg(args, uint16_t *)) = src.l2_psm ?
src.l2_psm : dst.l2_psm;
break;
case BT_IO_OPT_OMTU:
- *(va_arg(args, int *)) = l2o.omtu;
+ *(va_arg(args, uint16_t *)) = l2o.omtu;
break;
case BT_IO_OPT_IMTU:
- *(va_arg(args, int *)) = l2o.imtu;
+ *(va_arg(args, uint16_t *)) = l2o.imtu;
break;
default:
g_set_error(err, BT_IO_ERROR, BT_IO_ERROR_INVALID_ARGS,
@@ -719,7 +719,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1,
return FALSE;
break;
case BT_IO_OPT_CHANNEL:
- *(va_arg(args, int *)) = src.rc_channel ?
+ *(va_arg(args, uint8_t *)) = src.rc_channel ?
src.rc_channel : dst.rc_channel;
break;
default: