~xnox/upstart/fix-qemu-test

« back to all changes in this revision

Viewing changes to init/state.c

  • Committer: James Hunt
  • Date: 2012-11-23 11:36:47 UTC
  • Revision ID: james.hunt@ubuntu.com-20121123113647-n6ozfztq7gqa40hd
[ Colin King <colin.king@ubuntu.com> ]

* init/log.c: log_serialise(): smatch-found issue where
  additional checks required for log->unflushed to avoid any
  possibility of NULL dereference.
* init/state.c: state_read_objects(): smatch-found issue
  to correct read size and ensure optimal throughput.

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
                if (nih_io_buffer_resize (buffer, initial_size) < 0)
228
228
                        goto error;
229
229
 
230
 
                ret = read (fd, buf, sizeof (buf));
 
230
                ret = read (fd, buf, initial_size);
231
231
                if (ret < 0) {
232
232
                        if (errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK)
233
233
                                goto error;