projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mp3dec: Improve bad main_data_begin pointer error handling.
[paraslash.git]
/
stdout.c
diff --git
a/stdout.c
b/stdout.c
index ebc1cb98fd7970f9b17cab73710a6557c5a3c385..e178fe0e180e9e687c2f3c92c65bbfdb26d7d9bb 100644
(file)
--- a/
stdout.c
+++ b/
stdout.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2006-200
8
Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-200
9
Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
@@
-62,20
+62,20
@@
static void stdout_post_select(struct sched *s, struct task *t)
t->error = 0;
if (!sot->check_fd) {
t->error = 0;
if (!sot->check_fd) {
- if (
*sot->input_error
)
+ if (
!*sot->loaded && *sot->input_error < 0
)
t->error = *sot->input_error;
return;
}
if (!FD_ISSET(STDOUT_FILENO, &s->wfds))
return;
t->error = *sot->input_error;
return;
}
if (!FD_ISSET(STDOUT_FILENO, &s->wfds))
return;
- ret = write(STDOUT_FILENO,
sot->buf
, *sot->loaded);
+ ret = write(STDOUT_FILENO,
*sot->bufp
, *sot->loaded);
if (ret < 0) {
t->error = -ERRNO_TO_PARA_ERROR(errno);
return;
}
*sot->loaded -= ret;
if (*sot->loaded)
if (ret < 0) {
t->error = -ERRNO_TO_PARA_ERROR(errno);
return;
}
*sot->loaded -= ret;
if (*sot->loaded)
- memmove(
sot->buf, sot->buf
+ ret, *sot->loaded);
+ memmove(
*sot->bufp, *sot->bufp
+ ret, *sot->loaded);
}
/**
}
/**