summaryrefslogtreecommitdiff
path: root/monitor/control.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-07-04 19:16:50 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-07-04 19:16:50 +0200
commitb1d45edc0194c6dfab7702f44a430e63cb4066d6 (patch)
treea77200b1132872ada06d416935b04e7ffb49ab86 /monitor/control.c
parent902b44266bd3cf10f1421ccb2c25aeaaf9677515 (diff)
downloadbluez-b1d45edc0194c6dfab7702f44a430e63cb4066d6.tar.gz
monitor: Print control settings details only if available
Diffstat (limited to 'monitor/control.c')
-rw-r--r--monitor/control.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/monitor/control.c b/monitor/control.c
index 287341b5c..9e30d38de 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -172,12 +172,14 @@ static void mgmt_new_settings(uint16_t len, const void *buf)
printf("@ New Settings: 0x%4.4x\n", settings);
- printf("%-12c", ' ');
- for (i = 0; i < NELEM(settings_str); i++) {
- if (settings & (1 << i))
- printf("%s ", settings_str[i]);
+ if (settings) {
+ printf("%-12c", ' ');
+ for (i = 0; i < NELEM(settings_str); i++) {
+ if (settings & (1 << i))
+ printf("%s ", settings_str[i]);
+ }
+ printf("\n");
}
- printf("\n");
buf += 4;
len -= 4;