Skip to contentSkip to conversation

Two updated patches

PATCH Christian Hoene 2 participants 2 messages Dec 23, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

again. Hopefully, I got all coding style rules right this time. Here my two patches.

Merry Christmas

Christian

sbc/sbc.c +3 -0
index 5411893..a3a3ac1 100644
@@ -1196,6 +1196,9 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output,
 	if (written)
 		*written = 0;
 
+	if (framelen <= 0)
+		return framelen;
+
 	samples = sbc_synthesize_audio(&priv->dec_state, &priv->frame);
 
 	ptr = output;
sbc/sbcenc.c +49 -11

123 lines not on this page · raw message

maintainer
#1 lore raw

Hi Christian,

Quoted 2 lines

again. Hopefully, I got all coding style rules right this time. Here my two patches.

so I applied both patches, but I actually had to touch your options patch to make it look a little bit nicer and fix some pending coding style stuff. Don't worry, non of that is obvious. The cases where you have too many options or statements in if/while etc. for format strings are kind nasty. The reason for being so strict here is that the code must remain easy readable even after years. The right and more clean indentation is crucial here

Also in the future please use git-format-patch so I can just commit them directly. That way also your name shows up in the repository. And that way you get forced to write a commit message. If I have to write the commit message by myself, I don't bother changing the author ;)

Regards

Marcel