--- a/source.c
+++ b/source.c
@@ -1,4 +1,4 @@
+void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, Error **errp)

 {

void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, Error **errp)

{

    error_setg(errp, "AioContext polling is not implemented on Windows");

}


--- a/source.c
+++ b/source.c
@@ -3,4 +3,4 @@
 {
     if (sector & dev->sector_mask) {
     if (size % dev->conf->logical_block_size) {
+    return true;

static bool virtio_blk_sect_range_ok(VirtIOBlock *dev,
                                     uint64_t sector, size_t size)
{
    if (sector & dev->sector_mask) {
    if (size % dev->conf->logical_block_size) {
    return true;


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

                                 const uint8_t *src, int src_size)

+{

     int h, w;

static int dxtory_decode_v1_420(AVCodecContext *avctx, AVFrame *pic,

                                const uint8_t *src, int src_size)

{

    int h, w;

    uint8_t *Y1, *Y2, *U, *V;

    int ret;

    if (src_size < avctx->width * avctx->height * 3 / 2) {

        av_log(avctx, AV_LOG_ERROR, "packet too small\n");

        return AVERROR_INVALIDDATA;

    }

    avctx->pix_fmt = AV_PIX_FMT_YUV420P;

    if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)

        return ret;

    Y1 = pic->data[0];

    Y2 = pic->data[0] + pic->linesize[0];

    U  = pic->data[1];

    V  = pic->data[2];

    for (h = 0; h < avctx->height; h += 2) {

        for (w = 0; w < avctx->width; w += 2) {

            AV_COPY16(Y1 + w, src);

            AV_COPY16(Y2 + w, src + 2);

            U[w >> 1] = src[4] + 0x80;

            V[w >> 1] = src[5] + 0x80;

            src += 6;

        }

        Y1 += pic->linesize[0] << 1;

        Y2 += pic->linesize[0] << 1;

        U  += pic->linesize[1];

        V  += pic->linesize[2];

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 void qemu_anon_ram_free(void *ptr, size_t size)

 {
+
     trace_qemu_anon_ram_free(ptr, size);

     if (ptr) {

void qemu_anon_ram_free(void *ptr, size_t size)

{

    trace_qemu_anon_ram_free(ptr, size);

    if (ptr) {

        munmap(ptr, size);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width)
+
+{
+
+#ifdef HAVE_MMX
+
 	asm volatile(

 		"mov %0, %%"REG_a"		\n\t"

static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width)

{

#ifdef HAVE_MMX

	asm volatile(

		"mov %0, %%"REG_a"		\n\t"

		"1:				\n\t"

		"movq (%1, %%"REG_a",2), %%mm0	\n\t"

		"movq 8(%1, %%"REG_a",2), %%mm1	\n\t"

		"psrlw $8, %%mm0		\n\t"

		"psrlw $8, %%mm1		\n\t"

		"packuswb %%mm1, %%mm0		\n\t"

		"movq %%mm0, (%2, %%"REG_a")	\n\t"

		"add $8, %%"REG_a"		\n\t"

		" js 1b				\n\t"

		: : "g" (-width), "r" (src+width*2), "r" (dst+width)

		: "%"REG_a

	);

#else

	int i;

	for(i=0; i<width; i++)

		dst[i]= src[2*i+1];

#endif

}


--- a/source.c
+++ b/source.c
@@ -1,21 +1,21 @@
 static int ff_h261_resync(H261Context *h){

     MpegEncContext * const s = &h->s;
+
     int left, ret;

+
+    if(show_bits(&s->gb, 15)==0){
+
+        ret= h261_decode_gob_header(h);

+        if(ret>=0)

             return 0;
+
     }
+
     //ok, its not where its supposed to be ...

     s->gb= s->last_resync_gb;

static int ff_h261_resync(H261Context *h){

    MpegEncContext * const s = &h->s;

    int left, ret;

    if(show_bits(&s->gb, 15)==0){

        ret= h261_decode_gob_header(h);

        if(ret>=0)

            return 0;

    }

    //ok, its not where its supposed to be ...

    s->gb= s->last_resync_gb;

    align_get_bits(&s->gb);

    left= s->gb.size_in_bits - get_bits_count(&s->gb);

    for(;left>15+1+4+5; left-=8){

        if(show_bits(&s->gb, 15)==0){

            GetBitContext bak= s->gb;

            ret= h261_decode_gob_header(h);

            if(ret>=0)

                return 0;

            s->gb= bak;

        }

        skip_bits(&s->gb, 8);

    }

    return -1;

}


--- a/source.c
+++ b/source.c
@@ -7,10 +7,10 @@
     IscsiAIOCB *acb;
     acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque);
     trace_iscsi_aio_writev(iscsilun->iscsi, sector_num, nb_sectors, opaque, acb);
+    acb->iscsilun    = iscsilun;
+    acb->qiov        = qiov;
+    acb->nb_sectors  = nb_sectors;
+    acb->sector_num  = sector_num;
     acb->retries     = ISCSI_CMD_RETRIES;
     if (iscsi_aio_writev_acb(acb) != 0) {
         qemu_aio_release(acb);

iscsi_aio_writev(BlockDriverState *bs, int64_t sector_num,
                 QEMUIOVector *qiov, int nb_sectors,
                 BlockDriverCompletionFunc *cb,
                 void *opaque)
{
    IscsiLun *iscsilun = bs->opaque;
    IscsiAIOCB *acb;
    acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque);
    trace_iscsi_aio_writev(iscsilun->iscsi, sector_num, nb_sectors, opaque, acb);
    acb->iscsilun    = iscsilun;
    acb->qiov        = qiov;
    acb->nb_sectors  = nb_sectors;
    acb->sector_num  = sector_num;
    acb->retries     = ISCSI_CMD_RETRIES;
    if (iscsi_aio_writev_acb(acb) != 0) {
        qemu_aio_release(acb);
    iscsi_set_events(iscsilun);
    return &acb->common;


--- a/source.c
+++ b/source.c
@@ -2,8 +2,8 @@

 {

+    assert(!aux_slave->mmio);
+
     aux_slave->mmio = mmio;

 }

void aux_init_mmio(AUXSlave *aux_slave, MemoryRegion *mmio)

{

    assert(!aux_slave->mmio);

    aux_slave->mmio = mmio;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
+static int cpu_pre_load(void *opaque)
+
+{
+
     CPUState *env = opaque;

static int cpu_pre_load(void *opaque)

{

    CPUState *env = opaque;

    cpu_synchronize_state(env);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,20 +1,20 @@
+static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
+
+{
+
+    SliceContext *slice = link->dst->priv;
+
+    int y2, ret = 0;

+
+
+    if (slice_dir == 1) {
+
         for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h) {

+            ret = ff_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);

+            if (ret < 0)

                 return ret;

static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)

{

    SliceContext *slice = link->dst->priv;

    int y2, ret = 0;

    if (slice_dir == 1) {

        for (y2 = y; y2 + slice->h <= y + h; y2 += slice->h) {

            ret = ff_draw_slice(link->dst->outputs[0], y2, slice->h, slice_dir);

            if (ret < 0)

                return ret;

        }

        if (y2 < y + h)

            return ff_draw_slice(link->dst->outputs[0], y2, y + h - y2, slice_dir);

    } else if (slice_dir == -1) {

        for (y2 = y + h; y2 - slice->h >= y; y2 -= slice->h) {

            ret = ff_draw_slice(link->dst->outputs[0], y2 - slice->h, slice->h, slice_dir);

            if (ret < 0)

                return ret;

        }

        if (y2 > y)

            return ff_draw_slice(link->dst->outputs[0], y, y2 - y, slice_dir);

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static void thread_pool_co_cb(void *opaque, int ret)

 {
+
     ThreadPoolCo *co = opaque;

static void thread_pool_co_cb(void *opaque, int ret)

{

    ThreadPoolCo *co = opaque;

    co->ret = ret;

    qemu_coroutine_enter(co->co, NULL);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static void *thread_function(void *data)
+
+{

     GMainLoop *loop;

static void *thread_function(void *data)

{

    GMainLoop *loop;

    loop = g_main_loop_new(NULL, FALSE);

    g_main_loop_run(loop);

    return NULL;

}


--- a/source.c
+++ b/source.c
@@ -5,8 +5,8 @@
     int i;

+
+    for(i=0;i<nsyscalls;i++)

         if( scnames[i].nr == num ) {

print_syscall_ret(int num, abi_long ret)

{

    int i;

    for(i=0;i<nsyscalls;i++)

        if( scnames[i].nr == num ) {

            if( scnames[i].result != NULL ) {

                scnames[i].result(&scnames[i],ret);

            } else {

                if( ret < 0 ) {

                    gemu_log(" = -1 errno=" TARGET_ABI_FMT_ld " (%s)\n", -ret, target_strerror(-ret));

                } else {

                    gemu_log(" = " TARGET_ABI_FMT_ld "\n", ret);

                }

            }

            break;

        }

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static int sdp_probe(AVProbeData *p1)

 {
+
     const char *p = p1->buf, *p_end = p1->buf + p1->buf_size;

static int sdp_probe(AVProbeData *p1)

{

    const char *p = p1->buf, *p_end = p1->buf + p1->buf_size;

    /* we look for a line beginning "c=IN IP" */

    while (p < p_end && *p != '\0') {

        if (p + sizeof("c=IN IP") - 1 < p_end &&

            av_strstart(p, "c=IN IP", NULL))

            return AVPROBE_SCORE_EXTENSION;

        while (p < p_end - 1 && *p != '\n') p++;

        if (++p >= p_end)

            break;

        if (*p == '\r')

            p++;

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -4,14 +4,14 @@

     struct target_sigframe *frame;

+    abi_ulong frame_addr = env->aregs[7] - 4;

     target_sigset_t target_set;

     sigset_t set;

     int d0, i;
+

     if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))

long do_sigreturn(CPUM68KState *env)

{

    struct target_sigframe *frame;

    abi_ulong frame_addr = env->aregs[7] - 4;

    target_sigset_t target_set;

    sigset_t set;

    int d0, i;

    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))

        goto badframe;

    /* set blocked signals */

    if (__get_user(target_set.sig[0], &frame->sc.sc_mask))

        goto badframe;

    for(i = 1; i < TARGET_NSIG_WORDS; i++) {

        if (__get_user(target_set.sig[i], &frame->extramask[i - 1]))

            goto badframe;

    }

    target_to_host_sigset_internal(&set, &target_set);

    do_sigprocmask(SIG_SETMASK, &set, NULL);

    /* restore registers */

    if (restore_sigcontext(env, &frame->sc, &d0))

        goto badframe;

    unlock_user_struct(frame, frame_addr, 0);

    return d0;

badframe:

    unlock_user_struct(frame, frame_addr, 0);

    force_sig(TARGET_SIGSEGV);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -3,8 +3,8 @@
 {

     PCIDevice *dev = PCI_DEVICE(r);
+
+    char *buf;

     int i;

@@ -18,7 +18,7 @@

         DPRINTF("test dma buffer alloc failed");

+        return;

     }

static void rocker_test_dma_ctrl(Rocker *r, uint32_t val)

{

    PCIDevice *dev = PCI_DEVICE(r);

    char *buf;

    int i;

    buf = g_malloc(r->test_dma_size);

    if (!buf) {

        DPRINTF("test dma buffer alloc failed");

        return;

    }

    switch (val) {

    case ROCKER_TEST_DMA_CTRL_CLEAR:

        memset(buf, 0, r->test_dma_size);

        break;

    case ROCKER_TEST_DMA_CTRL_FILL:

        memset(buf, 0x96, r->test_dma_size);

        break;

    case ROCKER_TEST_DMA_CTRL_INVERT:

        pci_dma_read(dev, r->test_dma_addr, buf, r->test_dma_size);

        for (i = 0; i < r->test_dma_size; i++) {

            buf[i] = ~buf[i];

        }

        break;

    default:

        DPRINTF("not test dma control val=0x%08x\n", val);

        goto err_out;

    }

    pci_dma_write(dev, r->test_dma_addr, buf, r->test_dma_size);

    rocker_msix_irq(r, ROCKER_MSIX_VEC_TEST);

err_out:

    g_free(buf);

}


--- a/source.c
+++ b/source.c
@@ -14,7 +14,7 @@

 	if (slirp->m_freelist.m_next == &slirp->m_freelist) {

+		m = (struct mbuf *)malloc(SLIRP_MSIZE);

 		if (m == NULL) goto end_error;

m_get(Slirp *slirp)

{

	register struct mbuf *m;

	int flags = 0;

	DEBUG_CALL("m_get");

	if (slirp->m_freelist.m_next == &slirp->m_freelist) {

		m = (struct mbuf *)malloc(SLIRP_MSIZE);

		if (m == NULL) goto end_error;

		slirp->mbuf_alloced++;

		if (slirp->mbuf_alloced > MBUF_THRESH)

			flags = M_DOFREE;

		m->slirp = slirp;

	} else {

		m = slirp->m_freelist.m_next;

		remque(m);

	}

	/* Insert it in the used list */

	insque(m,&slirp->m_usedlist);

	m->m_flags = (flags | M_USEDLIST);

	/* Initialise it */

	m->m_size = SLIRP_MSIZE - sizeof(struct m_hdr);

	m->m_data = m->m_dat;

	m->m_len = 0;

        m->m_nextpkt = NULL;

        m->m_prevpkt = NULL;

end_error:

	DEBUG_ARG("m = %lx", (long )m);

	return m;

}


--- a/source.c
+++ b/source.c
@@ -1,14 +1,14 @@
+int spapr_vio_check_tces(VIOsPAPRDevice *dev, target_ulong ioba,
+
+                         target_ulong len, enum VIOsPAPR_TCEAccess access)
+
+{
+
+    int start, end, i;
+

+    start = ioba >> SPAPR_VIO_TCE_PAGE_SHIFT;

     end = (ioba + len - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT;

int spapr_vio_check_tces(VIOsPAPRDevice *dev, target_ulong ioba,

                         target_ulong len, enum VIOsPAPR_TCEAccess access)

{

    int start, end, i;

    start = ioba >> SPAPR_VIO_TCE_PAGE_SHIFT;

    end = (ioba + len - 1) >> SPAPR_VIO_TCE_PAGE_SHIFT;

    for (i = start; i <= end; i++) {

        if ((dev->rtce_table[i].tce & access) != access) {

#ifdef DEBUG_TCE

            fprintf(stderr, "FAIL on %d\n", i);

#endif

            return -1;

        }

    }

    return 0;

}


static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom)

{

    int64_t start;

    int i, nb_chapters, str_len, version;

    char str[256+1];

    if ((atom.size -= 5) < 0)

        return 0;

    version = avio_r8(pb);

    avio_rb24(pb);

    if (version)

        avio_rb32(pb); // ???

    nb_chapters = avio_r8(pb);

    for (i = 0; i < nb_chapters; i++) {

        if (atom.size < 9)

            return 0;

        start = avio_rb64(pb);

        str_len = avio_r8(pb);

        if ((atom.size -= 9+str_len) < 0)

            return 0;

        avio_read(pb, str, str_len);

        str[str_len] = 0;

        avpriv_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str);

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@

     if (!bkt->max) {
+
+        /* If bkt->max is 0 we still want to allow short bursts of I/O
+
+         * from the guest, otherwise every other request will be throttled
+
          * and performance will suffer considerably. */

         bucket_size = (double) bkt->avg / 10;

int64_t throttle_compute_wait(LeakyBucket *bkt)

{

    double extra; /* the number of extra units blocking the io */

    double bucket_size;   /* I/O before throttling to bkt->avg */

    double burst_bucket_size; /* Before throttling to bkt->max */

    if (!bkt->avg) {

        return 0;

    }

    if (!bkt->max) {

        /* If bkt->max is 0 we still want to allow short bursts of I/O

         * from the guest, otherwise every other request will be throttled

         * and performance will suffer considerably. */

        bucket_size = (double) bkt->avg / 10;

        burst_bucket_size = 0;

    } else {

        /* If we have a burst limit then we have to wait until all I/O

         * at burst rate has finished before throttling to bkt->avg */

        bucket_size = bkt->max * bkt->burst_length;

        burst_bucket_size = (double) bkt->max / 10;

    }

    /* If the main bucket is full then we have to wait */

    extra = bkt->level - bucket_size;

    if (extra > 0) {

        return throttle_do_compute_wait(bkt->avg, extra);

    }

    /* If the main bucket is not full yet we still have to check the

     * burst bucket in order to enforce the burst limit */

    if (bkt->burst_length > 1) {

        extra = bkt->burst_level - burst_bucket_size;

        if (extra > 0) {

            return throttle_do_compute_wait(bkt->max, extra);

        }

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
+static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)
+
+{
+
+    unsigned int head;
+

+
     /* Grab the next descriptor number they're advertising, and increment

      * the index we've seen. */

static unsigned int virtqueue_get_head(VirtQueue *vq, unsigned int idx)

{

    unsigned int head;

    /* Grab the next descriptor number they're advertising, and increment

     * the index we've seen. */

    head = vring_avail_ring(vq, idx % vq->vring.num);

    /* If their number is silly, that's a fatal mistake. */

    if (head >= vq->vring.num) {

        error_report("Guest says index %u is available", head);

        exit(1);

    }

    return head;

}


--- a/source.c
+++ b/source.c
@@ -12,11 +12,11 @@

         if (se->vmsd == vmsd && se->opaque == opaque) {

+            QTAILQ_REMOVE(&savevm_handlers, se, entry);
+
+
+
+
             qemu_free(se);

void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,

                        void *opaque)

{

    SaveStateEntry *se, *new_se;

    QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {

        if (se->vmsd == vmsd && se->opaque == opaque) {

            QTAILQ_REMOVE(&savevm_handlers, se, entry);

            qemu_free(se);


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

 {

+    long shift;

     int index;

static void spapr_reset_htab(sPAPRMachineState *spapr)

{

    long shift;

    int index;

    shift = kvmppc_reset_htab(spapr->htab_shift);

    if (shift > 0) {

        if (shift != spapr->htab_shift) {

            error_setg(&error_abort, "Requested HTAB allocation failed during reset");

        }

        /* Tell readers to update their file descriptor */

        if (spapr->htab_fd >= 0) {

            spapr->htab_fd_stale = true;

        }

    } else {

        memset(spapr->htab, 0, HTAB_SIZE(spapr));

        for (index = 0; index < HTAB_SIZE(spapr) / HASH_PTE_SIZE_64; index++) {

            DIRTY_HPTE(HPTE(spapr->htab, index));

        }

    }

    /* Update the RMA size if necessary */

    if (spapr->vrma_adjust) {

        spapr->rma_size = kvmppc_rma_size(spapr_node0_size(),

                                          spapr->htab_shift);

    }

}


--- a/source.c
+++ b/source.c
@@ -5,11 +5,11 @@
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);

     AVPicture dummy_pict;
+
+    int ret;
+
+
+

     if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)

int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)

{

    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);

    AVPicture dummy_pict;

    int ret;

    if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)

        return ret;

    if (desc->flags & PIX_FMT_PSEUDOPAL)

        // do not include palette for these pseudo-paletted formats

        return width * height;

    return avpicture_fill(&dummy_pict, NULL, pix_fmt, width, height);

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static inline void json_print_item_str(WriterContext *wctx,
+
+                                       const char *key, const char *value,
+
+                                       const char *indent)
+
 {

     char *key_esc = json_escape_str(key);

static inline void json_print_item_str(WriterContext *wctx,

                                       const char *key, const char *value,

                                       const char *indent)

{

    char *key_esc = json_escape_str(key);

    char *value_esc = json_escape_str(value);

    printf("%s\"%s\": \"%s\"", indent,

           key_esc   ? key_esc   : "",

           value_esc ? value_esc : "");

    av_free(key_esc);

    av_free(value_esc);

}


--- a/source.c
+++ b/source.c
@@ -10,11 +10,11 @@

     QList *qlist;

+    QString *qstr;
+
+
+
+    qdict = keyval_parse("a.0=null,a.1=1", NULL, &error_abort);

     v = qobject_input_visitor_new_keyval(QOBJECT(qdict));

static void test_keyval_visit_any(void)

{

    Visitor *v;

    QDict *qdict;

    QObject *any;

    QList *qlist;

    QString *qstr;

    qdict = keyval_parse("a.0=null,a.1=1", NULL, &error_abort);

    v = qobject_input_visitor_new_keyval(QOBJECT(qdict));

    QDECREF(qdict);

    visit_start_struct(v, NULL, NULL, 0, &error_abort);

    visit_type_any(v, "a", &any, &error_abort);

    qlist = qobject_to_qlist(any);

    g_assert(qlist);

    qstr = qobject_to_qstring(qlist_pop(qlist));

    g_assert_cmpstr(qstring_get_str(qstr), ==, "null");

    qstr = qobject_to_qstring(qlist_pop(qlist));

    g_assert_cmpstr(qstring_get_str(qstr), ==, "1");

    g_assert(qlist_empty(qlist));

    visit_check_struct(v, &error_abort);

    visit_end_struct(v, NULL);

    visit_free(v);

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
+static bool tlb_is_dirty_ram(CPUTLBEntry *tlbe)
+
 {

     return (tlbe->addr_write & (TLB_INVALID_MASK|TLB_MMIO|TLB_NOTDIRTY)) == 0;

static bool tlb_is_dirty_ram(CPUTLBEntry *tlbe)

{

    return (tlbe->addr_write & (TLB_INVALID_MASK|TLB_MMIO|TLB_NOTDIRTY)) == 0;

}


--- a/source.c
+++ b/source.c
@@ -1,13 +1,13 @@
+static void adb_mouse_class_init(ObjectClass *oc, void *data)
+
+{
+
+    DeviceClass *dc = DEVICE_CLASS(oc);
+
+    ADBDeviceClass *adc = ADB_DEVICE_CLASS(oc);
+
+    ADBMouseClass *amc = ADB_MOUSE_CLASS(oc);
+

     amc->parent_realize = dc->realize;

static void adb_mouse_class_init(ObjectClass *oc, void *data)

{

    DeviceClass *dc = DEVICE_CLASS(oc);

    ADBDeviceClass *adc = ADB_DEVICE_CLASS(oc);

    ADBMouseClass *amc = ADB_MOUSE_CLASS(oc);

    amc->parent_realize = dc->realize;

    dc->realize = adb_mouse_realizefn;

    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);

    adc->devreq = adb_mouse_request;

    dc->reset = adb_mouse_reset;

    dc->vmsd = &vmstate_adb_mouse;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static always_inline void gen_op_subfeo (void)
+
 {
+
     gen_op_move_T2_T0();

     gen_op_subfe();

static always_inline void gen_op_subfeo (void)

{

    gen_op_move_T2_T0();

    gen_op_subfe();

    gen_op_check_subfo();

}


--- a/source.c
+++ b/source.c
@@ -12,7 +12,7 @@

+    /* FCode ROM */

     vmstate_register_ram_global(&s->rom);

static void cg3_realizefn(DeviceState *dev, Error **errp)

{

    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);

    CG3State *s = CG3(dev);

    int ret;

    char *fcode_filename;

    /* FCode ROM */

    vmstate_register_ram_global(&s->rom);

    fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, CG3_ROM_FILE);

    if (fcode_filename) {

        ret = load_image_targphys(fcode_filename, s->prom_addr,

                                  FCODE_MAX_ROM_SIZE);

        g_free(fcode_filename);

        if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {

            error_report("cg3: could not load prom '%s'", CG3_ROM_FILE);

        }

    }

    memory_region_init_ram(&s->vram_mem, NULL, "cg3.vram", s->vram_size,

                           &error_abort);

    memory_region_set_log(&s->vram_mem, true, DIRTY_MEMORY_VGA);

    vmstate_register_ram_global(&s->vram_mem);

    sysbus_init_mmio(sbd, &s->vram_mem);

    sysbus_init_irq(sbd, &s->irq);

    s->con = graphic_console_init(DEVICE(dev), 0, &cg3_ops, s);

    qemu_console_resize(s->con, s->width, s->height);

}


--- a/source.c
+++ b/source.c
@@ -3,11 +3,11 @@
                                      struct virtio_gpu_ctrl_command *cmd)

 {
+
+    struct virtio_gpu_resource_unref unref;
+
+
+

     VIRTIO_GPU_FILL_CMD(unref);

static void virgl_cmd_resource_unref(VirtIOGPU *g,

                                     struct virtio_gpu_ctrl_command *cmd)

{

    struct virtio_gpu_resource_unref unref;

    VIRTIO_GPU_FILL_CMD(unref);

    trace_virtio_gpu_cmd_res_unref(unref.resource_id);

    virgl_renderer_resource_unref(unref.resource_id);


--- a/source.c
+++ b/source.c
@@ -4,7 +4,7 @@

     /* Automatically send CMD12 to stop transfer if AutoCMD12 enabled */

+    if ((s->trnmod & SDHC_TRNS_ACMD12) != 0) {

         SDRequest request;

static void sdhci_end_transfer(SDHCIState *s)

{

    /* Automatically send CMD12 to stop transfer if AutoCMD12 enabled */

    if ((s->trnmod & SDHC_TRNS_ACMD12) != 0) {

        SDRequest request;

        uint8_t response[16];

        request.cmd = 0x0C;

        request.arg = 0;

        DPRINT_L1("Automatically issue CMD%d %08x\n", request.cmd, request.arg);

        sdbus_do_command(&s->sdbus, &request, response);

        /* Auto CMD12 response goes to the upper Response register */

        s->rspreg[3] = (response[0] << 24) | (response[1] << 16) |

                (response[2] << 8) | response[3];

    }

    s->prnsts &= ~(SDHC_DOING_READ | SDHC_DOING_WRITE |

            SDHC_DAT_LINE_ACTIVE | SDHC_DATA_INHIBIT |

            SDHC_SPACE_AVAILABLE | SDHC_DATA_AVAILABLE);

    if (s->norintstsen & SDHC_NISEN_TRSCMP) {

        s->norintsts |= SDHC_NIS_TRSCMP;

    }

    sdhci_update_irq(s);

}


--- a/source.c
+++ b/source.c
@@ -4,7 +4,7 @@

     SCSIGenericReq *r = (SCSIGenericReq *)opaque;

+    SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);

static void scsi_command_complete(void *opaque, int ret)

{

    SCSIGenericReq *r = (SCSIGenericReq *)opaque;

    SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);

    r->req.aiocb = NULL;

    s->driver_status = r->io_header.driver_status;

    if (s->driver_status & SG_ERR_DRIVER_SENSE)

        s->senselen = r->io_header.sb_len_wr;

    if (ret != 0)

        r->req.status = BUSY;

    else {

        if (s->driver_status & SG_ERR_DRIVER_TIMEOUT) {

            r->req.status = BUSY;

            BADF("Driver Timeout\n");

        } else if (r->io_header.status)

            r->req.status = r->io_header.status;

        else if (s->driver_status & SG_ERR_DRIVER_SENSE)

            r->req.status = CHECK_CONDITION;

        else

            r->req.status = GOOD;

    }

    DPRINTF("Command complete 0x%p tag=0x%x status=%d\n",

            r, r->req.tag, r->req.status);

    scsi_req_complete(&r->req);

}


--- a/source.c
+++ b/source.c
@@ -13,10 +13,10 @@
                  * to provide a little bit of consistency for
                  * the command line */
                 error_report("invalid argument for obsolete");
+        if (seccomp_start(seccomp_opts) < 0) {
+            error_report("failed to install seccomp syscall filter "
+                         "in the kernel");
+#else
+        error_report("seccomp support is disabled");
 #endif
     return 0;

static int parse_sandbox(void *opaque, QemuOpts *opts, Error **errp)
{
    if (qemu_opt_get_bool(opts, "enable", false)) {
#ifdef CONFIG_SECCOMP
        uint32_t seccomp_opts = QEMU_SECCOMP_SET_DEFAULT
                | QEMU_SECCOMP_SET_OBSOLETE;
        const char *value = NULL;
        value = qemu_opt_get(opts, "obsolete");
            if (g_str_equal(value, "allow")) {
                seccomp_opts &= ~QEMU_SECCOMP_SET_OBSOLETE;
            } else if (g_str_equal(value, "deny")) {
                /* this is the default option, this if is here
                 * to provide a little bit of consistency for
                 * the command line */
                error_report("invalid argument for obsolete");
        if (seccomp_start(seccomp_opts) < 0) {
            error_report("failed to install seccomp syscall filter "
                         "in the kernel");
#else
        error_report("seccomp support is disabled");
#endif
    return 0;


--- a/source.c
+++ b/source.c
@@ -9,7 +9,7 @@
     switch (buf[0]) {

     case REPORT_LUNS:
+
         if (!scsi_target_emulate_report_luns(r)) {

             goto illegal_request;

static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)

{

    SCSITargetReq *r = DO_UPCAST(SCSITargetReq, req, req);

    switch (buf[0]) {

    case REPORT_LUNS:

        if (!scsi_target_emulate_report_luns(r)) {

            goto illegal_request;

        }

        break;

    case INQUIRY:

        if (!scsi_target_emulate_inquiry(r)) {

            goto illegal_request;

        }

        break;

    case REQUEST_SENSE:

        r->len = scsi_device_get_sense(r->req.dev, r->buf,

                                       MIN(req->cmd.xfer, sizeof r->buf),

                                       (req->cmd.buf[1] & 1) == 0);

        if (r->req.dev->sense_is_ua) {

            scsi_device_unit_attention_reported(req->dev);

            r->req.dev->sense_len = 0;

            r->req.dev->sense_is_ua = false;

        }

        break;

    default:

        scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED));

        scsi_req_complete(req, CHECK_CONDITION);

        return 0;

    illegal_request:

        scsi_req_build_sense(req, SENSE_CODE(INVALID_FIELD));

        scsi_req_complete(req, CHECK_CONDITION);

        return 0;

    }

    if (!r->len) {

        scsi_req_complete(req, GOOD);

    }

    return r->len;

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@
         err = -ENOENT;
     dfidp = get_fid(pdu, dfid);
     if (dfidp == NULL) {
+        err = -EINVAL;
+    err = v9fs_co_symlink(pdu, dfidp, &name, symname.data, gid, &stbuf);
+    if (err < 0) {
+        goto out;
+    stat_to_qid(&stbuf, &qid);
     err =  pdu_marshal(pdu, offset, "Q", &qid);
     if (err < 0) {
         goto out;

static void v9fs_symlink(void *opaque)
{
    V9fsPDU *pdu = opaque;
    V9fsString name;
    V9fsString symname;
    V9fsFidState *dfidp;
    V9fsQID qid;
    struct stat stbuf;
    int32_t dfid;
    int err = 0;
    gid_t gid;
    size_t offset = 7;
    v9fs_string_init(&name);
    v9fs_string_init(&symname);
    err = pdu_unmarshal(pdu, offset, "dssd", &dfid, &name, &symname, &gid);
    if (err < 0) {
    trace_v9fs_symlink(pdu->tag, pdu->id, dfid, name.data, symname.data, gid);
    if (name_is_illegal(name.data)) {
        err = -ENOENT;
    dfidp = get_fid(pdu, dfid);
    if (dfidp == NULL) {
        err = -EINVAL;
    err = v9fs_co_symlink(pdu, dfidp, &name, symname.data, gid, &stbuf);
    if (err < 0) {
        goto out;
    stat_to_qid(&stbuf, &qid);
    err =  pdu_marshal(pdu, offset, "Q", &qid);
    if (err < 0) {
        goto out;
    err += offset;
    trace_v9fs_symlink_return(pdu->tag, pdu->id,
                              qid.type, qid.version, qid.path);
out:
    put_fid(pdu, dfidp);
out_nofid:
    pdu_complete(pdu, err);
    v9fs_string_free(&name);
    v9fs_string_free(&symname);


--- a/source.c
+++ b/source.c
@@ -26,11 +26,11 @@
                 err = s->ctx.exops.get_st_gen(&s->ctx, path, st_mode,

                                               &v9stat->st_gen);
+
+                if (err < 0) {
+
+                    err = -errno;
+

             });

int v9fs_co_st_gen(V9fsPDU *pdu, V9fsPath *path, mode_t st_mode,

                   V9fsStatDotl *v9stat)

{

    int err = 0;

    V9fsState *s = pdu->s;

    if (v9fs_request_cancelled(pdu)) {

        return -EINTR;

    if (s->ctx.exops.get_st_gen) {

        v9fs_path_read_lock(s);

        v9fs_co_run_in_worker(

            {

                err = s->ctx.exops.get_st_gen(&s->ctx, path, st_mode,

                                              &v9stat->st_gen);

                if (err < 0) {

                    err = -errno;

            });

        v9fs_path_unlock(s);

    return err;


--- a/source.c
+++ b/source.c
@@ -11,7 +11,7 @@
         int fd;

         fd = open(rpath(fs_ctx, path), O_RDONLY);
+
         if (fd == -1) {

             return -1;

static ssize_t local_readlink(FsContext *fs_ctx, const char *path,

        char *buf, size_t bufsz)

{

    ssize_t tsize = -1;

    if (fs_ctx->fs_sm == SM_MAPPED) {

        int fd;

        fd = open(rpath(fs_ctx, path), O_RDONLY);

        if (fd == -1) {

            return -1;

        }

        do {

            tsize = read(fd, (void *)buf, bufsz);

        } while (tsize == -1 && errno == EINTR);

        close(fd);

        return tsize;

    } else if (fs_ctx->fs_sm == SM_PASSTHROUGH) {

        tsize = readlink(rpath(fs_ctx, path), buf, bufsz);

    }

    return tsize;

}


--- a/source.c
+++ b/source.c
@@ -43,11 +43,11 @@

     }

+
+
+    memory_region_init_alias(&nvdimm->nvdimm_mr, OBJECT(dimm),
+
+                             "nvdimm-memory", mr, 0, pmem_size);

     nvdimm->nvdimm_mr.align = align;

static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp)

{

    MemoryRegion *mr = host_memory_backend_get_memory(dimm->hostmem, errp);

    NVDIMMDevice *nvdimm = NVDIMM(dimm);

    uint64_t align, pmem_size, size = memory_region_size(mr);

    align = memory_region_get_alignment(mr);

    pmem_size = size - nvdimm->label_size;

    nvdimm->label_data = memory_region_get_ram_ptr(mr) + pmem_size;

    pmem_size = QEMU_ALIGN_DOWN(pmem_size, align);

    if (size <= nvdimm->label_size || !pmem_size) {

        HostMemoryBackend *hostmem = dimm->hostmem;

        char *path = object_get_canonical_path_component(OBJECT(hostmem));

        error_setg(errp, "the size of memdev %s (0x%" PRIx64 ") is too "

                   "small to contain nvdimm label (0x%" PRIx64 ") and "

                   "aligned PMEM (0x%" PRIx64 ")",

                   path, memory_region_size(mr), nvdimm->label_size, align);

        return;

    }

    memory_region_init_alias(&nvdimm->nvdimm_mr, OBJECT(dimm),

                             "nvdimm-memory", mr, 0, pmem_size);

    nvdimm->nvdimm_mr.align = align;

}


--- a/source.c
+++ b/source.c
@@ -4,18 +4,18 @@

     WAVState *wav = opaque;

+    uint8_t rlen[4];

     uint8_t dlen[4];
+
+    uint32_t datalen = wav->bytes;
+
+    uint32_t rifflen = datalen + 36;
+
+
+
+    if (!wav->f) {
+
         return;

     }

static void wav_destroy (void *opaque)

{

    WAVState *wav = opaque;

    uint8_t rlen[4];

    uint8_t dlen[4];

    uint32_t datalen = wav->bytes;

    uint32_t rifflen = datalen + 36;

    if (!wav->f) {

        return;

    }

    le_store (rlen, rifflen, 4);

    le_store (dlen, datalen, 4);

    qemu_fseek (wav->f, 4, SEEK_SET);

    qemu_put_buffer (wav->f, rlen, 4);

    qemu_fseek (wav->f, 32, SEEK_CUR);

    qemu_put_buffer (wav->f, dlen, 4);

    qemu_fclose (wav->f);

    if (wav->path) {

        qemu_free (wav->path);

    }

}


--- a/source.c
+++ b/source.c
@@ -4,21 +4,21 @@

     const void *val;

+    int err;

     int allow;

+

     err = sasl_getprop(vs->sasl.conn, SASL_USERNAME, &val);
+
     if (err != SASL_OK) {

+        VNC_DEBUG("cannot query SASL username on connection %d (%s), denying access\n",

                   err, sasl_errstring(err, NULL, NULL));

+        return -1;

     }

static int vnc_auth_sasl_check_access(VncState *vs)

{

    const void *val;

    int err;

    int allow;

    err = sasl_getprop(vs->sasl.conn, SASL_USERNAME, &val);

    if (err != SASL_OK) {

        VNC_DEBUG("cannot query SASL username on connection %d (%s), denying access\n",

                  err, sasl_errstring(err, NULL, NULL));

        return -1;

    }

    if (val == NULL) {

        VNC_DEBUG("no client username was found, denying access\n");

        return -1;

    }

    VNC_DEBUG("SASL client username %s\n", (const char *)val);

    vs->sasl.username = g_strdup((const char*)val);

    if (vs->vd->sasl.acl == NULL) {

        VNC_DEBUG("no ACL activated, allowing access\n");

        return 0;

    }

    allow = qemu_acl_party_is_allowed(vs->vd->sasl.acl, vs->sasl.username);

    VNC_DEBUG("SASL client %s %s by ACL\n", vs->sasl.username,

              allow ? "allowed" : "denied");

    return allow ? 0 : -1;

}


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

 {

+    char *cli;

     QDict *resp;

static void test_query_cpus(const void *data)

{

    char *cli;

    QDict *resp;

    QList *cpus;

    const QObject *e;

    cli = make_cli(data, "-smp 8 -numa node,cpus=0-3 -numa node,cpus=4-7");

    qtest_start(cli);

    cpus = get_cpus(&resp);

    g_assert(cpus);

    while ((e = qlist_pop(cpus))) {

        QDict *cpu, *props;

        int64_t cpu_idx, node;

        cpu = qobject_to_qdict(e);

        g_assert(qdict_haskey(cpu, "CPU"));

        g_assert(qdict_haskey(cpu, "props"));

        cpu_idx = qdict_get_int(cpu, "CPU");

        props = qdict_get_qdict(cpu, "props");

        g_assert(qdict_haskey(props, "node-id"));

        node = qdict_get_int(props, "node-id");

        if (cpu_idx >= 0 && cpu_idx < 4) {

            g_assert_cmpint(node, ==, 0);

        } else {

            g_assert_cmpint(node, ==, 1);

        }

    }

    QDECREF(resp);

    qtest_end();

    g_free(cli);

}


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

         int *need_next_header, int *new_frame_start)

+{

     int err;

static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,

        int *need_next_header, int *new_frame_start)

{

    int err;

    union {

        uint64_t u64;

        uint8_t  u8[8];

    } tmp = { av_be2ne64(state) };

    AC3HeaderInfo hdr, *phdr = &hdr;

    GetBitContext gbc;

    init_get_bits(&gbc, tmp.u8+8-AC3_HEADER_SIZE, 54);

    err = avpriv_ac3_parse_header2(&gbc, &phdr);

    if(err < 0)

        return 0;

    hdr_info->sample_rate = hdr.sample_rate;

    hdr_info->bit_rate = hdr.bit_rate;

    hdr_info->channels = hdr.channels;

    hdr_info->channel_layout = hdr.channel_layout;

    hdr_info->samples = hdr.num_blocks * 256;

    hdr_info->service_type = hdr.bitstream_mode;

    if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)

        hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;

    if(hdr.bitstream_id>10)

        hdr_info->codec_id = AV_CODEC_ID_EAC3;

    else if (hdr_info->codec_id == AV_CODEC_ID_NONE)

        hdr_info->codec_id = AV_CODEC_ID_AC3;

    *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);

    *new_frame_start  = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);

    return hdr.frame_size;

}


--- a/source.c
+++ b/source.c
@@ -21,11 +21,11 @@
         /* Only override when we know what the host supports */

         alter_insns(&pcc->insns_flags, PPC_ALTIVEC, vmx > 0);
+
+        alter_insns(&pcc->insns_flags2, PPC2_VSX, vmx > 1);
+
+    }
+
     if (dfp != -1) {

         /* Only override when we know what the host supports */

static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)

{

    PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);

    uint32_t vmx = kvmppc_get_vmx();

    uint32_t dfp = kvmppc_get_dfp();

    /* Now fix up the class with information we can query from the host */

    if (vmx != -1) {

        /* Only override when we know what the host supports */

        alter_insns(&pcc->insns_flags, PPC_ALTIVEC, vmx > 0);

        alter_insns(&pcc->insns_flags2, PPC2_VSX, vmx > 1);

    }

    if (dfp != -1) {

        /* Only override when we know what the host supports */

        alter_insns(&pcc->insns_flags2, PPC2_DFP, dfp);

    }

    if (dcache_size != -1) {

        pcc->l1_dcache_size = dcache_size;

    }

    if (icache_size != -1) {

        pcc->l1_icache_size = icache_size;

    }

}


--- a/source.c
+++ b/source.c
@@ -6,9 +6,9 @@
     if (s->streams[0]->codec->pix_fmt == PIX_FMT_YUV411P) {
         av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV stream, some mjpegtools might not work.\n");
     else if ((s->streams[0]->codec->pix_fmt != PIX_FMT_YUV420P) &&
+             (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV422P) &&
+             (s->streams[0]->codec->pix_fmt != PIX_FMT_GRAY8) &&
+             (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV444P)) {
         av_log(s, AV_LOG_ERROR, "ERROR: yuv4mpeg only handles yuv444p, yuv422p, yuv420p, yuv411p and gray pixel formats. Use -pix_fmt to select one.\n");
         return AVERROR(EIO);
     *first_pkt = 1;

static int yuv4_write_header(AVFormatContext *s)
{
    int* first_pkt = s->priv_data;
    if (s->nb_streams != 1)
        return AVERROR(EIO);
    if (s->streams[0]->codec->pix_fmt == PIX_FMT_YUV411P) {
        av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV stream, some mjpegtools might not work.\n");
    else if ((s->streams[0]->codec->pix_fmt != PIX_FMT_YUV420P) &&
             (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV422P) &&
             (s->streams[0]->codec->pix_fmt != PIX_FMT_GRAY8) &&
             (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV444P)) {
        av_log(s, AV_LOG_ERROR, "ERROR: yuv4mpeg only handles yuv444p, yuv422p, yuv420p, yuv411p and gray pixel formats. Use -pix_fmt to select one.\n");
        return AVERROR(EIO);
    *first_pkt = 1;
    return 0;


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

                           uint64_t value, unsigned size)

+{

     icp_pit_state *s = (icp_pit_state *)opaque;

static void icp_pit_write(void *opaque, target_phys_addr_t offset,

                          uint64_t value, unsigned size)

{

    icp_pit_state *s = (icp_pit_state *)opaque;

    int n;

    n = offset >> 8;

    if (n > 3) {

        hw_error("sp804_write: Bad timer %d\n", n);

    }

    arm_timer_write(s->timer[n], offset & 0xff, value);

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static void FUNCC(pred4x4_128_dc)(uint8_t *_src, const uint8_t *topright, int _stride){

     pixel *src = (pixel*)_src;
+
     int stride = _stride/sizeof(pixel);

     ((pixel4*)(src+0*stride))[0]=

static void FUNCC(pred4x4_128_dc)(uint8_t *_src, const uint8_t *topright, int _stride){

    pixel *src = (pixel*)_src;

    int stride = _stride/sizeof(pixel);

    ((pixel4*)(src+0*stride))[0]=

    ((pixel4*)(src+1*stride))[0]=

    ((pixel4*)(src+2*stride))[0]=

    ((pixel4*)(src+3*stride))[0]= PIXEL_SPLAT_X4(1<<(BIT_DEPTH-1));

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static void sync_c0_tcstatus(CPUMIPSState *cpu, int tc,

                              target_ulong v)
+
 {

     uint32_t status;

static void sync_c0_tcstatus(CPUMIPSState *cpu, int tc,

                             target_ulong v)

{

    uint32_t status;

    uint32_t tcu, tmx, tasid, tksu;

    uint32_t mask = ((1 << CP0St_CU3)

                       | (1 << CP0St_CU2)

                       | (1 << CP0St_CU1)

                       | (1 << CP0St_CU0)

                       | (1 << CP0St_MX)

                       | (3 << CP0St_KSU));

    tcu = (v >> CP0TCSt_TCU0) & 0xf;

    tmx = (v >> CP0TCSt_TMX) & 0x1;

    tasid = v & 0xff;

    tksu = (v >> CP0TCSt_TKSU) & 0x3;

    status = tcu << CP0St_CU0;

    status |= tmx << CP0St_MX;

    status |= tksu << CP0St_KSU;

    cpu->CP0_Status &= ~mask;

    cpu->CP0_Status |= status;

    /* Sync the TASID with EntryHi.  */

    cpu->CP0_EntryHi &= ~0xff;

    cpu->CP0_EntryHi = tasid;

    compute_hflags(cpu);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
+static int bdrv_rd_badreq_bytes(BlockDriverState *bs,
+
+                                int64_t offset, int count)

 {

static int bdrv_rd_badreq_bytes(BlockDriverState *bs,

                                int64_t offset, int count)

{

    int64_t size = bs->total_sectors << SECTOR_BITS;

    return

        count < 0 ||

        size < 0 ||

        count > size ||

        offset > size - count;

}


void do_addmeo (void)

{

    T1 = T0;

    T0 += xer_ca + (-1);

    if (likely(!((uint32_t)T1 &

                 ((uint32_t)T1 ^ (uint32_t)T0) & (1UL << 31)))) {

        xer_ov = 0;

    } else {

        xer_ov = 1;

        xer_so = 1;

    }

    if (likely(T1 != 0))

        xer_ca = 1;

}


get_field (const unsigned char *data, enum floatformat_byteorders order,

           unsigned int total_len, unsigned int start, unsigned int len)

{

  unsigned long result;

  unsigned int cur_byte;

  int cur_bitshift;

  /* Start at the least significant part of the field.  */

  cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;

  if (order == floatformat_little)

    cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;

  cur_bitshift =

    ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;

  result = *(data + cur_byte) >> (-cur_bitshift);

  cur_bitshift += FLOATFORMAT_CHAR_BIT;

  if (order == floatformat_little)

    ++cur_byte;

  else

    --cur_byte;

  /* Move towards the most significant part of the field.  */

  while ((unsigned int) cur_bitshift < len)

    {

      if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)

	/* This is the last byte; zero out the bits which are not part of

	   this field.  */

	result |=

	  (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))

	    << cur_bitshift;

      else

	result |= *(data + cur_byte) << cur_bitshift;

      cur_bitshift += FLOATFORMAT_CHAR_BIT;

      if (order == floatformat_little)

	++cur_byte;

      else

	--cur_byte;

    }

  return result;

}


--- a/source.c
+++ b/source.c
@@ -10,11 +10,11 @@

         error_setg(errp, "filter filter mirror needs 'outdev' "

+                   "property set");
+
+        return;
+
+    }

static void filter_mirror_setup(NetFilterState *nf, Error **errp)

{

    MirrorState *s = FILTER_MIRROR(nf);

    if (!s->outdev) {

        error_setg(errp, "filter filter mirror needs 'outdev' "

                   "property set");

        return;

    }

    s->chr_out = qemu_chr_find(s->outdev);

    if (s->chr_out == NULL) {

        error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,

                  "Device '%s' not found", s->outdev);

        return;

    }

    if (qemu_chr_fe_claim(s->chr_out) != 0) {

        error_setg(errp, QERR_DEVICE_IN_USE, s->outdev);

        return;

    }

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@
 #endif

     } else {
+
+        qxl->ssd.worker->destroy_surface_wait(qxl->ssd.worker, id);
+
+        qxl_spice_destroy_surface_wait_complete(qxl, id);
+
     }

 }

static void qxl_spice_destroy_surface_wait(PCIQXLDevice *qxl, uint32_t id,

                                           qxl_async_io async)

{

    if (async) {

#if SPICE_INTERFACE_QXL_MINOR < 1

        abort();

#else

        spice_qxl_destroy_surface_async(&qxl->ssd.qxl, id,

                                        (uint64_t)id);

#endif

    } else {

        qxl->ssd.worker->destroy_surface_wait(qxl->ssd.worker, id);

        qxl_spice_destroy_surface_wait_complete(qxl, id);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static void sdl_resize(DisplayState *ds, int w, int h)

 {
+
+    int flags;
+
+
+
     //    printf("resizing to %d %d\n", w, h);

static void sdl_resize(DisplayState *ds, int w, int h)

{

    int flags;

    //    printf("resizing to %d %d\n", w, h);

    flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;

    flags |= SDL_RESIZABLE;

    if (gui_fullscreen)

        flags |= SDL_FULLSCREEN;

    screen = SDL_SetVideoMode(w, h, 0, flags);

    if (!screen) {

        fprintf(stderr, "Could not open SDL display\n");

        exit(1);

    }

    ds->data = screen->pixels;

    ds->linesize = screen->pitch;

    ds->depth = screen->format->BitsPerPixel;

    ds->width = w;

    ds->height = h;

}


--- a/source.c
+++ b/source.c
@@ -3,7 +3,7 @@
     s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr);

     s->checksum_ptr= NULL;
+
+    return s->checksum;

 }

unsigned long get_checksum(ByteIOContext *s){

    s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr);

    s->checksum_ptr= NULL;

    return s->checksum;

}


--- a/source.c
+++ b/source.c
@@ -8,11 +8,11 @@

     uint8_t v;

+    if (port < s->pio.size) {
+
+        v = readb(s->pio_cpu_base + port);
+
+    } else {

         v = readb(s->mmio_cpu_base + port);

static uint8_t qpci_spapr_io_readb(QPCIBus *bus, void *addr)

{

    QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);

    uint64_t port = (uintptr_t)addr;

    uint8_t v;

    if (port < s->pio.size) {

        v = readb(s->pio_cpu_base + port);

    } else {

        v = readb(s->mmio_cpu_base + port);

    }

    return v;

}


--- a/source.c
+++ b/source.c
@@ -8,10 +8,10 @@

         tb_invalidate_phys_range(addr, addr + length, 0);

+        cpu_physical_memory_set_dirty_range_nocode(addr, length);
+
+    }
+
     xen_modified_memory(addr, length);

 }

static void invalidate_and_set_dirty(hwaddr addr,

                                     hwaddr length)

{

    if (cpu_physical_memory_range_includes_clean(addr, length)) {

        tb_invalidate_phys_range(addr, addr + length, 0);

        cpu_physical_memory_set_dirty_range_nocode(addr, length);

    }

    xen_modified_memory(addr, length);

}


--- a/source.c
+++ b/source.c
@@ -4,9 +4,9 @@

     ar->wakeup.notify = acpi_notify_wakeup;

+    qemu_register_wakeup_notifier(&ar->wakeup);
+
+    memory_region_init_io(&ar->pm1.cnt.io, &acpi_pm_cnt_ops, ar, "acpi-cnt", 2);

     memory_region_add_subregion(parent, 4, &ar->pm1.cnt.io);

void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent)

{

    ar->wakeup.notify = acpi_notify_wakeup;

    qemu_register_wakeup_notifier(&ar->wakeup);

    memory_region_init_io(&ar->pm1.cnt.io, &acpi_pm_cnt_ops, ar, "acpi-cnt", 2);

    memory_region_add_subregion(parent, 4, &ar->pm1.cnt.io);

}


static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale)

{

    if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {

        const int strength = ff_h263_loop_filter_strength[qscale];

        __asm__ volatile (

            H263_LOOP_FILTER

            "movq %%mm3, %1             \n\t"

            "movq %%mm4, %2             \n\t"

            "movq %%mm5, %0             \n\t"

            "movq %%mm6, %3             \n\t"

            : "+m"(*(uint64_t*)(src - 2 * stride)),

              "+m"(*(uint64_t*)(src - 1 * stride)),

              "+m"(*(uint64_t*)(src + 0 * stride)),

              "+m"(*(uint64_t*)(src + 1 * stride))

            : "g"(2 * strength), "m"(ff_pb_FC)

            );

    }

}


--- a/source.c
+++ b/source.c
@@ -12,11 +12,11 @@

     }

+    /* bbbb   aaaa        */
+
+    if (req->overlap_offset >= offset + bytes) {
+
+        return false;

     }

static bool tracked_request_overlaps(BdrvTrackedRequest *req,

                                     int64_t offset, unsigned int bytes)

{

    /*        aaaa   bbbb */

    if (offset >= req->overlap_offset + req->overlap_bytes) {

        return false;

    }

    /* bbbb   aaaa        */

    if (req->overlap_offset >= offset + bytes) {

        return false;

    }

    return true;

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 void block_job_pause(BlockJob *job)

+{

     job->paused = true;

void block_job_pause(BlockJob *job)

{

    job->paused = true;

}


--- a/source.c
+++ b/source.c
@@ -53,11 +53,11 @@
             wctx->nb_section_packet_frame : wctx->nb_item[wctx->level-1];

         av_bprintf(&buf, ".%d", n);
+
+    }
+
+
+
     if (!(section->flags & (SECTION_FLAG_IS_ARRAY|SECTION_FLAG_IS_WRAPPER)))

         printf("[%s]\n", buf.str);

static void ini_print_section_header(WriterContext *wctx)

{

    INIContext *ini = wctx->priv;

    AVBPrint buf;

    int i;

    const struct section *section = wctx->section[wctx->level];

    const struct section *parent_section = wctx->level ?

        wctx->section[wctx->level-1] : NULL;

    av_bprint_init(&buf, 1, AV_BPRINT_SIZE_UNLIMITED);

    if (wctx->level == 0) {

        printf("# ffprobe output\n\n");

        return;

    }

    if (wctx->nb_item[wctx->level-1])

        printf("\n");

    for (i = 1; i <= wctx->level; i++) {

        if (ini->hierarchical ||

            !(section->flags & (SECTION_FLAG_IS_ARRAY|SECTION_FLAG_IS_WRAPPER)))

            av_bprintf(&buf, "%s%s", i>1 ? "." : "", wctx->section[i]->name);

    }

    if (parent_section->flags & SECTION_FLAG_IS_ARRAY) {

        int n = parent_section->id == SECTION_ID_PACKETS_AND_FRAMES ?

            wctx->nb_section_packet_frame : wctx->nb_item[wctx->level-1];

        av_bprintf(&buf, ".%d", n);

    }

    if (!(section->flags & (SECTION_FLAG_IS_ARRAY|SECTION_FLAG_IS_WRAPPER)))

        printf("[%s]\n", buf.str);

    av_bprint_finalize(&buf, NULL);

}


--- a/source.c
+++ b/source.c
@@ -9,9 +9,9 @@
         QLIST_REMOVE(timer_list, list);

     }
+
+    qemu_mutex_destroy(&timer_list->active_timers_lock);
+
+    g_free(timer_list);

 }

void timerlist_free(QEMUTimerList *timer_list)

{

    assert(!timerlist_has_timers(timer_list));

    if (timer_list->clock) {

        QLIST_REMOVE(timer_list, list);

    }

    qemu_mutex_destroy(&timer_list->active_timers_lock);

    g_free(timer_list);

}


--- a/source.c
+++ b/source.c
@@ -6,10 +6,10 @@

     uint32_t val;

+    PCIBonitoState *s = opaque;
+
+
+
     val = ((uint32_t *)(&s->bonldma))[addr/sizeof(uint32_t)];

static uint64_t bonito_ldma_readl(void *opaque, target_phys_addr_t addr,

                                  unsigned size)

{

    uint32_t val;

    PCIBonitoState *s = opaque;

    val = ((uint32_t *)(&s->bonldma))[addr/sizeof(uint32_t)];

    return val;

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 static inline void celt_encode_pulses(OpusRangeCoder *rc, int *y, uint32_t N, uint32_t K)
+
 {

     ff_opus_rc_enc_uint(rc, celt_icwrsi(N, y), CELT_PVQ_V(N, K));

static inline void celt_encode_pulses(OpusRangeCoder *rc, int *y, uint32_t N, uint32_t K)

{

    ff_opus_rc_enc_uint(rc, celt_icwrsi(N, y), CELT_PVQ_V(N, K));

}


--- a/source.c
+++ b/source.c
@@ -34,10 +34,10 @@

            "When using -nographic, press 'ctrl-a h' to get some help.\n",

+           error_get_progname(),
+
+           options_help);
+
+    exit(exitcode);

 }

static void help(int exitcode)

{

    const char *options_help =

#define QEMU_OPTIONS_GENERATE_HELP

#include "qemu-options-wrapper.h"

        ;

    version();

    printf("usage: %s [options] [disk_image]\n"

           "\n"

           "'disk_image' is a raw hard disk image for IDE hard disk 0\n"

           "\n"

           "%s\n"

           "During emulation, the following keys are useful:\n"

           "ctrl-alt-f      toggle full screen\n"

           "ctrl-alt-n      switch to virtual console 'n'\n"

           "ctrl-alt        toggle mouse and keyboard grab\n"

           "\n"

           "When using -nographic, press 'ctrl-a h' to get some help.\n",

           error_get_progname(),

           options_help);

    exit(exitcode);

}


--- a/source.c
+++ b/source.c
@@ -2,8 +2,8 @@

                                                const void *unused)

+{
+
     test_native_list_integer_helper(data, unused,

                                     USER_DEF_NATIVE_LIST_UNION_KIND_U32);

static void test_visitor_in_native_list_uint32(TestInputVisitorData *data,

                                               const void *unused)

{

    test_native_list_integer_helper(data, unused,

                                    USER_DEF_NATIVE_LIST_UNION_KIND_U32);

}


--- a/source.c
+++ b/source.c
@@ -11,11 +11,11 @@

     if (data->qiv) {
+
+        visit_free(data->qiv);
+
+        data->qiv = NULL;
+
     }

 }

static void validate_teardown(TestInputVisitorData *data,

                               const void *unused)

{

    qobject_decref(data->obj);

    data->obj = NULL;

    if (data->qiv) {

        visit_free(data->qiv);

        data->qiv = NULL;

    }

}


--- a/source.c
+++ b/source.c
@@ -40,11 +40,11 @@

         i++;

+        if (i == index) {
+
+            TAILQ_INSERT_BEFORE(tmp, entry, next);
+
+            acl->nentries++;

             break;

int qemu_acl_insert(qemu_acl *acl,

                    int deny,

                    const char *match,

                    int index)

{

    qemu_acl_entry *entry;

    qemu_acl_entry *tmp;

    int i = 0;

    if (index <= 0)

        return -1;

    if (index >= acl->nentries)

        return qemu_acl_append(acl, deny, match);

    entry = qemu_malloc(sizeof(*entry));

    entry->match = qemu_strdup(match);

    entry->deny = deny;

    TAILQ_FOREACH(tmp, &acl->entries, next) {

        i++;

        if (i == index) {

            TAILQ_INSERT_BEFORE(tmp, entry, next);

            acl->nentries++;

            break;

        }

    }

    return i;

}


--- a/source.c
+++ b/source.c
@@ -3,11 +3,11 @@
                                 const int16_t *chrUSrc, const int16_t *chrVSrc,

                                 const int16_t *alpSrc,
+
+                                uint8_t *dest, uint8_t *uDest, uint8_t *vDest,
+
+                                uint8_t *aDest, int dstW, int chrDstW)
+
 {

     int p= 4;

static void RENAME(yuv2yuv1_ar)(SwsContext *c, const int16_t *lumSrc,

                                const int16_t *chrUSrc, const int16_t *chrVSrc,

                                const int16_t *alpSrc,

                                uint8_t *dest, uint8_t *uDest, uint8_t *vDest,

                                uint8_t *aDest, int dstW, int chrDstW)

{

    int p= 4;

    const int16_t *src[4]= { alpSrc + dstW, lumSrc + dstW, chrUSrc + chrDstW, chrVSrc + chrDstW };

    uint8_t *dst[4]= { aDest, dest, uDest, vDest };

    x86_reg counter[4]= { dstW, dstW, chrDstW, chrDstW };

    while (p--) {

        if (dst[p]) {

            __asm__ volatile(

                "mov %2, %%"REG_a"                    \n\t"

                "pcmpeqw %%mm7, %%mm7                 \n\t"

                "psrlw                 $15, %%mm7     \n\t"

                "psllw                  $6, %%mm7     \n\t"

                ".p2align                4            \n\t" /* FIXME Unroll? */

                "1:                                   \n\t"

                "movq  (%0, %%"REG_a", 2), %%mm0      \n\t"

                "movq 8(%0, %%"REG_a", 2), %%mm1      \n\t"

                "paddsw             %%mm7, %%mm0      \n\t"

                "paddsw             %%mm7, %%mm1      \n\t"

                "psraw                 $7, %%mm0      \n\t"

                "psraw                 $7, %%mm1      \n\t"

                "packuswb           %%mm1, %%mm0      \n\t"

                MOVNTQ(%%mm0, (%1, %%REGa))

                "add                   $8, %%"REG_a"  \n\t"

                "jnc                   1b             \n\t"

                :: "r" (src[p]), "r" (dst[p] + counter[p]),

                   "g" (-counter[p])

                : "%"REG_a

            );

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -5,11 +5,11 @@
                          bool notify_unmap)

 {
+
+    dma_addr_t addr = vtd_ce_get_slpt_base(ce);
+
+    uint32_t level = vtd_ce_get_level(ce);
+

     if (!vtd_iova_range_check(start, ce)) {

static int vtd_page_walk(VTDContextEntry *ce, uint64_t start, uint64_t end,

                         vtd_page_walk_hook hook_fn, void *private,

                         bool notify_unmap)

{

    dma_addr_t addr = vtd_ce_get_slpt_base(ce);

    uint32_t level = vtd_ce_get_level(ce);

    if (!vtd_iova_range_check(start, ce)) {

        return -VTD_FR_ADDR_BEYOND_MGAW;

    }

    if (!vtd_iova_range_check(end, ce)) {

        /* Fix end so that it reaches the maximum */

        end = vtd_iova_limit(ce);

    }

    return vtd_page_walk_level(addr, start, end, hook_fn, private,

                               level, true, true, notify_unmap);

}


--- a/source.c
+++ b/source.c
@@ -42,11 +42,11 @@

     }

+
+
+    BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO);
+
+    ret = bdrv_co_preadv(bs->file, offset, acb->cur_qiov.size,

                          &acb->cur_qiov, 0);

static int coroutine_fn qed_aio_read_data(void *opaque, int ret,

                                          uint64_t offset, size_t len)

{

    QEDAIOCB *acb = opaque;

    BDRVQEDState *s = acb_to_s(acb);

    BlockDriverState *bs = acb->bs;

    /* Adjust offset into cluster */

    offset += qed_offset_into_cluster(s, acb->cur_pos);

    trace_qed_aio_read_data(s, acb, ret, offset, len);

    qemu_iovec_concat(&acb->cur_qiov, acb->qiov, acb->qiov_offset, len);

    /* Handle zero cluster and backing file reads */

    if (ret == QED_CLUSTER_ZERO) {

        qemu_iovec_memset(&acb->cur_qiov, 0, 0, acb->cur_qiov.size);

        return 0;

    } else if (ret != QED_CLUSTER_FOUND) {

        return qed_read_backing_file(s, acb->cur_pos, &acb->cur_qiov,

                                     &acb->backing_qiov);

    }

    BLKDBG_EVENT(bs->file, BLKDBG_READ_AIO);

    ret = bdrv_co_preadv(bs->file, offset, acb->cur_qiov.size,

                         &acb->cur_qiov, 0);

    if (ret < 0) {

        return ret;

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static int io_channel_send_full(QIOChannel *ioc,

                                 const void *buf, size_t len,
+
+                                int *fds, size_t nfds)
+
+{
+
     size_t offset = 0;

static int io_channel_send_full(QIOChannel *ioc,

                                const void *buf, size_t len,

                                int *fds, size_t nfds)

{

    size_t offset = 0;

    while (offset < len) {

        ssize_t ret = 0;

        struct iovec iov = { .iov_base = (char *)buf + offset,

                             .iov_len = len - offset };

        ret = qio_channel_writev_full(

            ioc, &iov, 1,

            fds, nfds, NULL);

        if (ret == QIO_CHANNEL_ERR_BLOCK) {

            errno = EAGAIN;

            return -1;

        } else if (ret < 0) {

            if (offset) {

                return offset;

            }

            errno = EINVAL;

            return -1;

        }

        offset += ret;

    }

    return offset;

}


--- a/source.c
+++ b/source.c
@@ -49,11 +49,11 @@
     case 0x54: /* SCU Non-secure Access Control Register */

         /* unimplemented, fall through */
+
+    default:
+
+        return 0;
+
     }

 }

static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset,

                            unsigned size)

{

    a9mp_priv_state *s = (a9mp_priv_state *)opaque;

    switch (offset) {

    case 0x00: /* Control */

        return s->scu_control;

    case 0x04: /* Configuration */

        return (((1 << s->num_cpu) - 1) << 4) | (s->num_cpu - 1);

    case 0x08: /* CPU Power Status */

        return s->scu_status;

    case 0x09: /* CPU status.  */

        return s->scu_status >> 8;

    case 0x0a: /* CPU status.  */

        return s->scu_status >> 16;

    case 0x0b: /* CPU status.  */

        return s->scu_status >> 24;

    case 0x0c: /* Invalidate All Registers In Secure State */

        return 0;

    case 0x40: /* Filtering Start Address Register */

    case 0x44: /* Filtering End Address Register */

        /* RAZ/WI, like an implementation with only one AXI master */

        return 0;

    case 0x50: /* SCU Access Control Register */

    case 0x54: /* SCU Non-secure Access Control Register */

        /* unimplemented, fall through */

    default:

        return 0;

    }

}


--- a/source.c
+++ b/source.c
@@ -22,11 +22,11 @@

     if (spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PCI &&

+        drc->allocation_state != SPAPR_DR_ALLOCATION_STATE_UNUSABLE) {
+
+        trace_spapr_drc_awaiting_unusable(spapr_drc_index(drc));
+
+        return;

     }

void spapr_drc_detach(sPAPRDRConnector *drc)

{

    trace_spapr_drc_detach(spapr_drc_index(drc));

    drc->unplug_requested = true;

    if (drc->isolation_state != SPAPR_DR_ISOLATION_STATE_ISOLATED) {

        trace_spapr_drc_awaiting_isolated(spapr_drc_index(drc));

        return;

    }

    if (spapr_drc_type(drc) != SPAPR_DR_CONNECTOR_TYPE_PCI &&

        drc->allocation_state != SPAPR_DR_ALLOCATION_STATE_UNUSABLE) {

        trace_spapr_drc_awaiting_unusable(spapr_drc_index(drc));

        return;

    }

    spapr_drc_release(drc);

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 int qemu_can_send_packet(VLANClientState *sender)
+
+{
+
+    VLANState *vlan = sender->vlan;
+
     VLANClientState *vc;

int qemu_can_send_packet(VLANClientState *sender)

{

    VLANState *vlan = sender->vlan;

    VLANClientState *vc;

    for (vc = vlan->first_client; vc != NULL; vc = vc->next) {

        if (vc == sender) {

            continue;

        }

        /* no can_receive() handler, they can always receive */

        if (!vc->can_receive || vc->can_receive(vc->opaque)) {

            return 1;

        }

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static void tc6393xb_gpio_set(void *opaque, int line, int level)

 {
+
+//    TC6393xbState *s = opaque;
+
+
+
     if (line > TC6393XB_GPIOS) {

         printf("%s: No GPIO pin %i\n", __FUNCTION__, line);

static void tc6393xb_gpio_set(void *opaque, int line, int level)

{

//    TC6393xbState *s = opaque;

    if (line > TC6393XB_GPIOS) {

        printf("%s: No GPIO pin %i\n", __FUNCTION__, line);

        return;

    }

    // FIXME: how does the chip reflect the GPIO input level change?

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 static void event_notifier_dummy_cb(EventNotifier *e)
+
 {

 }

static void event_notifier_dummy_cb(EventNotifier *e)

{

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static gboolean pty_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
+
+{
+
+    CharDriverState *chr = opaque;
+
     PtyCharDriver *s = chr->opaque;

     gsize size, len;

static gboolean pty_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)

{

    CharDriverState *chr = opaque;

    PtyCharDriver *s = chr->opaque;

    gsize size, len;

    uint8_t buf[READ_BUF_LEN];

    GIOStatus status;

    len = sizeof(buf);

    if (len > s->read_bytes)

        len = s->read_bytes;

    if (len == 0)

        return FALSE;

    status = g_io_channel_read_chars(s->fd, (gchar *)buf, len, &size, NULL);

    if (status != G_IO_STATUS_NORMAL) {

        pty_chr_state(chr, 0);

        return FALSE;

    } else {

        pty_chr_state(chr, 1);

        qemu_chr_be_write(chr, buf, size);

    }

    return TRUE;

}


--- a/source.c
+++ b/source.c
@@ -10,11 +10,11 @@

             qxl_name(qxl_cursor_cmd, cmd->type));

+    switch (cmd->type) {
+
+    case QXL_CURSOR_SET:
+
+        fprintf(stderr, " +%d+%d visible %s, shape @ 0x%" PRIx64,

                 cmd->u.set.position.x,

void qxl_log_cmd_cursor(PCIQXLDevice *qxl, QXLCursorCmd *cmd, int group_id)

{

    QXLCursor *cursor;

    fprintf(stderr, ": %s",

            qxl_name(qxl_cursor_cmd, cmd->type));

    switch (cmd->type) {

    case QXL_CURSOR_SET:

        fprintf(stderr, " +%d+%d visible %s, shape @ 0x%" PRIx64,

                cmd->u.set.position.x,

                cmd->u.set.position.y,

                cmd->u.set.visible ? "yes" : "no",

                cmd->u.set.shape);

        cursor = qxl_phys2virt(qxl, cmd->u.set.shape, group_id);

        fprintf(stderr, " type %s size %dx%d hot-spot +%d+%d"

                " unique 0x%" PRIx64 " data-size %d",

                qxl_name(spice_cursor_type, cursor->header.type),

                cursor->header.width, cursor->header.height,

                cursor->header.hot_spot_x, cursor->header.hot_spot_y,

                cursor->header.unique, cursor->data_size);

        break;

    case QXL_CURSOR_MOVE:

        fprintf(stderr, " +%d+%d", cmd->u.position.x, cmd->u.position.y);

        break;

    }

}


--- a/source.c
+++ b/source.c
@@ -27,11 +27,11 @@

         if (iscsilun->bl.max_ws_len < 0xffffffff) {
+
+            bs->bl.max_write_zeroes = sector_lun2qemu(iscsilun->bl.max_ws_len,
+
+                                                      iscsilun);
+
         }

         bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,

static int iscsi_refresh_limits(BlockDriverState *bs)

{

    IscsiLun *iscsilun = bs->opaque;

    /* We don't actually refresh here, but just return data queried in

     * iscsi_open(): iscsi targets don't change their limits. */

    if (iscsilun->lbp.lbpu || iscsilun->lbp.lbpws) {

        if (iscsilun->bl.max_unmap < 0xffffffff) {

            bs->bl.max_discard = sector_lun2qemu(iscsilun->bl.max_unmap,

                                                 iscsilun);

        }

        bs->bl.discard_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,

                                                   iscsilun);

        if (iscsilun->bl.max_ws_len < 0xffffffff) {

            bs->bl.max_write_zeroes = sector_lun2qemu(iscsilun->bl.max_ws_len,

                                                      iscsilun);

        }

        bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,

                                                        iscsilun);

        bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len,

                                                     iscsilun);

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -4,11 +4,11 @@

     S390CPU *cpu = S390_CPU(cs);

+    SigpInfo *si = arg.host_ptr;
+
+
+
+    if (s390_cpu_get_state(cpu) != CPU_STATE_OPERATING) {

         si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;

static void sigp_stop(CPUState *cs, run_on_cpu_data arg)

{

    S390CPU *cpu = S390_CPU(cs);

    SigpInfo *si = arg.host_ptr;

    if (s390_cpu_get_state(cpu) != CPU_STATE_OPERATING) {

        si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;

        return;

    }

    /* disabled wait - sleeping in user space */

    if (cs->halted) {

        s390_cpu_set_state(CPU_STATE_STOPPED, cpu);

    } else {

        /* execute the stop function */

        cpu->env.sigp_order = SIGP_STOP;

        cpu_inject_stop(cpu);

    }

    si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
+void ff_put_h264_qpel8_mc13_msa(uint8_t *dst, const uint8_t *src,
+
                                 ptrdiff_t stride)

 {

void ff_put_h264_qpel8_mc13_msa(uint8_t *dst, const uint8_t *src,

                                ptrdiff_t stride)

{

    avc_luma_hv_qrt_8w_msa(src + stride - 2,

                           src - (stride * 2), stride, dst, stride, 8);

}


--- a/source.c
+++ b/source.c
@@ -12,11 +12,11 @@

     }

+
+
+    /* Treat zero as compatibility all valid */
+
+    if (!mr->ops->valid.max_access_size) {

         return true;

static bool memory_region_access_valid(MemoryRegion *mr,

                                       target_phys_addr_t addr,

                                       unsigned size)

{

    if (!mr->ops->valid.unaligned && (addr & (size - 1))) {

        return false;

    }

    /* Treat zero as compatibility all valid */

    if (!mr->ops->valid.max_access_size) {

        return true;

    }

    if (size > mr->ops->valid.max_access_size

        || size < mr->ops->valid.min_access_size) {

        return false;

    }

    return true;

}


--- a/source.c
+++ b/source.c
@@ -8,11 +8,11 @@

     /*

+     * Don't free the fid if it is in reclaim list
+
+     */
+
+    if (!fidp->ref && fidp->clunked) {

         if (fidp->fid == pdu->s->root_fid) {

static void put_fid(V9fsPDU *pdu, V9fsFidState *fidp)

{

    BUG_ON(!fidp->ref);

    fidp->ref--;

    /*

     * Don't free the fid if it is in reclaim list

     */

    if (!fidp->ref && fidp->clunked) {

        if (fidp->fid == pdu->s->root_fid) {

            /*

             * if the clunked fid is root fid then we

             * have unmounted the fs on the client side.

             * delete the migration blocker. Ideally, this

             * should be hooked to transport close notification

             */

            if (pdu->s->migration_blocker) {

                migrate_del_blocker(pdu->s->migration_blocker);

                error_free(pdu->s->migration_blocker);

                pdu->s->migration_blocker = NULL;

            }

        }

        free_fid(pdu, fidp);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
 static void fcse_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)

+{
+
+    ARMCPU *cpu = arm_env_get_cpu(env);
+
+

     if (env->cp15.c13_fcse != value) {

static void fcse_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)

{

    ARMCPU *cpu = arm_env_get_cpu(env);

    if (env->cp15.c13_fcse != value) {

        /* Unlike real hardware the qemu TLB uses virtual addresses,

         * not modified virtual addresses, so this causes a TLB flush.

         */

        tlb_flush(CPU(cpu), 1);

        env->cp15.c13_fcse = value;

    }

}


--- a/source.c
+++ b/source.c
@@ -6,11 +6,11 @@

     const int beta  = (beta_table+52)[qp + h->slice_beta_offset];

+    if (alpha ==0 || beta == 0) return;
+
+
+
+    if( bS[0] < 4 ) {

         int8_t tc[4];

static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int16_t bS[4], int qp ) {

    const int index_a = qp + h->slice_alpha_c0_offset;

    const int alpha = (alpha_table+52)[index_a];

    const int beta  = (beta_table+52)[qp + h->slice_beta_offset];

    if (alpha ==0 || beta == 0) return;

    if( bS[0] < 4 ) {

        int8_t tc[4];

        tc[0] = (tc0_table+52)[index_a][bS[0]]+1;

        tc[1] = (tc0_table+52)[index_a][bS[1]]+1;

        tc[2] = (tc0_table+52)[index_a][bS[2]]+1;

        tc[3] = (tc0_table+52)[index_a][bS[3]]+1;

        h->s.dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc);

    } else {

        h->s.dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta);

    }

}


static inline int memory_access_size(MemoryRegion *mr, int l, hwaddr addr)

{

    if (l >= 4 && (((addr & 3) == 0 || mr->ops->impl.unaligned))) {

        return 4;

    }

    if (l >= 2 && (((addr & 1) == 0) || mr->ops->impl.unaligned)) {

        return 2;

    }

    return 1;

}


--- a/source.c
+++ b/source.c
@@ -52,11 +52,11 @@

+    DBDMA_DPRINTF("    status 0x%08x\n", status);
+
+
+
+    ch->regs[DBDMA_STATUS] = status;

dbdma_control_write(DBDMA_channel *ch)

{

    uint16_t mask, value;

    uint32_t status;

    mask = (ch->regs[DBDMA_CONTROL] >> 16) & 0xffff;

    value = ch->regs[DBDMA_CONTROL] & 0xffff;

    value &= (RUN | PAUSE | FLUSH | WAKE | DEVSTAT);

    status = ch->regs[DBDMA_STATUS];

    status = (value & mask) | (status & ~mask);

    if (status & WAKE)

        status |= ACTIVE;

    if (status & RUN) {

        status |= ACTIVE;

        status &= ~DEAD;

    }

    if (status & PAUSE)

        status &= ~ACTIVE;

    if ((ch->regs[DBDMA_STATUS] & RUN) && !(status & RUN)) {

        /* RUN is cleared */

        status &= ~(ACTIVE|DEAD);

    }

    DBDMA_DPRINTF("    status 0x%08x\n", status);

    ch->regs[DBDMA_STATUS] = status;

    if (status & ACTIVE)

        qemu_bh_schedule(dbdma_bh);

    if (status & FLUSH)

        ch->flush(&ch->io);

}


--- a/source.c
+++ b/source.c
@@ -32,11 +32,11 @@

+    r = &pci_dev->io_regions[region_num];
+
+    r->addr = PCI_BAR_UNMAPPED;
+
+    r->size = size;

     r->filtered_size = size;

void pci_register_bar(PCIDevice *pci_dev, int region_num,

                            pcibus_t size, int type,

                            PCIMapIORegionFunc *map_func)

{

    PCIIORegion *r;

    uint32_t addr;

    uint64_t wmask;

    if ((unsigned int)region_num >= PCI_NUM_REGIONS)

        return;

    if (size & (size-1)) {

        fprintf(stderr, "ERROR: PCI region size must be pow2 "

                    "type=0x%x, size=0x%"FMT_PCIBUS"\n", type, size);

        exit(1);

    }

    r = &pci_dev->io_regions[region_num];

    r->addr = PCI_BAR_UNMAPPED;

    r->size = size;

    r->filtered_size = size;

    r->type = type;

    r->map_func = map_func;

    wmask = ~(size - 1);

    addr = pci_bar(pci_dev, region_num);

    if (region_num == PCI_ROM_SLOT) {

        /* ROM enable bit is writeable */

        wmask |= PCI_ROM_ADDRESS_ENABLE;

    }

    pci_set_long(pci_dev->config + addr, type);

    if (!(r->type & PCI_BASE_ADDRESS_SPACE_IO) &&

        r->type & PCI_BASE_ADDRESS_MEM_TYPE_64) {

        pci_set_quad(pci_dev->wmask + addr, wmask);

        pci_set_quad(pci_dev->cmask + addr, ~0ULL);

    } else {

        pci_set_long(pci_dev->wmask + addr, wmask & 0xffffffff);

        pci_set_long(pci_dev->cmask + addr, 0xffffffff);

    }

}


--- a/source.c
+++ b/source.c
@@ -7,11 +7,11 @@
     gen_tbl(env);

     gen_spr_BookE(env);
+
+    gen_spr_440(env);
+
+    spr_register(env, SPR_BOOKE_MCSR, "MCSR",
+
                  SPR_NOACCESS, SPR_NOACCESS,

                  &spr_read_generic, &spr_write_generic,

static void init_proc_460 (CPUPPCState *env)

{

    /* Time base */

    gen_tbl(env);

    gen_spr_BookE(env);

    gen_spr_440(env);

    spr_register(env, SPR_BOOKE_MCSR, "MCSR",

                 SPR_NOACCESS, SPR_NOACCESS,

                 &spr_read_generic, &spr_write_generic,

                 0x00000000);

    spr_register(env, SPR_BOOKE_MCSRR0, "MCSRR0",

                 SPR_NOACCESS, SPR_NOACCESS,

                 &spr_read_generic, &spr_write_generic,

                 0x00000000);

    spr_register(env, SPR_BOOKE_MCSRR1, "MCSRR1",

                 SPR_NOACCESS, SPR_NOACCESS,

                 &spr_read_generic, &spr_write_generic,

                 0x00000000);

    spr_register(env, SPR_440_CCR1, "CCR1",

                 SPR_NOACCESS, SPR_NOACCESS,

                 &spr_read_generic, &spr_write_generic,

                 0x00000000);

    spr_register(env, SPR_DCRIPR, "SPR_DCRIPR",

                 &spr_read_generic, &spr_write_generic,

                 &spr_read_generic, &spr_write_generic,

                 0x00000000);

    /* Memory management */

    env->nb_tlb = 64;

    env->nb_ways = 1;

    env->id_tlbs = 0;

    /* XXX: TODO: allocate internal IRQ controller */

}


--- a/source.c
+++ b/source.c
@@ -18,11 +18,11 @@

+    if (end > (addr & ~511) + 512) {
+
+        memcpy(sd->buf + (addr & 511), sd->data, 512 - (addr & 511));
+
+        if (bdrv_write(sd->bdrv, addr >> 9, sd->buf, 1) < 0) {

             fprintf(stderr, "sd_blk_write: write error on host side\n");

static void sd_blk_write(SDState *sd, uint64_t addr, uint32_t len)

{

    uint64_t end = addr + len;

    if ((addr & 511) || len < 512)

        if (!sd->bdrv || bdrv_read(sd->bdrv, addr >> 9, sd->buf, 1) < 0) {

            fprintf(stderr, "sd_blk_write: read error on host side\n");

            return;

        }

    if (end > (addr & ~511) + 512) {

        memcpy(sd->buf + (addr & 511), sd->data, 512 - (addr & 511));

        if (bdrv_write(sd->bdrv, addr >> 9, sd->buf, 1) < 0) {

            fprintf(stderr, "sd_blk_write: write error on host side\n");

            return;

        }

        if (bdrv_read(sd->bdrv, end >> 9, sd->buf, 1) < 0) {

            fprintf(stderr, "sd_blk_write: read error on host side\n");

            return;

        }

        memcpy(sd->buf, sd->data + 512 - (addr & 511), end & 511);

        if (bdrv_write(sd->bdrv, end >> 9, sd->buf, 1) < 0) {

            fprintf(stderr, "sd_blk_write: write error on host side\n");

        }

    } else {

        memcpy(sd->buf + (addr & 511), sd->data, len);

        if (!sd->bdrv || bdrv_write(sd->bdrv, addr >> 9, sd->buf, 1) < 0) {

            fprintf(stderr, "sd_blk_write: write error on host side\n");

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -29,11 +29,11 @@
         av_free_packet(&pktl->pkt);

         av_freep(&pktl);
+
+
+
+        if(ret<0)
+
             return ret;

     }

int av_write_trailer(AVFormatContext *s)

{

    int ret;

    while(s->packet_buffer){

        int ret;

        AVPacketList *pktl= s->packet_buffer;

//av_log(s, AV_LOG_DEBUG, "write_trailer st:%d dts:%lld\n", pktl->pkt.stream_index, pktl->pkt.dts);

        truncate_ts(s->streams[pktl->pkt.stream_index], &pktl->pkt);

        ret= s->oformat->write_packet(s, &pktl->pkt);

        s->packet_buffer= pktl->next;

        av_free_packet(&pktl->pkt);

        av_freep(&pktl);

        if(ret<0)

            return ret;

    }

    ret = s->oformat->write_trailer(s);

    av_freep(&s->priv_data);

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -61,11 +61,11 @@
             dca_smpl_bitalloc[i+1].offset = bitalloc_offsets[i];

             dca_smpl_bitalloc[i+1].wrap = 1 + (j > 4);
+
+            init_vlc(&dca_smpl_bitalloc[i+1].vlc[j], bitalloc_maxbits[i][j],
+
+                     bitalloc_sizes[i],
+
                      bitalloc_bits[i][j], 1, 1,

                      bitalloc_codes[i][j], 2, 2, 1);

static void dca_init_vlcs(void)

{

    static int vlcs_inited = 0;

    int i, j;

    if (vlcs_inited)

        return;

    dca_bitalloc_index.offset = 1;

    dca_bitalloc_index.wrap = 2;

    for (i = 0; i < 5; i++)

        init_vlc(&dca_bitalloc_index.vlc[i], bitalloc_12_vlc_bits[i], 12,

                 bitalloc_12_bits[i], 1, 1,

                 bitalloc_12_codes[i], 2, 2, 1);

    dca_scalefactor.offset = -64;

    dca_scalefactor.wrap = 2;

    for (i = 0; i < 5; i++)

        init_vlc(&dca_scalefactor.vlc[i], SCALES_VLC_BITS, 129,

                 scales_bits[i], 1, 1,

                 scales_codes[i], 2, 2, 1);

    dca_tmode.offset = 0;

    dca_tmode.wrap = 1;

    for (i = 0; i < 4; i++)

        init_vlc(&dca_tmode.vlc[i], tmode_vlc_bits[i], 4,

                 tmode_bits[i], 1, 1,

                 tmode_codes[i], 2, 2, 1);

    for(i = 0; i < 10; i++)

        for(j = 0; j < 7; j++){

            if(!bitalloc_codes[i][j]) break;

            dca_smpl_bitalloc[i+1].offset = bitalloc_offsets[i];

            dca_smpl_bitalloc[i+1].wrap = 1 + (j > 4);

            init_vlc(&dca_smpl_bitalloc[i+1].vlc[j], bitalloc_maxbits[i][j],

                     bitalloc_sizes[i],

                     bitalloc_bits[i][j], 1, 1,

                     bitalloc_codes[i][j], 2, 2, 1);

        }

    vlcs_inited = 1;

}


--- a/source.c
+++ b/source.c
@@ -13,11 +13,11 @@
     if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {

         ret = -ENODEV;
+
+        goto out;
+
+    }
+

     /* Trigger the clear function. */

int css_do_csch(SubchDev *sch)

{

    SCSW *s = &sch->curr_status.scsw;

    PMCW *p = &sch->curr_status.pmcw;

    int ret;

    if (!(p->flags & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA))) {

        ret = -ENODEV;

        goto out;

    }

    /* Trigger the clear function. */

    s->ctrl &= ~(SCSW_CTRL_MASK_FCTL | SCSW_CTRL_MASK_ACTL);

    s->ctrl |= SCSW_FCTL_CLEAR_FUNC | SCSW_ACTL_CLEAR_PEND;

    do_subchannel_work(sch, NULL);

    ret = 0;

out:

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -4,11 +4,11 @@

 {

+    unsigned i;
+
+    MSIMessage msg = { .address = addr, .data = 0 };
+
+

     if (!msix) {

static void spapr_msi_setmsg(PCIDevice *pdev, hwaddr addr,

                             bool msix, unsigned req_num)

{

    unsigned i;

    MSIMessage msg = { .address = addr, .data = 0 };

    if (!msix) {

        msi_set_message(pdev, msg);

        trace_spapr_pci_msi_setup(pdev->name, 0, msg.address);

        return;

    }

    for (i = 0; i < req_num; ++i) {

        msg.address = addr | (i << 2);

        msix_set_message(pdev, i, msg);

        trace_spapr_pci_msi_setup(pdev->name, i, msg.address);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
+static void ioq_init(LaioQueue *io_q)
+
+{

     QSIMPLEQ_INIT(&io_q->pending);

static void ioq_init(LaioQueue *io_q)

{

    QSIMPLEQ_INIT(&io_q->pending);

    io_q->plugged = 0;

    io_q->n = 0;

    io_q->blocked = false;

}


--- a/source.c
+++ b/source.c
@@ -6,11 +6,11 @@

+    SMBIOS_TABLE_SET_STR(1, manufacturer_str, type1.manufacturer);
+
+    SMBIOS_TABLE_SET_STR(1, product_name_str, type1.product);
+
+    SMBIOS_TABLE_SET_STR(1, version_str, type1.version);

     SMBIOS_TABLE_SET_STR(1, serial_number_str, type1.serial);

static void smbios_build_type_1_table(void)

{

    SMBIOS_BUILD_TABLE_PRE(1, 0x100, true); /* required */

    SMBIOS_TABLE_SET_STR(1, manufacturer_str, type1.manufacturer);

    SMBIOS_TABLE_SET_STR(1, product_name_str, type1.product);

    SMBIOS_TABLE_SET_STR(1, version_str, type1.version);

    SMBIOS_TABLE_SET_STR(1, serial_number_str, type1.serial);

    if (qemu_uuid_set) {

        smbios_encode_uuid(&t->uuid, qemu_uuid);

    } else {

        memset(&t->uuid, 0, 16);

    }

    t->wake_up_type = 0x06; /* power switch */

    SMBIOS_TABLE_SET_STR(1, sku_number_str, type1.sku);

    SMBIOS_TABLE_SET_STR(1, family_str, type1.family);

    SMBIOS_BUILD_TABLE_POST;

}


--- a/source.c
+++ b/source.c
@@ -6,6 +6,6 @@

     sysbus_register_withprop(&mv88w8618_audio_info);

+#endif
+
 }

static void mv88w8618_register_devices(void)

{

#ifdef HAS_AUDIO

    sysbus_register_withprop(&mv88w8618_audio_info);

#endif

}


--- a/source.c
+++ b/source.c
@@ -3,5 +3,5 @@
 {

     LIST_INSERT_HEAD(&watchdog_list, model, entry);
+
 }

void watchdog_add_model(WatchdogTimerModel *model)

{

    LIST_INSERT_HEAD(&watchdog_list, model, entry);

}