diff options
| author | Max Krasnyansky <maxk@qualcomm.com> | 2002-04-15 16:55:14 +0000 | 
|---|---|---|
| committer | Max Krasnyansky <maxk@qualcomm.com> | 2002-04-15 16:55:14 +0000 | 
| commit | e6564963d4e3c7efe92e30c00fa289dd5a964f28 (patch) | |
| tree | f3797c9941e853cc01066261d69dd736d3e4228d /src/hci.c | |
| parent | 083ac35c0e178f548da930e91fe4154a4993af0e (diff) | |
lmp_featuretostr fixes
Diffstat (limited to 'src/hci.c')
| -rw-r--r-- | src/hci.c | 10 | 
1 files changed, 5 insertions, 5 deletions
@@ -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);  		}  	}  | 
