summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Krasnyansky <maxk@qualcomm.com>2002-04-15 16:55:14 +0000
committerMax Krasnyansky <maxk@qualcomm.com>2002-04-15 16:55:14 +0000
commite6564963d4e3c7efe92e30c00fa289dd5a964f28 (patch)
treef3797c9941e853cc01066261d69dd736d3e4228d
parent083ac35c0e178f548da930e91fe4154a4993af0e (diff)
lmp_featuretostr fixes
-rw-r--r--src/hci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hci.c b/src/hci.c
index 9418eb42..6af14864 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -339,13 +339,13 @@ char *lmp_featurestostr(uint8_t *features, char *pref, int width)
m = lmp_features_map[i];
while (m->str) {
- if ((unsigned int) m->val & (unsigned int) features[i])
+ if ((unsigned int) m->val & (unsigned int) features[i]) {
ptr += sprintf(ptr, "%s ", m->str);
+ w = (w + 1) & width;
+ if (!w)
+ ptr += sprintf(ptr, "\n%s", pref ? pref : "");
+ }
m++;
-
- w = (w + 1) & width;
- if (!w)
- ptr += sprintf(ptr, "\n%s", pref);
}
}