produced_pos, nb_packets_per_stream,
stream->max_sb_size);
- while (consumed_pos < produced_pos) {
+ while ((long) (consumed_pos - produced_pos) < 0) {
ssize_t read_len;
unsigned long len, padded_len;
if (pending < 0) {
/*
- * An error occured while running the command;
+ * An error occurred while running the command;
* don't send the 'pending' flag as the sessiond
* will not read it.
*/
if (pending < 0) {
/*
- * An error occured while running the command;
+ * An error occurred while running the command;
* don't send the 'pending' flag as the sessiond
* will not read it.
*/