id int32 0 27.3k | func stringlengths 26 142k | target bool 2
classes | project stringclasses 2
values | commit_id stringlengths 40 40 | func_clean stringlengths 26 131k | vul_lines dict | normalized_func stringlengths 24 132k | lines listlengths 1 2.8k | label listlengths 1 2.8k | line_no listlengths 1 2.8k |
|---|---|---|---|---|---|---|---|---|---|---|
1,597 | static void select_vgahw (const char *p)
{
const char *opts;
vga_interface_type = VGA_NONE;
if (strstart(p, "std", &opts)) {
if (vga_available()) {
vga_interface_type = VGA_STD;
fprintf(stderr, "Error: standard VGA not available\n");
exit(0);
} else if (strsta... | true | qemu | 482f7bf86b43af9f6903c52726fedf82b28bf953 | static void select_vgahw (const char *p)
{
const char *opts;
vga_interface_type = VGA_NONE;
if (strstart(p, "std", &opts)) {
if (vga_available()) {
vga_interface_type = VGA_STD;
fprintf(stderr, "Error: standard VGA not available\n");
exit(0);
} else if (strsta... | {
"code": [],
"line_no": []
} | static void FUNC_0 (const char *VAR_0)
{
const char *VAR_1;
vga_interface_type = VGA_NONE;
if (strstart(VAR_0, "std", &VAR_1)) {
if (vga_available()) {
vga_interface_type = VGA_STD;
fprintf(stderr, "Error: standard VGA not available\n");
exit(0);
} else if (st... | [
"static void FUNC_0 (const char *VAR_0)\n{",
"const char *VAR_1;",
"vga_interface_type = VGA_NONE;",
"if (strstart(VAR_0, \"std\", &VAR_1)) {",
"if (vga_available()) {",
"vga_interface_type = VGA_STD;",
"fprintf(stderr, \"Error: standard VGA not available\\n\");",
"exit(0);",
"} else if (strstart(VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21
],... |
1,598 | void kvm_irqchip_commit_routes(KVMState *s)
{
int ret;
s->irq_routes->flags = 0;
trace_kvm_irqchip_commit_routes();
ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
assert(ret == 0); | true | qemu | 7005f7f81cef31bda895d3274c13854c143d3d8d | void kvm_irqchip_commit_routes(KVMState *s)
{
int ret;
s->irq_routes->flags = 0;
trace_kvm_irqchip_commit_routes();
ret = kvm_vm_ioctl(s, KVM_SET_GSI_ROUTING, s->irq_routes);
assert(ret == 0); | {
"code": [],
"line_no": []
} | void FUNC_0(KVMState *VAR_0)
{
int VAR_1;
VAR_0->irq_routes->flags = 0;
trace_kvm_irqchip_commit_routes();
VAR_1 = kvm_vm_ioctl(VAR_0, KVM_SET_GSI_ROUTING, VAR_0->irq_routes);
assert(VAR_1 == 0); | [
"void FUNC_0(KVMState *VAR_0)\n{",
"int VAR_1;",
"VAR_0->irq_routes->flags = 0;",
"trace_kvm_irqchip_commit_routes();",
"VAR_1 = kvm_vm_ioctl(VAR_0, KVM_SET_GSI_ROUTING, VAR_0->irq_routes);",
"assert(VAR_1 == 0);"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
]
] |
1,599 | void cpu_exit(CPUState *cpu)
{
cpu->exit_request = 1;
/* Ensure cpu_exec will see the exit request after TCG has exited. */
smp_wmb();
cpu->tcg_exit_req = 1;
}
| true | qemu | 027d9a7d2911e993cdcbd21c7c35d1dd058f05bb | void cpu_exit(CPUState *cpu)
{
cpu->exit_request = 1;
smp_wmb();
cpu->tcg_exit_req = 1;
}
| {
"code": [
" cpu->exit_request = 1;",
" cpu->tcg_exit_req = 1;"
],
"line_no": [
5,
11
]
} | void FUNC_0(CPUState *VAR_0)
{
VAR_0->exit_request = 1;
smp_wmb();
VAR_0->tcg_exit_req = 1;
}
| [
"void FUNC_0(CPUState *VAR_0)\n{",
"VAR_0->exit_request = 1;",
"smp_wmb();",
"VAR_0->tcg_exit_req = 1;",
"}"
] | [
0,
1,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
1,600 | void FUNCC(ff_h264_idct8_add)(uint8_t *_dst, DCTELEM *_block, int stride){
int i;
INIT_CLIP
pixel *dst = (pixel*)_dst;
dctcoef *block = (dctcoef*)_block;
stride /= sizeof(pixel);
block[0] += 32;
for( i = 0; i < 8; i++ )
{
const int a0 = block[i+0*8] + block[i+4*8];
... | true | FFmpeg | c23acbaed40101c677dfcfbbfe0d2c230a8e8f44 | void FUNCC(ff_h264_idct8_add)(uint8_t *_dst, DCTELEM *_block, int stride){
int i;
INIT_CLIP
pixel *dst = (pixel*)_dst;
dctcoef *block = (dctcoef*)_block;
stride /= sizeof(pixel);
block[0] += 32;
for( i = 0; i < 8; i++ )
{
const int a0 = block[i+0*8] + block[i+4*8];
... | {
"code": [
" INIT_CLIP",
" INIT_CLIP",
" dst[i + 0*stride] = CLIP( dst[i + 0*stride] + ((b0 + b7) >> 6) );",
" dst[i + 1*stride] = CLIP( dst[i + 1*stride] + ((b2 + b5) >> 6) );",
" dst[i + 2*stride] = CLIP( dst[i + 2*stride] + ((b4 + b3) >> 6) );",
" dst[i + ... | void FUNC_0(ff_h264_idct8_add)(uint8_t *_dst, DCTELEM *_block, int stride){
int VAR_0;
INIT_CLIP
pixel *dst = (pixel*)_dst;
dctcoef *block = (dctcoef*)_block;
stride /= sizeof(pixel);
block[0] += 32;
for( VAR_0 = 0; VAR_0 < 8; VAR_0++ )
{
const int VAR_17 = block[VA... | [
"void FUNC_0(ff_h264_idct8_add)(uint8_t *_dst, DCTELEM *_block, int stride){",
"int VAR_0;",
"INIT_CLIP\npixel *dst = (pixel*)_dst;",
"dctcoef *block = (dctcoef*)_block;",
"stride /= sizeof(pixel);",
"block[0] += 32;",
"for( VAR_0 = 0; VAR_0 < 8; VAR_0++ )",
"{",
"const int VAR_17 = block[VAR_0+0*8... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0
] | [
[
1
],
[
3
],
[
5,
7
],
[
9
],
[
11
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
47
],
[
49
... |
1,601 | static int huf_decode(const uint64_t *hcode, const HufDec *hdecod,
GetByteContext *gb, int nbits,
int rlc, int no, uint16_t *out)
{
uint64_t c = 0;
uint16_t *outb = out;
uint16_t *oe = out + no;
const uint8_t *ie = gb->buffer + (nbits + 7... | true | FFmpeg | 5ea59b1f424f0efc7805d837e6fdb80561fb0f3a | static int huf_decode(const uint64_t *hcode, const HufDec *hdecod,
GetByteContext *gb, int nbits,
int rlc, int no, uint16_t *out)
{
uint64_t c = 0;
uint16_t *outb = out;
uint16_t *oe = out + no;
const uint8_t *ie = gb->buffer + (nbits + 7... | {
"code": [
" get_code(pl.lit, rlc, c, lc, gb, out, oe);",
" get_code(pl.p[j], rlc, c, lc, gb, out, oe);",
" get_code(pl.lit, rlc, c, lc, gb, out, oe);"
],
"line_no": [
39,
73,
115
]
} | static int FUNC_0(const uint64_t *VAR_0, const HufDec *VAR_1,
GetByteContext *VAR_2, int VAR_3,
int VAR_4, int VAR_5, uint16_t *VAR_6)
{
uint64_t c = 0;
uint16_t *outb = VAR_6;
uint16_t *oe = VAR_6 + VAR_5;
const uint8_t *VAR_7 = VAR_2->b... | [
"static int FUNC_0(const uint64_t *VAR_0, const HufDec *VAR_1,\nGetByteContext *VAR_2, int VAR_3,\nint VAR_4, int VAR_5, uint16_t *VAR_6)\n{",
"uint64_t c = 0;",
"uint16_t *outb = VAR_6;",
"uint16_t *oe = VAR_6 + VAR_5;",
"const uint8_t *VAR_7 = VAR_2->buffer + (VAR_3 + 7) / 8;",
"uint8_t c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
47,
49
],
[
53
],
[... |
1,602 | static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
{
const char *rn = "invalid";
if (sel != 0)
check_insn(ctx, ISA_MIPS32);
switch (reg) {
case 0:
switch (sel) {
case 0:
gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_Index));
... | false | qemu | f31b035a9f10dc9b57f01c426110af845d453ce2 | static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel)
{
const char *rn = "invalid";
if (sel != 0)
check_insn(ctx, ISA_MIPS32);
switch (reg) {
case 0:
switch (sel) {
case 0:
gen_mfc0_load32(arg, offsetof(CPUMIPSState, CP0_Index));
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, int VAR_2, int VAR_3)
{
const char *VAR_4 = "invalid";
if (VAR_3 != 0)
check_insn(VAR_0, ISA_MIPS32);
switch (VAR_2) {
case 0:
switch (VAR_3) {
case 0:
gen_mfc0_load32(VAR_1, offsetof(CPUMIPSState, CP0_I... | [
"static void FUNC_0(DisasContext *VAR_0, TCGv VAR_1, int VAR_2, int VAR_3)\n{",
"const char *VAR_4 = \"invalid\";",
"if (VAR_3 != 0)\ncheck_insn(VAR_0, ISA_MIPS32);",
"switch (VAR_2) {",
"case 0:\nswitch (VAR_3) {",
"case 0:\ngen_mfc0_load32(VAR_1, offsetof(CPUMIPSState, CP0_Index));",
"VAR_4 = \"Index\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
9,
11
],
[
15
],
[
17,
19
],
[
21,
23
],
[
25
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49,
51... |
1,603 | static int64_t cvtnum(const char *s)
{
char *end;
return qemu_strtosz_suffix(s, &end, QEMU_STRTOSZ_DEFSUFFIX_B);
}
| false | qemu | ef5a788527b2038d742b057a415ab4d0e735e98f | static int64_t cvtnum(const char *s)
{
char *end;
return qemu_strtosz_suffix(s, &end, QEMU_STRTOSZ_DEFSUFFIX_B);
}
| {
"code": [],
"line_no": []
} | static int64_t FUNC_0(const char *s)
{
char *VAR_0;
return qemu_strtosz_suffix(s, &VAR_0, QEMU_STRTOSZ_DEFSUFFIX_B);
}
| [
"static int64_t FUNC_0(const char *s)\n{",
"char *VAR_0;",
"return qemu_strtosz_suffix(s, &VAR_0, QEMU_STRTOSZ_DEFSUFFIX_B);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
1,604 | static void qpci_spapr_io_writeb(QPCIBus *bus, void *addr, uint8_t value)
{
QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);
uint64_t port = (uintptr_t)addr;
if (port < s->pio.size) {
writeb(s->pio_cpu_base + port, value);
} else {
writeb(s->mmio_cpu_base + port, value);
... | false | qemu | 8360544a6d3a54df1fce80f55ba4ad075a8ded54 | static void qpci_spapr_io_writeb(QPCIBus *bus, void *addr, uint8_t value)
{
QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);
uint64_t port = (uintptr_t)addr;
if (port < s->pio.size) {
writeb(s->pio_cpu_base + port, value);
} else {
writeb(s->mmio_cpu_base + port, value);
... | {
"code": [],
"line_no": []
} | static void FUNC_0(QPCIBus *VAR_0, void *VAR_1, uint8_t VAR_2)
{
QPCIBusSPAPR *s = container_of(VAR_0, QPCIBusSPAPR, VAR_0);
uint64_t port = (uintptr_t)VAR_1;
if (port < s->pio.size) {
writeb(s->pio_cpu_base + port, VAR_2);
} else {
writeb(s->mmio_cpu_base + port, VAR_2);
}
... | [
"static void FUNC_0(QPCIBus *VAR_0, void *VAR_1, uint8_t VAR_2)\n{",
"QPCIBusSPAPR *s = container_of(VAR_0, QPCIBusSPAPR, VAR_0);",
"uint64_t port = (uintptr_t)VAR_1;",
"if (port < s->pio.size) {",
"writeb(s->pio_cpu_base + port, VAR_2);",
"} else {",
"writeb(s->mmio_cpu_base + port, VAR_2);",
"}",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
]
] |
1,605 | static void *rcu_q_updater(void *arg)
{
int j, target_el;
long long n_updates_local = 0;
long long n_removed_local = 0;
struct list_element *el, *prev_el;
*(struct rcu_reader_data **)arg = &rcu_reader;
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT) {
g_usleep(... | false | qemu | 8a5956ad6392f115521dad774055c737c49fb0dd | static void *rcu_q_updater(void *arg)
{
int j, target_el;
long long n_updates_local = 0;
long long n_removed_local = 0;
struct list_element *el, *prev_el;
*(struct rcu_reader_data **)arg = &rcu_reader;
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT) {
g_usleep(... | {
"code": [],
"line_no": []
} | static void *FUNC_0(void *VAR_0)
{
int VAR_1, VAR_2;
long long VAR_3 = 0;
long long VAR_4 = 0;
struct list_element *VAR_5, *VAR_6;
*(struct rcu_reader_data **)VAR_0 = &rcu_reader;
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT) {
g_usleep(1000);
}
w... | [
"static void *FUNC_0(void *VAR_0)\n{",
"int VAR_1, VAR_2;",
"long long VAR_3 = 0;",
"long long VAR_4 = 0;",
"struct list_element *VAR_5, *VAR_6;",
"*(struct rcu_reader_data **)VAR_0 = &rcu_reader;",
"atomic_inc(&nthreadsrunning);",
"while (goflag == GOFLAG_INIT) {",
"g_usleep(1000);",
"}",
"whil... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
... |
1,606 | int Configure(void **ctxp, int argc, char *argv[])
{
ContextInfo *ci;
int c;
*ctxp = av_mallocz(sizeof(ContextInfo));
ci = (ContextInfo *) *ctxp;
optind = 1;
ci->dir = "/tmp";
ci->threshold = 100;
ci->file_limit = 100;
ci->min_interval = 1000000;
ci->inset = 10; ... | false | FFmpeg | 1bbeb06a36ec36ce03e1c882c8e97efdc13c9a9b | int Configure(void **ctxp, int argc, char *argv[])
{
ContextInfo *ci;
int c;
*ctxp = av_mallocz(sizeof(ContextInfo));
ci = (ContextInfo *) *ctxp;
optind = 1;
ci->dir = "/tmp";
ci->threshold = 100;
ci->file_limit = 100;
ci->min_interval = 1000000;
ci->inset = 10; ... | {
"code": [],
"line_no": []
} | int FUNC_0(void **VAR_0, int VAR_1, char *VAR_2[])
{
ContextInfo *ci;
int VAR_3;
*VAR_0 = av_mallocz(sizeof(ContextInfo));
ci = (ContextInfo *) *VAR_0;
optind = 1;
ci->dir = "/tmp";
ci->threshold = 100;
ci->file_limit = 100;
ci->min_interval = 1000000;
ci->inset ... | [
"int FUNC_0(void **VAR_0, int VAR_1, char *VAR_2[])\n{",
"ContextInfo *ci;",
"int VAR_3;",
"*VAR_0 = av_mallocz(sizeof(ContextInfo));",
"ci = (ContextInfo *) *VAR_0;",
"optind = 1;",
"ci->dir = \"/tmp\";",
"ci->threshold = 100;",
"ci->file_limit = 100;",
"ci->min_interval = 1000000;",
"ci->inset... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43,
45
],
[
47
],
[
49,
51
],
... |
1,607 | static int local_chown(FsContext *ctx, const char *path, uid_t uid, gid_t gid)
{
return chown(rpath(ctx, path), uid, gid);
}
| false | qemu | f7613bee32ebd13ff4a8d721a59cf27b1fe5d94b | static int local_chown(FsContext *ctx, const char *path, uid_t uid, gid_t gid)
{
return chown(rpath(ctx, path), uid, gid);
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(FsContext *VAR_0, const char *VAR_1, uid_t VAR_2, gid_t VAR_3)
{
return chown(rpath(VAR_0, VAR_1), VAR_2, VAR_3);
}
| [
"static int FUNC_0(FsContext *VAR_0, const char *VAR_1, uid_t VAR_2, gid_t VAR_3)\n{",
"return chown(rpath(VAR_0, VAR_1), VAR_2, VAR_3);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,610 | static void disas_arm_insn(DisasContext *s, unsigned int insn)
{
unsigned int cond, val, op1, i, shift, rm, rs, rn, rd, sh;
TCGv_i32 tmp;
TCGv_i32 tmp2;
TCGv_i32 tmp3;
TCGv_i32 addr;
TCGv_i64 tmp64;
/* M variants do not implement ARM mode. */
if (arm_dc_feature(s, ARM_FEATURE... | false | qemu | cbc0326b6fb905f80b7cef85b24571f7ebb62077 | static void disas_arm_insn(DisasContext *s, unsigned int insn)
{
unsigned int cond, val, op1, i, shift, rm, rs, rn, rd, sh;
TCGv_i32 tmp;
TCGv_i32 tmp2;
TCGv_i32 tmp3;
TCGv_i32 addr;
TCGv_i64 tmp64;
if (arm_dc_feature(s, ARM_FEATURE_M)) {
goto illegal_op;
}
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, unsigned int VAR_1)
{
unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;
TCGv_i32 tmp;
TCGv_i32 tmp2;
TCGv_i32 tmp3;
TCGv_i32 addr;
TCGv_i64 tmp64;
if (arm_dc_feature(VAR_0, ARM_FEATURE_M)) {
g... | [
"static void FUNC_0(DisasContext *VAR_0, unsigned int VAR_1)\n{",
"unsigned int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10, VAR_11;",
"TCGv_i32 tmp;",
"TCGv_i32 tmp2;",
"TCGv_i32 tmp3;",
"TCGv_i32 addr;",
"TCGv_i64 tmp64;",
"if (arm_dc_feature(VAR_0, ARM_FEATURE_M)) {",
"goto ill... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
39
],
[
45
],
[
49
],
[
51
],
[
53
],
[
57
],
[
59
],
[
61
... |
1,611 | int64_t bdrv_getlength(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (!drv)
return -ENOMEDIUM;
if (bs->growable || bs->removable) {
if (drv->bdrv_getlength) {
return drv->bdrv_getlength(bs);
}
}
return bs->total_sectors * BDRV_SECTOR_SIZE;
}
| false | qemu | 2c6942fa7b332a95286071b92d233853e1000948 | int64_t bdrv_getlength(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (!drv)
return -ENOMEDIUM;
if (bs->growable || bs->removable) {
if (drv->bdrv_getlength) {
return drv->bdrv_getlength(bs);
}
}
return bs->total_sectors * BDRV_SECTOR_SIZE;
}
| {
"code": [],
"line_no": []
} | int64_t FUNC_0(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (!drv)
return -ENOMEDIUM;
if (bs->growable || bs->removable) {
if (drv->FUNC_0) {
return drv->FUNC_0(bs);
}
}
return bs->total_sectors * BDRV_SECTOR_SIZE;
}
| [
"int64_t FUNC_0(BlockDriverState *bs)\n{",
"BlockDriver *drv = bs->drv;",
"if (!drv)\nreturn -ENOMEDIUM;",
"if (bs->growable || bs->removable) {",
"if (drv->FUNC_0) {",
"return drv->FUNC_0(bs);",
"}",
"}",
"return bs->total_sectors * BDRV_SECTOR_SIZE;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
]
] |
1,612 | static void test_after_failed_device_add(void)
{
QDict *response;
QDict *error;
qtest_start("-drive if=none,id=drive0");
/* Make device_add fail. If this leaks the virtio-blk-pci device then a
* reference to drive0 will also be held (via qdev properties).
*/
response = qmp("{'... | false | qemu | 2f84a92ec631f5907207990705a22afb9aad3eef | static void test_after_failed_device_add(void)
{
QDict *response;
QDict *error;
qtest_start("-drive if=none,id=drive0");
response = qmp("{'execute': 'device_add',"
" 'arguments': {"
" 'driver': 'virtio-blk-pci',"
" 'drive... | {
"code": [],
"line_no": []
} | static void FUNC_0(void)
{
QDict *response;
QDict *error;
qtest_start("-drive if=none,id=drive0");
response = qmp("{'execute': 'device_add',"
" 'arguments': {"
" 'driver': 'virtio-blk-pci',"
" 'drive': 'drive0'"
... | [
"static void FUNC_0(void)\n{",
"QDict *response;",
"QDict *error;",
"qtest_start(\"-drive if=none,id=drive0\");",
"response = qmp(\"{'execute': 'device_add',\"",
"\" 'arguments': {\"",
"\" 'driver': 'virtio-blk-pci',\"\n\" 'drive': 'drive0'\"\n\"}}\");",
"g_assert(response);",
"error = qdict_get... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
21
],
[
23
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
53
],
[
57
],
[
59
]
] |
1,613 | static void xen_io_del(MemoryListener *listener,
MemoryRegionSection *section)
{
XenIOState *state = container_of(listener, XenIOState, io_listener);
xen_unmap_io_section(xen_xc, xen_domid, state->ioservid, section);
memory_region_unref(section->mr);
}
| false | qemu | a8ff4316795c7051b38727ec4a81c65dfcf63dc6 | static void xen_io_del(MemoryListener *listener,
MemoryRegionSection *section)
{
XenIOState *state = container_of(listener, XenIOState, io_listener);
xen_unmap_io_section(xen_xc, xen_domid, state->ioservid, section);
memory_region_unref(section->mr);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(MemoryListener *VAR_0,
MemoryRegionSection *VAR_1)
{
XenIOState *state = container_of(VAR_0, XenIOState, io_listener);
xen_unmap_io_section(xen_xc, xen_domid, state->ioservid, VAR_1);
memory_region_unref(VAR_1->mr);
}
| [
"static void FUNC_0(MemoryListener *VAR_0,\nMemoryRegionSection *VAR_1)\n{",
"XenIOState *state = container_of(VAR_0, XenIOState, io_listener);",
"xen_unmap_io_section(xen_xc, xen_domid, state->ioservid, VAR_1);",
"memory_region_unref(VAR_1->mr);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
]
] |
1,614 | static void mipsnet_receive(void *opaque, const uint8_t *buf, size_t size)
{
MIPSnetState *s = opaque;
#ifdef DEBUG_MIPSNET_RECEIVE
printf("mipsnet: receiving len=%d\n", size);
#endif
if (!mipsnet_can_receive(opaque))
return;
s->busy = 1;
/* Just accept everything. */
/... | false | qemu | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 | static void mipsnet_receive(void *opaque, const uint8_t *buf, size_t size)
{
MIPSnetState *s = opaque;
#ifdef DEBUG_MIPSNET_RECEIVE
printf("mipsnet: receiving len=%d\n", size);
#endif
if (!mipsnet_can_receive(opaque))
return;
s->busy = 1;
memcpy(s->rx_buffer, buf... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, size_t VAR_2)
{
MIPSnetState *s = VAR_0;
#ifdef DEBUG_MIPSNET_RECEIVE
printf("mipsnet: receiving len=%d\n", VAR_2);
#endif
if (!mipsnet_can_receive(VAR_0))
return;
s->busy = 1;
memcpy(s->rx_buffer, VAR_1, VAR_... | [
"static void FUNC_0(void *VAR_0, const uint8_t *VAR_1, size_t VAR_2)\n{",
"MIPSnetState *s = VAR_0;",
"#ifdef DEBUG_MIPSNET_RECEIVE\nprintf(\"mipsnet: receiving len=%d\\n\", VAR_2);",
"#endif\nif (!mipsnet_can_receive(VAR_0))\nreturn;",
"s->busy = 1;",
"memcpy(s->rx_buffer, VAR_1, VAR_2);",
"s->rx_count... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13,
15,
17
],
[
21
],
[
31
],
[
35
],
[
37
],
[
43
],
[
45
],
[
47
]
] |
1,615 | int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, uint64_t *hw_limit)
{
int rc;
struct kvm_device_attr attr = {
.group = KVM_S390_VM_MEM_CTRL,
.attr = KVM_S390_VM_MEM_LIMIT_SIZE,
.addr = (uint64_t) &new_limit,
};
if (!kvm_s390_supports_mem_limit(s)) {
... | false | qemu | 2b147555f78c3c20080b201fd1506467fa0ddf43 | int kvm_s390_set_mem_limit(KVMState *s, uint64_t new_limit, uint64_t *hw_limit)
{
int rc;
struct kvm_device_attr attr = {
.group = KVM_S390_VM_MEM_CTRL,
.attr = KVM_S390_VM_MEM_LIMIT_SIZE,
.addr = (uint64_t) &new_limit,
};
if (!kvm_s390_supports_mem_limit(s)) {
... | {
"code": [],
"line_no": []
} | int FUNC_0(KVMState *VAR_0, uint64_t VAR_1, uint64_t *VAR_2)
{
int VAR_3;
struct kvm_device_attr VAR_4 = {
.group = KVM_S390_VM_MEM_CTRL,
.VAR_4 = KVM_S390_VM_MEM_LIMIT_SIZE,
.addr = (uint64_t) &VAR_1,
};
if (!kvm_s390_supports_mem_limit(VAR_0)) {
return 0;
... | [
"int FUNC_0(KVMState *VAR_0, uint64_t VAR_1, uint64_t *VAR_2)\n{",
"int VAR_3;",
"struct kvm_device_attr VAR_4 = {",
".group = KVM_S390_VM_MEM_CTRL,\n.VAR_4 = KVM_S390_VM_MEM_LIMIT_SIZE,\n.addr = (uint64_t) &VAR_1,\n};",
"if (!kvm_s390_supports_mem_limit(VAR_0)) {",
"return 0;",
"}",
"VAR_3 = kvm_s390... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11,
13,
15,
17
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
]
] |
1,617 | static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
int *data_size, const uint8_t *buf, int buf_size)
{
static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2};
unsigned int refl_rms[4]; // RMS of the reflection coefficients
uint16_t block_coefs[4... | false | FFmpeg | 6c9c8b06b32013c58101f27991eae251bf4eb485 | static int ra144_decode_frame(AVCodecContext * avctx, void *vdata,
int *data_size, const uint8_t *buf, int buf_size)
{
static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2};
unsigned int refl_rms[4];
uint16_t block_coefs[4][30];
unsigned int lpc_refl[10... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,
int *VAR_2, const uint8_t *VAR_3, int VAR_4)
{
static const uint8_t VAR_5[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2};
unsigned int VAR_6[4];
uint16_t block_coefs[4][30];
unsigned int VAR_7[10];
int VAR_8, V... | [
"static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,\nint *VAR_2, const uint8_t *VAR_3, int VAR_4)\n{",
"static const uint8_t VAR_5[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2};",
"unsigned int VAR_6[4];",
"uint16_t block_coefs[4][30];",
"unsigned int VAR_7[10];",
"int VAR_8, VAR_9;",
"int16_t *data = VAR_1;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
29
],
[
31,
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
... |
1,618 | static void read_vec_element(DisasContext *s, TCGv_i64 tcg_dest, int srcidx,
int element, TCGMemOp memop)
{
int vect_off = vec_reg_offset(srcidx, element, memop & MO_SIZE);
switch (memop) {
case MO_8:
tcg_gen_ld8u_i64(tcg_dest, cpu_env, vect_off);
break;
... | false | qemu | 90e496386fe7fd32c189561f846b7913f95b8cf4 | static void read_vec_element(DisasContext *s, TCGv_i64 tcg_dest, int srcidx,
int element, TCGMemOp memop)
{
int vect_off = vec_reg_offset(srcidx, element, memop & MO_SIZE);
switch (memop) {
case MO_8:
tcg_gen_ld8u_i64(tcg_dest, cpu_env, vect_off);
break;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(DisasContext *VAR_0, TCGv_i64 VAR_1, int VAR_2,
int VAR_3, TCGMemOp VAR_4)
{
int VAR_5 = vec_reg_offset(VAR_2, VAR_3, VAR_4 & MO_SIZE);
switch (VAR_4) {
case MO_8:
tcg_gen_ld8u_i64(VAR_1, cpu_env, VAR_5);
break;
case MO_16:
... | [
"static void FUNC_0(DisasContext *VAR_0, TCGv_i64 VAR_1, int VAR_2,\nint VAR_3, TCGMemOp VAR_4)\n{",
"int VAR_5 = vec_reg_offset(VAR_2, VAR_3, VAR_4 & MO_SIZE);",
"switch (VAR_4) {",
"case MO_8:\ntcg_gen_ld8u_i64(VAR_1, cpu_env, VAR_5);",
"break;",
"case MO_16:\ntcg_gen_ld16u_i64(VAR_1, cpu_env, VAR_5);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
15
],
[
17,
19
],
[
21
],
[
23,
25
],
[
27
],
[
29,
31
],
[
33
],
[
35,
37
],
[
39
],
[
41,
43
],
[
45
],
[
47,
49,... |
1,619 | int qemu_boot_set(const char *boot_order)
{
if (!boot_set_handler) {
return -EINVAL;
}
return boot_set_handler(boot_set_opaque, boot_order);
}
| false | qemu | f1839938b090b28537d9be2c1b255b834f3cfbb8 | int qemu_boot_set(const char *boot_order)
{
if (!boot_set_handler) {
return -EINVAL;
}
return boot_set_handler(boot_set_opaque, boot_order);
}
| {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0)
{
if (!boot_set_handler) {
return -EINVAL;
}
return boot_set_handler(boot_set_opaque, VAR_0);
}
| [
"int FUNC_0(const char *VAR_0)\n{",
"if (!boot_set_handler) {",
"return -EINVAL;",
"}",
"return boot_set_handler(boot_set_opaque, VAR_0);",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
1,620 | static ssize_t local_readlink(FsContext *ctx, const char *path,
char *buf, size_t bufsz)
{
return readlink(rpath(ctx, path), buf, bufsz);
}
| false | qemu | 879c28133dfa54b780dffbb29e4dcfc6581f6281 | static ssize_t local_readlink(FsContext *ctx, const char *path,
char *buf, size_t bufsz)
{
return readlink(rpath(ctx, path), buf, bufsz);
}
| {
"code": [],
"line_no": []
} | static ssize_t FUNC_0(FsContext *ctx, const char *path,
char *buf, size_t bufsz)
{
return readlink(rpath(ctx, path), buf, bufsz);
}
| [
"static ssize_t FUNC_0(FsContext *ctx, const char *path,\nchar *buf, size_t bufsz)\n{",
"return readlink(rpath(ctx, path), buf, bufsz);",
"}"
] | [
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
]
] |
1,623 | void unix_start_incoming_migration(const char *path, Error **errp)
{
SocketAddressLegacy *saddr = unix_build_address(path);
socket_start_incoming_migration(saddr, errp);
}
| false | qemu | bd269ebc82fbaa5fe7ce5bc7c1770ac8acecd884 | void unix_start_incoming_migration(const char *path, Error **errp)
{
SocketAddressLegacy *saddr = unix_build_address(path);
socket_start_incoming_migration(saddr, errp);
}
| {
"code": [],
"line_no": []
} | void FUNC_0(const char *VAR_0, Error **VAR_1)
{
SocketAddressLegacy *saddr = unix_build_address(VAR_0);
socket_start_incoming_migration(saddr, VAR_1);
}
| [
"void FUNC_0(const char *VAR_0, Error **VAR_1)\n{",
"SocketAddressLegacy *saddr = unix_build_address(VAR_0);",
"socket_start_incoming_migration(saddr, VAR_1);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
1,624 | void tcg_gen_atomic_cmpxchg_i32(TCGv_i32 retv, TCGv addr, TCGv_i32 cmpv,
TCGv_i32 newv, TCGArg idx, TCGMemOp memop)
{
memop = tcg_canonicalize_memop(memop, 0, 0);
if (!parallel_cpus) {
TCGv_i32 t1 = tcg_temp_new_i32();
TCGv_i32 t2 = tcg_temp_new_i32();
... | false | qemu | e82d5a2460b0e176128027651ff9b104e4bdf5cc | void tcg_gen_atomic_cmpxchg_i32(TCGv_i32 retv, TCGv addr, TCGv_i32 cmpv,
TCGv_i32 newv, TCGArg idx, TCGMemOp memop)
{
memop = tcg_canonicalize_memop(memop, 0, 0);
if (!parallel_cpus) {
TCGv_i32 t1 = tcg_temp_new_i32();
TCGv_i32 t2 = tcg_temp_new_i32();
... | {
"code": [],
"line_no": []
} | void FUNC_0(TCGv_i32 VAR_0, TCGv VAR_1, TCGv_i32 VAR_2,
TCGv_i32 VAR_3, TCGArg VAR_4, TCGMemOp VAR_5)
{
VAR_5 = tcg_canonicalize_memop(VAR_5, 0, 0);
if (!parallel_cpus) {
TCGv_i32 t1 = tcg_temp_new_i32();
TCGv_i32 t2 = tcg_temp_new_i32();
tcg_ge... | [
"void FUNC_0(TCGv_i32 VAR_0, TCGv VAR_1, TCGv_i32 VAR_2,\nTCGv_i32 VAR_3, TCGArg VAR_4, TCGMemOp VAR_5)\n{",
"VAR_5 = tcg_canonicalize_memop(VAR_5, 0, 0);",
"if (!parallel_cpus) {",
"TCGv_i32 t1 = tcg_temp_new_i32();",
"TCGv_i32 t2 = tcg_temp_new_i32();",
"tcg_gen_ext_i32(t2, VAR_2, VAR_5 & MO_SIZE);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
... |
1,625 | static void rtce_init(VIOsPAPRDevice *dev)
{
size_t size = (dev->rtce_window_size >> SPAPR_VIO_TCE_PAGE_SHIFT)
* sizeof(VIOsPAPR_RTCE);
if (size) {
dev->rtce_table = g_malloc0(size);
}
}
| false | qemu | 0f5cb2989f33059a70e8da335b62af5f27fabbe2 | static void rtce_init(VIOsPAPRDevice *dev)
{
size_t size = (dev->rtce_window_size >> SPAPR_VIO_TCE_PAGE_SHIFT)
* sizeof(VIOsPAPR_RTCE);
if (size) {
dev->rtce_table = g_malloc0(size);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(VIOsPAPRDevice *VAR_0)
{
size_t size = (VAR_0->rtce_window_size >> SPAPR_VIO_TCE_PAGE_SHIFT)
* sizeof(VIOsPAPR_RTCE);
if (size) {
VAR_0->rtce_table = g_malloc0(size);
}
}
| [
"static void FUNC_0(VIOsPAPRDevice *VAR_0)\n{",
"size_t size = (VAR_0->rtce_window_size >> SPAPR_VIO_TCE_PAGE_SHIFT)\n* sizeof(VIOsPAPR_RTCE);",
"if (size) {",
"VAR_0->rtce_table = g_malloc0(size);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
1,627 | BlockAIOCB *ide_issue_trim(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
TrimAIOCB *iocb;
iocb = qemu_aio_get(&trim_aiocb_info, bs, cb, opaque);
iocb->bh = qemu_bh_new(ide_trim_bh_cb, iocb);
iocb->ret = 0;
... | false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | BlockAIOCB *ide_issue_trim(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
TrimAIOCB *iocb;
iocb = qemu_aio_get(&trim_aiocb_info, bs, cb, opaque);
iocb->bh = qemu_bh_new(ide_trim_bh_cb, iocb);
iocb->ret = 0;
... | {
"code": [],
"line_no": []
} | BlockAIOCB *FUNC_0(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
TrimAIOCB *iocb;
iocb = qemu_aio_get(&trim_aiocb_info, bs, cb, opaque);
iocb->bh = qemu_bh_new(ide_trim_bh_cb, iocb);
iocb->ret = 0;
ioc... | [
"BlockAIOCB *FUNC_0(BlockDriverState *bs,\nint64_t sector_num, QEMUIOVector *qiov, int nb_sectors,\nBlockCompletionFunc *cb, void *opaque)\n{",
"TrimAIOCB *iocb;",
"iocb = qemu_aio_get(&trim_aiocb_info, bs, cb, opaque);",
"iocb->bh = qemu_bh_new(ide_trim_bh_cb, iocb);",
"iocb->ret = 0;",
"iocb->qiov = qio... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
1,629 | uint32_t lduw_phys(target_phys_addr_t addr)
{
return lduw_phys_internal(addr, DEVICE_NATIVE_ENDIAN);
}
| false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | uint32_t lduw_phys(target_phys_addr_t addr)
{
return lduw_phys_internal(addr, DEVICE_NATIVE_ENDIAN);
}
| {
"code": [],
"line_no": []
} | uint32_t FUNC_0(target_phys_addr_t addr)
{
return lduw_phys_internal(addr, DEVICE_NATIVE_ENDIAN);
}
| [
"uint32_t FUNC_0(target_phys_addr_t addr)\n{",
"return lduw_phys_internal(addr, DEVICE_NATIVE_ENDIAN);",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,630 | static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int size)
{
DiracContext *s = avctx->priv_data;
DiracFrame *pic = NULL;
int ret, i, parse_code = buf[4];
unsigned tmp;
if (size < DATA_UNIT_HEADER_SIZE)
return -1;
init_get_bits(&s->gb, &buf[13],... | false | FFmpeg | 5a455dd011151fd7e3f8aced745b206ca1413d29 | static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int size)
{
DiracContext *s = avctx->priv_data;
DiracFrame *pic = NULL;
int ret, i, parse_code = buf[4];
unsigned tmp;
if (size < DATA_UNIT_HEADER_SIZE)
return -1;
init_get_bits(&s->gb, &buf[13],... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
DiracContext *s = VAR_0->priv_data;
DiracFrame *pic = NULL;
int VAR_3, VAR_4, VAR_5 = VAR_1[4];
unsigned VAR_6;
if (VAR_2 < DATA_UNIT_HEADER_SIZE)
return -1;
init_get_bits(&s->gb, &VAR_1[13], 8*(V... | [
"static int FUNC_0(AVCodecContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"DiracContext *s = VAR_0->priv_data;",
"DiracFrame *pic = NULL;",
"int VAR_3, VAR_4, VAR_5 = VAR_1[4];",
"unsigned VAR_6;",
"if (VAR_2 < DATA_UNIT_HEADER_SIZE)\nreturn -1;",
"init_get_bits(&s->gb, &VAR_1[13], 8*(VAR_2 - ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15,
17
],
[
21
],
[
25
],
[
27,
29
],
[
35,
37
],
[
41
],
[
45,
47
],
[
51
],
[
53
],
[
55
],
[
57
],
[
59
],
[
61
... |
1,631 | static int h264_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
H264Context *h = s->priv_data;
ParseContext *pc = &h->s.parse_context;
int next;
if(... | false | FFmpeg | 3b77e48f0a4b6d660cd7eb14cd56f93fcb426ae2 | static int h264_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
H264Context *h = s->priv_data;
ParseContext *pc = &h->s.parse_context;
int next;
if(... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecParserContext *VAR_0,
AVCodecContext *VAR_1,
uint8_t **VAR_2, int *VAR_3,
const uint8_t *VAR_4, int VAR_5)
{
H264Context *h = VAR_0->priv_data;
ParseContext *pc = &h->VAR_0.parse_context;
int VAR_6;
if(V... | [
"static int FUNC_0(AVCodecParserContext *VAR_0,\nAVCodecContext *VAR_1,\nuint8_t **VAR_2, int *VAR_3,\nconst uint8_t *VAR_4, int VAR_5)\n{",
"H264Context *h = VAR_0->priv_data;",
"ParseContext *pc = &h->VAR_0.parse_context;",
"int VAR_6;",
"if(VAR_0->flags & PARSER_FLAG_COMPLETE_FRAMES){",
"VAR_6= VAR_5;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[... |
1,632 | av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
{
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
if (avctx->lowres==1) {
c->idct_put = ff_jref_idct4_put;
c->idct_add = ff_jref_idct4_add;
c->idct = ff_j_rev_dct4;
c->perm_type... | false | FFmpeg | 928cb84b32b639841ac1ec2957155a6abd53309f | av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
{
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
if (avctx->lowres==1) {
c->idct_put = ff_jref_idct4_put;
c->idct_add = ff_jref_idct4_add;
c->idct = ff_j_rev_dct4;
c->perm_type... | {
"code": [],
"line_no": []
} | av_cold void FUNC_0(IDCTDSPContext *c, AVCodecContext *avctx)
{
const unsigned VAR_0 = avctx->bits_per_raw_sample > 8;
if (avctx->lowres==1) {
c->idct_put = ff_jref_idct4_put;
c->idct_add = ff_jref_idct4_add;
c->idct = ff_j_rev_dct4;
c->perm_type = FF_IDCT_PERM_NO... | [
"av_cold void FUNC_0(IDCTDSPContext *c, AVCodecContext *avctx)\n{",
"const unsigned VAR_0 = avctx->bits_per_raw_sample > 8;",
"if (avctx->lowres==1) {",
"c->idct_put = ff_jref_idct4_put;",
"c->idct_add = ff_jref_idct4_add;",
"c->idct = ff_j_rev_dct4;",
"c->perm_type = FF_IDCT_PERM_NONE;",
"} el... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
1,633 | do_command(GIOChannel *source,
GIOCondition condition,
gpointer data)
{
char *string;
VCardEmulError error;
static unsigned int default_reader_id;
unsigned int reader_id;
VReader *reader = NULL;
GError *err = NULL;
g_assert(condition & G_IO_IN);
reade... | true | qemu | 124fe7fb1b7a1db8cb2ebb9edae84716ffaf37ce | do_command(GIOChannel *source,
GIOCondition condition,
gpointer data)
{
char *string;
VCardEmulError error;
static unsigned int default_reader_id;
unsigned int reader_id;
VReader *reader = NULL;
GError *err = NULL;
g_assert(condition & G_IO_IN);
reade... | {
"code": [],
"line_no": []
} | FUNC_0(GIOChannel *VAR_0,
GIOCondition VAR_1,
gpointer VAR_2)
{
char *VAR_3;
VCardEmulError error;
static unsigned int VAR_4;
unsigned int VAR_5;
VReader *reader = NULL;
GError *err = NULL;
g_assert(VAR_1 & G_IO_IN);
VAR_5 = VAR_4;
g_io_channel_r... | [
"FUNC_0(GIOChannel *VAR_0,\nGIOCondition VAR_1,\ngpointer VAR_2)\n{",
"char *VAR_3;",
"VCardEmulError error;",
"static unsigned int VAR_4;",
"unsigned int VAR_5;",
"VReader *reader = NULL;",
"GError *err = NULL;",
"g_assert(VAR_1 & G_IO_IN);",
"VAR_5 = VAR_4;",
"g_io_channel_read_line(VAR_0, &VAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
47
],
[
49
],
[
51
... |
1,634 | envlist_unsetenv(envlist_t *envlist, const char *env)
{
struct envlist_entry *entry;
size_t envname_len;
if ((envlist == NULL) || (env == NULL))
return (EINVAL);
/* env is not allowed to contain '=' */
if (strchr(env, '=') != NULL)
return (EINVAL);
/*
* Find out the requested entry and remov... | true | qemu | ec45bbe5f1921c6553fbf9c0c76b358b0403c22d | envlist_unsetenv(envlist_t *envlist, const char *env)
{
struct envlist_entry *entry;
size_t envname_len;
if ((envlist == NULL) || (env == NULL))
return (EINVAL);
if (strchr(env, '=') != NULL)
return (EINVAL);
envname_len = strlen(env);
for (entry = envlist->el_entries.lh_first; entr... | {
"code": [
"\t\tfree((char *)entry->ev_var);",
"\t\tfree(entry);",
"\t\tfree((char *)entry->ev_var);",
"\t\tfree(entry);",
"\t\tfree(entry);",
"\t\tfree((char *)entry->ev_var);",
"\t\tfree(entry);"
],
"line_no": [
49,
51,
49,
51,
51,
49,
51
]
} | FUNC_0(envlist_t *VAR_0, const char *VAR_1)
{
struct envlist_entry *VAR_2;
size_t envname_len;
if ((VAR_0 == NULL) || (VAR_1 == NULL))
return (EINVAL);
if (strchr(VAR_1, '=') != NULL)
return (EINVAL);
envname_len = strlen(VAR_1);
for (VAR_2 = VAR_0->el_entries.lh_first; VAR_2 != NUL... | [
"FUNC_0(envlist_t *VAR_0, const char *VAR_1)\n{",
"struct envlist_entry *VAR_2;",
"size_t envname_len;",
"if ((VAR_0 == NULL) || (VAR_1 == NULL))\nreturn (EINVAL);",
"if (strchr(VAR_1, '=') != NULL)\nreturn (EINVAL);",
"envname_len = strlen(VAR_1);",
"for (VAR_2 = VAR_0->el_entries.lh_first; VAR_2 != NU... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
19,
21
],
[
33
],
[
35
],
[
37
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
55
],
[
57
],
[
59
],
[
61
]
] |
1,635 | static av_cold int mpc8_decode_init(AVCodecContext * avctx)
{
int i;
MPCContext *c = avctx->priv_data;
GetBitContext gb;
static int vlc_initialized = 0;
int channels;
static VLC_TYPE band_table[542][2];
static VLC_TYPE q1_table[520][2];
static VLC_TYPE q9up_table[524][2];
... | true | FFmpeg | 44c10168cff41c200825448b77cb8feff0d316c9 | static av_cold int mpc8_decode_init(AVCodecContext * avctx)
{
int i;
MPCContext *c = avctx->priv_data;
GetBitContext gb;
static int vlc_initialized = 0;
int channels;
static VLC_TYPE band_table[542][2];
static VLC_TYPE q1_table[520][2];
static VLC_TYPE q9up_table[524][2];
... | {
"code": [
" avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;"
],
"line_no": [
95
]
} | static av_cold int FUNC_0(AVCodecContext * avctx)
{
int VAR_0;
MPCContext *c = avctx->priv_data;
GetBitContext gb;
static int VAR_1 = 0;
int VAR_2;
static VLC_TYPE VAR_3[542][2];
static VLC_TYPE VAR_4[520][2];
static VLC_TYPE VAR_5[524][2];
static VLC_TYPE VAR_6[1 << MPC8... | [
"static av_cold int FUNC_0(AVCodecContext * avctx)\n{",
"int VAR_0;",
"MPCContext *c = avctx->priv_data;",
"GetBitContext gb;",
"static int VAR_1 = 0;",
"int VAR_2;",
"static VLC_TYPE VAR_3[542][2];",
"static VLC_TYPE VAR_4[520][2];",
"static VLC_TYPE VAR_5[524][2];",
"static VLC_TYPE VAR_6[1 << M... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
... |
1,636 | static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base)
{
int val, inv;
inv = arith_get_model_sym(acoder, &ctx->edge_mode);
val = arith_get_model_sym(acoder, &ctx->pivot) + 1;
if (val > 2) {
if ((base + 1) / 2 - 2 <= 0) {
ctx->corrupted = 1;
re... | true | FFmpeg | 6ad45600313f0df1abf31abdd28f4339dbdc7ca0 | static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base)
{
int val, inv;
inv = arith_get_model_sym(acoder, &ctx->edge_mode);
val = arith_get_model_sym(acoder, &ctx->pivot) + 1;
if (val > 2) {
if ((base + 1) / 2 - 2 <= 0) {
ctx->corrupted = 1;
re... | {
"code": [
" if (val == base) {"
],
"line_no": [
31
]
} | static int FUNC_0(MSS1Context *VAR_0, ArithCoder *VAR_1, int VAR_2)
{
int VAR_3, VAR_4;
VAR_4 = arith_get_model_sym(VAR_1, &VAR_0->edge_mode);
VAR_3 = arith_get_model_sym(VAR_1, &VAR_0->pivot) + 1;
if (VAR_3 > 2) {
if ((VAR_2 + 1) / 2 - 2 <= 0) {
VAR_0->corrupted = 1;
... | [
"static int FUNC_0(MSS1Context *VAR_0, ArithCoder *VAR_1, int VAR_2)\n{",
"int VAR_3, VAR_4;",
"VAR_4 = arith_get_model_sym(VAR_1, &VAR_0->edge_mode);",
"VAR_3 = arith_get_model_sym(VAR_1, &VAR_0->pivot) + 1;",
"if (VAR_3 > 2) {",
"if ((VAR_2 + 1) / 2 - 2 <= 0) {",
"VAR_0->corrupted = 1;",
"return 0;"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
]
] |
1,637 | static void ccw_init(MachineState *machine)
{
int ret;
VirtualCssBus *css_bus;
s390_sclp_init();
s390_memory_init(machine->ram_size);
/* init CPUs (incl. CPU model) early so s390_has_feature() works */
s390_init_cpus(machine);
s390_flic_init();
/* get a BUS */
css_b... | true | qemu | c1843e20924c9f79c8233ea34db31f3ae2a74677 | static void ccw_init(MachineState *machine)
{
int ret;
VirtualCssBus *css_bus;
s390_sclp_init();
s390_memory_init(machine->ram_size);
s390_init_cpus(machine);
s390_flic_init();
css_bus = virtual_css_bus_init();
s390_init_ipl_dev(machine->kernel_filename, mach... | {
"code": [
" if (s390_has_feat(S390_FEAT_ZPCI)) {",
" DeviceState *dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE);",
" object_property_add_child(qdev_get_machine(),",
" TYPE_S390_PCI_HOST_BRIDGE,",
" OBJECT(dev... | static void FUNC_0(MachineState *VAR_0)
{
int VAR_1;
VirtualCssBus *css_bus;
s390_sclp_init();
s390_memory_init(VAR_0->ram_size);
s390_init_cpus(VAR_0);
s390_flic_init();
css_bus = virtual_css_bus_init();
s390_init_ipl_dev(VAR_0->kernel_filename, VAR_0->kerne... | [
"static void FUNC_0(MachineState *VAR_0)\n{",
"int VAR_1;",
"VirtualCssBus *css_bus;",
"s390_sclp_init();",
"s390_memory_init(VAR_0->ram_size);",
"s390_init_cpus(VAR_0);",
"s390_flic_init();",
"css_bus = virtual_css_bus_init();",
"s390_init_ipl_dev(VAR_0->kernel_filename, VAR_0->kernel_cmdline,\nVAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
19
],
[
23
],
[
29
],
[
31,
33,
35
],
[
39
],
[
41
],
[
43,
45,
47
],
[
49
],
[
51
],
[
57
],
[
61
],
[
73
],
[
75... |
1,638 | int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
{
int ret = -ENOSYS;
KVMState *s = kvm_state;
if (s->coalesced_mmio) {
struct kvm_coalesced_mmio_zone zone;
zone.addr = start;
zone.size = size;
ret = kvm_vm_ioctl(s, KVM_UNREGISTER_COALE... | true | qemu | 7e680753cfa2986e0a8b3b222b6bf0b003c5eb69 | int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
{
int ret = -ENOSYS;
KVMState *s = kvm_state;
if (s->coalesced_mmio) {
struct kvm_coalesced_mmio_zone zone;
zone.addr = start;
zone.size = size;
ret = kvm_vm_ioctl(s, KVM_UNREGISTER_COALE... | {
"code": [],
"line_no": []
} | int FUNC_0(target_phys_addr_t VAR_0, ram_addr_t VAR_1)
{
int VAR_2 = -ENOSYS;
KVMState *s = kvm_state;
if (s->coalesced_mmio) {
struct kvm_coalesced_mmio_zone VAR_3;
VAR_3.addr = VAR_0;
VAR_3.VAR_1 = VAR_1;
VAR_2 = kvm_vm_ioctl(s, KVM_UNREGISTER_COALESCED_MMIO,... | [
"int FUNC_0(target_phys_addr_t VAR_0, ram_addr_t VAR_1)\n{",
"int VAR_2 = -ENOSYS;",
"KVMState *s = kvm_state;",
"if (s->coalesced_mmio) {",
"struct kvm_coalesced_mmio_zone VAR_3;",
"VAR_3.addr = VAR_0;",
"VAR_3.VAR_1 = VAR_1;",
"VAR_2 = kvm_vm_ioctl(s, KVM_UNREGISTER_COALESCED_MMIO, &VAR_3);",
"}",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
17
],
[
19
],
[
24
],
[
26
],
[
30
],
[
32
]
] |
1,639 | static int wma_decode_init(AVCodecContext * avctx)
{
WMADecodeContext *s = avctx->priv_data;
int i, flags1, flags2;
float *window;
uint8_t *extradata;
float bps1, high_freq;
volatile float bps;
int sample_rate1;
int coef_vlc_table;
s->sample_rate = avctx->sample_rate;... | true | FFmpeg | 073c2593c9f0aa4445a6fc1b9b24e6e52a8cc2c1 | static int wma_decode_init(AVCodecContext * avctx)
{
WMADecodeContext *s = avctx->priv_data;
int i, flags1, flags2;
float *window;
uint8_t *extradata;
float bps1, high_freq;
volatile float bps;
int sample_rate1;
int coef_vlc_table;
s->sample_rate = avctx->sample_rate;... | {
"code": [
" hgain_huffcodes, 2, 2);",
" scale_huffcodes, 4, 4);"
],
"line_no": [
583,
595
]
} | static int FUNC_0(AVCodecContext * VAR_0)
{
WMADecodeContext *s = VAR_0->priv_data;
int VAR_18, VAR_2, VAR_3;
float *VAR_4;
uint8_t *extradata;
float VAR_5, VAR_6;
volatile float VAR_7;
int VAR_8;
int VAR_9;
s->sample_rate = VAR_0->sample_rate;
s->nb_channels = V... | [
"static int FUNC_0(AVCodecContext * VAR_0)\n{",
"WMADecodeContext *s = VAR_0->priv_data;",
"int VAR_18, VAR_2, VAR_3;",
"float *VAR_4;",
"uint8_t *extradata;",
"float VAR_5, VAR_6;",
"volatile float VAR_7;",
"int VAR_8;",
"int VAR_9;",
"s->sample_rate = VAR_0->sample_rate;",
"s->nb_channels = VA... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
47
],
[
49
... |
1,640 | void virtio_net_exit(VirtIODevice *vdev)
{
VirtIONet *n = DO_UPCAST(VirtIONet, vdev, vdev);
qemu_del_vm_change_state_handler(n->vmstate);
if (n->vhost_started) {
vhost_net_stop(tap_get_vhost_net(n->nic->nc.peer), vdev);
}
qemu_purge_queued_packets(&n->nic->nc);
unregister_s... | true | qemu | a697a334b3c4d3250e6420f5d38550ea10eb5319 | void virtio_net_exit(VirtIODevice *vdev)
{
VirtIONet *n = DO_UPCAST(VirtIONet, vdev, vdev);
qemu_del_vm_change_state_handler(n->vmstate);
if (n->vhost_started) {
vhost_net_stop(tap_get_vhost_net(n->nic->nc.peer), vdev);
}
qemu_purge_queued_packets(&n->nic->nc);
unregister_s... | {
"code": [
" qemu_del_timer(n->tx_timer);",
" qemu_free_timer(n->tx_timer);"
],
"line_no": [
33,
35
]
} | void FUNC_0(VirtIODevice *VAR_0)
{
VirtIONet *n = DO_UPCAST(VirtIONet, VAR_0, VAR_0);
qemu_del_vm_change_state_handler(n->vmstate);
if (n->vhost_started) {
vhost_net_stop(tap_get_vhost_net(n->nic->nc.peer), VAR_0);
}
qemu_purge_queued_packets(&n->nic->nc);
unregister_savevm... | [
"void FUNC_0(VirtIODevice *VAR_0)\n{",
"VirtIONet *n = DO_UPCAST(VirtIONet, VAR_0, VAR_0);",
"qemu_del_vm_change_state_handler(n->vmstate);",
"if (n->vhost_started) {",
"vhost_net_stop(tap_get_vhost_net(n->nic->nc.peer), VAR_0);",
"}",
"qemu_purge_queued_packets(&n->nic->nc);",
"unregister_savevm(n->q... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
]
] |
1,641 | static void v7m_exception_taken(ARMCPU *cpu, uint32_t lr)
{
/* Do the "take the exception" parts of exception entry,
* but not the pushing of state to the stack. This is
* similar to the pseudocode ExceptionTaken() function.
*/
CPUARMState *env = &cpu->env;
uint32_t addr;
armv7m... | true | qemu | d3392718e1fcf0859fb7c0774a8e946bacb8419c | static void v7m_exception_taken(ARMCPU *cpu, uint32_t lr)
{
CPUARMState *env = &cpu->env;
uint32_t addr;
armv7m_nvic_acknowledge_irq(env->nvic);
write_v7m_control_spsel(env, 0);
arm_clear_exclusive(env);
env->condexec_bits = 0;
env->regs[14] = lr;
addr = arm_... | {
"code": [
"static void v7m_exception_taken(ARMCPU *cpu, uint32_t lr)",
" armv7m_nvic_acknowledge_irq(env->nvic);",
" addr = arm_v7m_load_vector(cpu);"
],
"line_no": [
1,
19,
31
]
} | static void FUNC_0(ARMCPU *VAR_0, uint32_t VAR_1)
{
CPUARMState *env = &VAR_0->env;
uint32_t addr;
armv7m_nvic_acknowledge_irq(env->nvic);
write_v7m_control_spsel(env, 0);
arm_clear_exclusive(env);
env->condexec_bits = 0;
env->regs[14] = VAR_1;
addr = arm_v7m... | [
"static void FUNC_0(ARMCPU *VAR_0, uint32_t VAR_1)\n{",
"CPUARMState *env = &VAR_0->env;",
"uint32_t addr;",
"armv7m_nvic_acknowledge_irq(env->nvic);",
"write_v7m_control_spsel(env, 0);",
"arm_clear_exclusive(env);",
"env->condexec_bits = 0;",
"env->regs[14] = VAR_1;",
"addr = arm_v7m_load_vector(VA... | [
1,
0,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
1,643 | static int omap_intc_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
struct omap_intr_handler_s *s = OMAP_INTC(dev);
if (!s->iclk) {
hw_error("omap-intc: clk not connected\n");
}
s->nbanks = 1;
sysbus_init_irq(sbd, &s->parent_intr[0]);
sysbus_init_irq(sbd, &s->pa... | true | qemu | 84a3a53cf61ef691478bd91afa455c801696053c | static int omap_intc_init(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
struct omap_intr_handler_s *s = OMAP_INTC(dev);
if (!s->iclk) {
hw_error("omap-intc: clk not connected\n");
}
s->nbanks = 1;
sysbus_init_irq(sbd, &s->parent_intr[0]);
sysbus_init_irq(sbd, &s->pa... | {
"code": [
" hw_error(\"omap-intc: clk not connected\\n\");"
],
"line_no": [
13
]
} | static int FUNC_0(SysBusDevice *VAR_0)
{
DeviceState *dev = DEVICE(VAR_0);
struct omap_intr_handler_s *VAR_1 = OMAP_INTC(dev);
if (!VAR_1->iclk) {
hw_error("omap-intc: clk not connected\n");
}
VAR_1->nbanks = 1;
sysbus_init_irq(VAR_0, &VAR_1->parent_intr[0]);
sysbus_init_i... | [
"static int FUNC_0(SysBusDevice *VAR_0)\n{",
"DeviceState *dev = DEVICE(VAR_0);",
"struct omap_intr_handler_s *VAR_1 = OMAP_INTC(dev);",
"if (!VAR_1->iclk) {",
"hw_error(\"omap-intc: clk not connected\\n\");",
"}",
"VAR_1->nbanks = 1;",
"sysbus_init_irq(VAR_0, &VAR_1->parent_intr[0]);",
"sysbus_init... | [
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
]
] |
1,644 | static void mov_read_chapters(AVFormatContext *s)
{
MOVContext *mov = s->priv_data;
AVStream *st = NULL;
MOVStreamContext *sc;
int64_t cur_pos;
int i;
for (i = 0; i < s->nb_streams; i++)
if (s->streams[i]->id == mov->chapter_track) {
st = s->streams[i];
... | true | FFmpeg | 8fb22c3d47ccb87d0ee235226a700d2b3ca97afb | static void mov_read_chapters(AVFormatContext *s)
{
MOVContext *mov = s->priv_data;
AVStream *st = NULL;
MOVStreamContext *sc;
int64_t cur_pos;
int i;
for (i = 0; i < s->nb_streams; i++)
if (s->streams[i]->id == mov->chapter_track) {
st = s->streams[i];
... | {
"code": [
" ch = avio_rb16(sc->pb);",
" if (ch == 0xfeff)",
" avio_get_str16be(sc->pb, len, title, title_len);",
" else if (ch == 0xfffe)",
" avio_get_str16le(sc->pb, len, title, title_len);",
" else {",
" AV_WB16(title, ch);",... | static void FUNC_0(AVFormatContext *VAR_0)
{
MOVContext *mov = VAR_0->priv_data;
AVStream *st = NULL;
MOVStreamContext *sc;
int64_t cur_pos;
int VAR_1;
for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++)
if (VAR_0->streams[VAR_1]->id == mov->chapter_track) {
st = V... | [
"static void FUNC_0(AVFormatContext *VAR_0)\n{",
"MOVContext *mov = VAR_0->priv_data;",
"AVStream *st = NULL;",
"MOVStreamContext *sc;",
"int64_t cur_pos;",
"int VAR_1;",
"for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++)",
"if (VAR_0->streams[VAR_1]->id == mov->chapter_track) {",
"st = VAR_0->str... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
... |
1,645 | int ff_cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
{
int count, i;
if (avctx->bits_per_coded_sample > 8) {
av_log(avctx, AV_LOG_ERROR, "bit_per_coded_sample > 8 not supported\n");
return AVERROR_INVALIDDATA;
}
count = 1 << avctx->bits_per_coded_sample;
if (avc... | true | FFmpeg | ebcf7c3227906382205141beb2d0467f245472d1 | int ff_cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
{
int count, i;
if (avctx->bits_per_coded_sample > 8) {
av_log(avctx, AV_LOG_ERROR, "bit_per_coded_sample > 8 not supported\n");
return AVERROR_INVALIDDATA;
}
count = 1 << avctx->bits_per_coded_sample;
if (avc... | {
"code": [
" if (avctx->extradata_size < count * 3) {",
" av_log(avctx, AV_LOG_ERROR, \"palette data underflow\\n\");",
" return AVERROR_INVALIDDATA;"
],
"line_no": [
21,
23,
13
]
} | int FUNC_0(AVCodecContext *VAR_0, uint32_t *VAR_1)
{
int VAR_2, VAR_3;
if (VAR_0->bits_per_coded_sample > 8) {
av_log(VAR_0, AV_LOG_ERROR, "bit_per_coded_sample > 8 not supported\n");
return AVERROR_INVALIDDATA;
}
VAR_2 = 1 << VAR_0->bits_per_coded_sample;
if (VAR_0->extr... | [
"int FUNC_0(AVCodecContext *VAR_0, uint32_t *VAR_1)\n{",
"int VAR_2, VAR_3;",
"if (VAR_0->bits_per_coded_sample > 8) {",
"av_log(VAR_0, AV_LOG_ERROR, \"bit_per_coded_sample > 8 not supported\\n\");",
"return AVERROR_INVALIDDATA;",
"}",
"VAR_2 = 1 << VAR_0->bits_per_coded_sample;",
"if (VAR_0->extradat... | [
0,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
]
] |
1,646 | static void isabus_bridge_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->fw_name = "isa";
} | true | qemu | e4f4fb1eca795e36f363b4647724221e774523c1 | static void isabus_bridge_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->fw_name = "isa";
} | {
"code": [],
"line_no": []
} | static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)
{
DeviceClass *dc = DEVICE_CLASS(VAR_0);
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
dc->fw_name = "isa";
} | [
"static void FUNC_0(ObjectClass *VAR_0, void *VAR_1)\n{",
"DeviceClass *dc = DEVICE_CLASS(VAR_0);",
"set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);",
"dc->fw_name = \"isa\";",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
18
]
] |
1,647 | static void disable_device(PIIX4PMState *s, int slot)
{
s->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;
s->pci0_status.down |= (1 << slot);
}
| true | qemu | 7faa8075d898ae56d2c533c530569bb25ab86eaf | static void disable_device(PIIX4PMState *s, int slot)
{
s->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;
s->pci0_status.down |= (1 << slot);
}
| {
"code": [
" s->pci0_status.down |= (1 << slot);"
],
"line_no": [
7
]
} | static void FUNC_0(PIIX4PMState *VAR_0, int VAR_1)
{
VAR_0->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;
VAR_0->pci0_status.down |= (1 << VAR_1);
}
| [
"static void FUNC_0(PIIX4PMState *VAR_0, int VAR_1)\n{",
"VAR_0->ar.gpe.sts[0] |= PIIX4_PCI_HOTPLUG_STATUS;",
"VAR_0->pci0_status.down |= (1 << VAR_1);",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
1,648 | void page_set_flags(target_ulong start, target_ulong end, int flags)
{
target_ulong addr, len;
/* This function should never be called with addresses outside the
guest address space. If this assert fires, it probably indicates
a missing call to h2g_valid. */
#if TARGET_ABI_BITS > L1_MAP_... | true | qemu | de258eb07db6cf893ef1bfad8c0cedc0b983db55 | void page_set_flags(target_ulong start, target_ulong end, int flags)
{
target_ulong addr, len;
#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS
assert(end < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
#endif
assert(start < end);
assert_memory_lock();
start = start & TARGET_PAGE_M... | {
"code": [
" assert(end < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS));"
],
"line_no": [
17
]
} | void FUNC_0(target_ulong VAR_0, target_ulong VAR_1, int VAR_2)
{
target_ulong addr, len;
#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS
assert(VAR_1 < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS));
#endif
assert(VAR_0 < VAR_1);
assert_memory_lock();
VAR_0 = VAR_0 & TARGET_PAGE_MAS... | [
"void FUNC_0(target_ulong VAR_0, target_ulong VAR_1, int VAR_2)\n{",
"target_ulong addr, len;",
"#if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS\nassert(VAR_1 < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS));",
"#endif\nassert(VAR_0 < VAR_1);",
"assert_memory_lock();",
"VAR_0 = VAR_0 & TARGET_PAGE_MASK;",
"V... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
15,
17
],
[
19,
21
],
[
23
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
55,
57,
59
],
[
61
],
[
63
],
[
6... |
1,649 | static int print_block_option_help(const char *filename, const char *fmt)
{
BlockDriver *drv, *proto_drv;
QEMUOptionParameter *create_options = NULL;
/* Find driver and parse its options */
drv = bdrv_find_format(fmt);
if (!drv) {
error_report("Unknown file format '%s'", fmt);
... | true | qemu | ebee92b4fef9defa19a8c348ec8b2716732ad4df | static int print_block_option_help(const char *filename, const char *fmt)
{
BlockDriver *drv, *proto_drv;
QEMUOptionParameter *create_options = NULL;
drv = bdrv_find_format(fmt);
if (!drv) {
error_report("Unknown file format '%s'", fmt);
return 1;
}
create_opti... | {
"code": [],
"line_no": []
} | static int FUNC_0(const char *VAR_0, const char *VAR_1)
{
BlockDriver *drv, *proto_drv;
QEMUOptionParameter *create_options = NULL;
drv = bdrv_find_format(VAR_1);
if (!drv) {
error_report("Unknown file format '%s'", VAR_1);
return 1;
}
create_options = append_o... | [
"static int FUNC_0(const char *VAR_0, const char *VAR_1)\n{",
"BlockDriver *drv, *proto_drv;",
"QEMUOptionParameter *create_options = NULL;",
"drv = bdrv_find_format(VAR_1);",
"if (!drv) {",
"error_report(\"Unknown file format '%s'\", VAR_1);",
"return 1;",
"}",
"create_options = append_option_param... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25,
27
],
[
31
],
[
33
],
[
35
],
[
37
],
[
40
],
[
42
],
[
44,
46
],
[
48
],
[
52
],
[
55... |
1,650 | av_cold int ffv1_init_slice_contexts(FFV1Context *f)
{
int i;
f->slice_count = f->num_h_slices * f->num_v_slices;
av_assert0(f->slice_count > 0);
for (i = 0; i < f->slice_count; i++) {
FFV1Context *fs = av_mallocz(sizeof(*fs));
int sx = i % f->num_h_slices;
int sy ... | true | FFmpeg | 5a8311513091ea7277578fbaf189e460dd1d4c7d | av_cold int ffv1_init_slice_contexts(FFV1Context *f)
{
int i;
f->slice_count = f->num_h_slices * f->num_v_slices;
av_assert0(f->slice_count > 0);
for (i = 0; i < f->slice_count; i++) {
FFV1Context *fs = av_mallocz(sizeof(*fs));
int sx = i % f->num_h_slices;
int sy ... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(FFV1Context *f)
{
int VAR_0;
f->slice_count = f->num_h_slices * f->num_v_slices;
av_assert0(f->slice_count > 0);
for (VAR_0 = 0; VAR_0 < f->slice_count; VAR_0++) {
FFV1Context *fs = av_mallocz(sizeof(*fs));
int sx = VAR_0 % f->num_h_slices;
int sy ... | [
"av_cold int FUNC_0(FFV1Context *f)\n{",
"int VAR_0;",
"f->slice_count = f->num_h_slices * f->num_v_slices;",
"av_assert0(f->slice_count > 0);",
"for (VAR_0 = 0; VAR_0 < f->slice_count; VAR_0++) {",
"FFV1Context *fs = av_mallocz(sizeof(*fs));",
"int sx = VAR_0 % f->num_h_slices;",
"int sy ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
2
],
[
3
],
[
4
],
[
5
],
[
6
],
[
7
],
[
8
],
[
9
],
[
10
],
[
11
],
[
12
],
[
13
],
[
14
],
[
15
],
[
16
],
[
17
],
[
18
],
[
19
],
[
20
],
[
21,
... |
1,651 | void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
{
RTPMuxContext *s = s1->priv_data;
int len, max_packet_size;
uint8_t *p;
const int max_frames_per_packet = s->max_frames_per_packet ? s->max_frames_per_packet : 5;
const int max_au_headers_size = 2 + 2 * max_frames_per_p... | true | FFmpeg | e004d175fe2463af8242e390b15350f4745be7b4 | void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
{
RTPMuxContext *s = s1->priv_data;
int len, max_packet_size;
uint8_t *p;
const int max_frames_per_packet = s->max_frames_per_packet ? s->max_frames_per_packet : 5;
const int max_au_headers_size = 2 + 2 * max_frames_per_p... | {
"code": [
" p[0] = ((au_size * 8) & 0xFF) >> 8;",
" p[1] = (au_size * 8) & 0xFF;"
],
"line_no": [
51,
53
]
} | void FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
RTPMuxContext *s = VAR_0->priv_data;
int VAR_3, VAR_4;
uint8_t *p;
const int VAR_5 = s->VAR_5 ? s->VAR_5 : 5;
const int VAR_6 = 2 + 2 * VAR_5;
if ((VAR_0->streams[0]->codec->extradata_size) == 0) {
VAR... | [
"void FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"RTPMuxContext *s = VAR_0->priv_data;",
"int VAR_3, VAR_4;",
"uint8_t *p;",
"const int VAR_5 = s->VAR_5 ? s->VAR_5 : 5;",
"const int VAR_6 = 2 + 2 * VAR_5;",
"if ((VAR_0->streams[0]->codec->extradata_size) == 0) {",
"VAR_2 -= 7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
53
... |
1,652 | static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt)
{
VqfContext *c = s->priv_data;
int ret;
int size = (c->frame_bit_len - c->remaining_bits + 7)>>3;
if (av_new_packet(pkt, size+2) < 0)
return AVERROR(EIO);
pkt->pos = avio_tell(s->pb);
pkt->stream_index = ... | true | FFmpeg | 06bb1de1c78a3653e197ff3434d550499b556e72 | static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt)
{
VqfContext *c = s->priv_data;
int ret;
int size = (c->frame_bit_len - c->remaining_bits + 7)>>3;
if (av_new_packet(pkt, size+2) < 0)
return AVERROR(EIO);
pkt->pos = avio_tell(s->pb);
pkt->stream_index = ... | {
"code": [
" if (ret<=0) {"
],
"line_no": [
35
]
} | static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{
VqfContext *c = VAR_0->priv_data;
int VAR_2;
int VAR_3 = (c->frame_bit_len - c->remaining_bits + 7)>>3;
if (av_new_packet(VAR_1, VAR_3+2) < 0)
return AVERROR(EIO);
VAR_1->pos = avio_tell(VAR_0->pb);
VAR_1->... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)\n{",
"VqfContext *c = VAR_0->priv_data;",
"int VAR_2;",
"int VAR_3 = (c->frame_bit_len - c->remaining_bits + 7)>>3;",
"if (av_new_packet(VAR_1, VAR_3+2) < 0)\nreturn AVERROR(EIO);",
"VAR_1->pos = avio_tell(VAR_0->pb);",
"VAR_1->stream_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13,
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
],
[
39
],
[
41
],
[
45
],
[
47
],
[
51
],
[
53
]
] |
1,653 | static int vhost_user_cleanup(struct vhost_dev *dev)
{
struct vhost_user *u;
assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);
u = dev->opaque;
if (u->slave_fd >= 0) {
close(u->slave_fd);
u->slave_fd = -1;
}
g_free(u);
dev->opaque = 0;
ret... | true | qemu | b9ec9bd468b2c5b218d16642e8f8ea4df60418bb | static int vhost_user_cleanup(struct vhost_dev *dev)
{
struct vhost_user *u;
assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);
u = dev->opaque;
if (u->slave_fd >= 0) {
close(u->slave_fd);
u->slave_fd = -1;
}
g_free(u);
dev->opaque = 0;
ret... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct vhost_dev *VAR_0)
{
struct vhost_user *VAR_1;
assert(VAR_0->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);
VAR_1 = VAR_0->opaque;
if (VAR_1->slave_fd >= 0) {
close(VAR_1->slave_fd);
VAR_1->slave_fd = -1;
}
g_free(VAR_1);
VAR_0->op... | [
"static int FUNC_0(struct vhost_dev *VAR_0)\n{",
"struct vhost_user *VAR_1;",
"assert(VAR_0->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);",
"VAR_1 = VAR_0->opaque;",
"if (VAR_1->slave_fd >= 0) {",
"close(VAR_1->slave_fd);",
"VAR_1->slave_fd = -1;",
"}",
"g_free(VAR_1);",
"VAR_0->opaque = 0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
18
],
[
20
],
[
22
],
[
24
],
[
26
],
[
30
],
[
32
]
] |
1,654 | av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
if (have_vfp(cpu_flags)) {
if (!have_vfpv3(cpu_flags)) {
c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;
c->int32_to_float_fmul_array... | true | FFmpeg | e2710e790c09e49e86baa58c6063af0097cc8cb0 | av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
if (have_vfp(cpu_flags)) {
if (!have_vfpv3(cpu_flags)) {
c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;
c->int32_to_float_fmul_array... | {
"code": [
" if (have_vfp(cpu_flags)) {"
],
"line_no": [
9
]
} | av_cold void FUNC_0(FmtConvertContext *c, AVCodecContext *avctx)
{
int VAR_0 = av_get_cpu_flags();
if (have_vfp(VAR_0)) {
if (!have_vfpv3(VAR_0)) {
c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;
c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_ar... | [
"av_cold void FUNC_0(FmtConvertContext *c, AVCodecContext *avctx)\n{",
"int VAR_0 = av_get_cpu_flags();",
"if (have_vfp(VAR_0)) {",
"if (!have_vfpv3(VAR_0)) {",
"c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;",
"c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_vfp;",
"}"... | [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
]
] |
1,655 | static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, const uint8_t *src, int srcW, int xInc,
const int16_t *hLumFilter,
const int16_t *hLumFilterPos, int hLumFilterSize,
uint8_t *format... | false | FFmpeg | d1adad3cca407f493c3637e20ecd4f7124e69212 | static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, const uint8_t *src, int srcW, int xInc,
const int16_t *hLumFilter,
const int16_t *hLumFilterPos, int hLumFilterSize,
uint8_t *format... | {
"code": [],
"line_no": []
} | VAR_3staticVAR_3 VAR_3inlineVAR_3 VAR_3voidVAR_3 VAR_3RENAMEVAR_3(VAR_3hyscaleVAR_3)(VAR_3SwsContextVAR_3 *VAR_3cVAR_3, VAR_3uint16_tVAR_3 *VAR_3dstVAR_3, VAR_3longVAR_3 VAR_3dstWidthVAR_3, VAR_3constVAR_3 VAR_3uint8_tVAR_3 *VAR_3srcVAR_3, VAR_3intVAR_3 VAR_3srcWVAR_3, VAR_3intVAR_3 VAR_3xIncVAR_3,
... | [
"VAR_3staticVAR_3 VAR_3inlineVAR_3 VAR_3voidVAR_3 VAR_3RENAMEVAR_3(VAR_3hyscaleVAR_3)(VAR_3SwsContextVAR_3 *VAR_3cVAR_3, VAR_3uint16_tVAR_3 *VAR_3dstVAR_3, VAR_3longVAR_3 VAR_3dstWidthVAR_3, VAR_3constVAR_3 VAR_3uint8_tVAR_3 *VAR_3srcVAR_3, VAR_3intVAR_3 VAR_3srcWVAR_3, VAR_3intVAR_3 VAR_3xIncVAR_3,\nVAR_3constVAR_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9,
11
],
[
13
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
49,
51
],
[
53
]
] |
1,656 | static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
{
int last_index = get_bits_size(gb);
const uint8_t *scan_table = mb->scan_table;
const uint8_t *shift_table = mb->shift_table;
int pos = mb->pos;
int partial_bit_count = mb->partial_bit_count;
int level, pos1, run... | false | FFmpeg | c619ff6daf93a8f3c03decf2d3345d2474c3db91 | static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
{
int last_index = get_bits_size(gb);
const uint8_t *scan_table = mb->scan_table;
const uint8_t *shift_table = mb->shift_table;
int pos = mb->pos;
int partial_bit_count = mb->partial_bit_count;
int level, pos1, run... | {
"code": [],
"line_no": []
} | static void FUNC_0(GetBitContext *VAR_0, BlockInfo *VAR_1, DCTELEM *VAR_2)
{
int VAR_3 = get_bits_size(VAR_0);
const uint8_t *VAR_4 = VAR_1->VAR_4;
const uint8_t *VAR_5 = VAR_1->VAR_5;
int VAR_6 = VAR_1->VAR_6;
int VAR_7 = VAR_1->VAR_7;
int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;
... | [
"static void FUNC_0(GetBitContext *VAR_0, BlockInfo *VAR_1, DCTELEM *VAR_2)\n{",
"int VAR_3 = get_bits_size(VAR_0);",
"const uint8_t *VAR_4 = VAR_1->VAR_4;",
"const uint8_t *VAR_5 = VAR_1->VAR_5;",
"int VAR_6 = VAR_1->VAR_6;",
"int VAR_7 = VAR_1->VAR_7;",
"int VAR_8, VAR_9, VAR_10, VAR_11, VAR_12;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
27
],
[
29,
31
],
[
33
],
[
35
],
[
37
],
[
43
],
[
45,
47
],
[
49,
53
],
[
55
],
[... |
1,658 | int opt_default(const char *opt, const char *arg){
int type;
const AVOption *o= NULL;
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
for(type=0; type<CODEC_TYPE_NB; type++){
const AVOption *o2 = av_find_opt(avctx_opts[0], opt, NULL, o... | false | FFmpeg | 5c3383e5b5c7e3e3c1ba86a58d3e0a1ebf521aa7 | int opt_default(const char *opt, const char *arg){
int type;
const AVOption *o= NULL;
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
for(type=0; type<CODEC_TYPE_NB; type++){
const AVOption *o2 = av_find_opt(avctx_opts[0], opt, NULL, o... | {
"code": [],
"line_no": []
} | int FUNC_0(const char *VAR_0, const char *VAR_1){
int VAR_2;
const AVOption *VAR_3= NULL;
int VAR_4[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
for(VAR_2=0; VAR_2<CODEC_TYPE_NB; VAR_2++){
const AVOption *o2 = av_find_opt(avctx_opts[0], VAR_0, NU... | [
"int FUNC_0(const char *VAR_0, const char *VAR_1){",
"int VAR_2;",
"const AVOption *VAR_3= NULL;",
"int VAR_4[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};",
"for(VAR_2=0; VAR_2<CODEC_TYPE_NB; VAR_2++){",
"const AVOption *o2 = av_find_opt(avctx_opts[0], VAR_0, NUL... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17
],
[
19
],
[
21,
23
],
[
25,
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
39,
41
],
[
43
],
[
45,
47
],
[
57... |
1,659 | static float quantize_band_cost(struct AACEncContext *s, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
int *bits)
{
const float IQ = ff_aac_pow2sf_tab[... | false | FFmpeg | a71e9b62546e4467751c0219869a7f6d004a5986 | static float quantize_band_cost(struct AACEncContext *s, const float *in,
const float *scaled, int size, int scale_idx,
int cb, const float lambda, const float uplim,
int *bits)
{
const float IQ = ff_aac_pow2sf_tab[... | {
"code": [],
"line_no": []
} | static float FUNC_0(struct AACEncContext *VAR_0, const float *VAR_1,
const float *VAR_2, int VAR_3, int VAR_4,
int VAR_5, const float VAR_6, const float VAR_7,
int *VAR_8)
{
const float VAR_9 = ff_aac_pow2sf_tab[200... | [
"static float FUNC_0(struct AACEncContext *VAR_0, const float *VAR_1,\nconst float *VAR_2, int VAR_3, int VAR_4,\nint VAR_5, const float VAR_6, const float VAR_7,\nint *VAR_8)\n{",
"const float VAR_9 = ff_aac_pow2sf_tab[200 + VAR_4 - SCALE_ONE_POS + SCALE_DIV_512];",
"const float VAR_10 = ff_aac_pow2sf_tab[200... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7,
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35,
39
],
[
41
],
[
43
],
[
45,
47
],
[
49
... |
1,660 | static int encode_subband_c0run(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){
const int w= b->width;
const int h= b->height;
int x, y;
if(1){
int run=0;
int runs[w*h];
int run_index=0;
for(y=0; y<h; y+... | false | FFmpeg | b44985ba12d927d643a7bc03b0db98b83bf4fc9e | static int encode_subband_c0run(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){
const int w= b->width;
const int h= b->height;
int x, y;
if(1){
int run=0;
int runs[w*h];
int run_index=0;
for(y=0; y<h; y+... | {
"code": [],
"line_no": []
} | static int FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, DWTELEM *VAR_2, DWTELEM *VAR_3, int VAR_4, int VAR_5){
const int VAR_6= VAR_1->width;
const int VAR_7= VAR_1->height;
int VAR_8, VAR_9;
if(1){
int VAR_10=0;
int VAR_11[VAR_6*VAR_7];
int VAR_12=0;
... | [
"static int FUNC_0(SnowContext *VAR_0, SubBand *VAR_1, DWTELEM *VAR_2, DWTELEM *VAR_3, int VAR_4, int VAR_5){",
"const int VAR_6= VAR_1->width;",
"const int VAR_7= VAR_1->height;",
"int VAR_8, VAR_9;",
"if(1){",
"int VAR_10=0;",
"int VAR_11[VAR_6*VAR_7];",
"int VAR_12=0;",
"for(VAR_9=0; VAR_9<VAR_7;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1
],
[
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
1,661 | static int g722_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
G722Context *c = avctx->priv_data;
int16_t *out_buf = data;
int j, out_len = 0;
const int skip = 8 - avctx->bits_per_coded_sample;
const int16_t *quantizer_table = l... | false | FFmpeg | a3a8572165ce636fb011b78764a2584777f81b95 | static int g722_decode_frame(AVCodecContext *avctx, void *data,
int *data_size, AVPacket *avpkt)
{
G722Context *c = avctx->priv_data;
int16_t *out_buf = data;
int j, out_len = 0;
const int skip = 8 - avctx->bits_per_coded_sample;
const int16_t *quantizer_table = l... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{
G722Context *c = VAR_0->priv_data;
int16_t *out_buf = VAR_1;
int VAR_4, VAR_5 = 0;
const int VAR_6 = 8 - VAR_0->bits_per_coded_sample;
const int16_t *VAR_7 = low_inv_quants[VAR_6]... | [
"static int FUNC_0(AVCodecContext *VAR_0, void *VAR_1,\nint *VAR_2, AVPacket *VAR_3)\n{",
"G722Context *c = VAR_0->priv_data;",
"int16_t *out_buf = VAR_1;",
"int VAR_4, VAR_5 = 0;",
"const int VAR_6 = 8 - VAR_0->bits_per_coded_sample;",
"const int16_t *VAR_7 = low_inv_quants[VAR_6];",
"GetBitContext gb;... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
33
],
[
35
],
[
37
],
[
41,
43
],
[
47
],
[
51
],
[
53
],
[
57
... |
1,662 | int qemu_create_pidfile(const char *filename)
{
char buffer[128];
int len;
int fd;
fd = qemu_open(filename, O_RDWR | O_CREAT, 0600);
if (fd == -1) {
return -1;
}
if (lockf(fd, F_TLOCK, 0) == -1) {
close(fd);
return -1;
}
len = snprintf(buffer, s... | true | qemu | 93dd748b789202af4f5be75412c58ee1ed481b29 | int qemu_create_pidfile(const char *filename)
{
char buffer[128];
int len;
int fd;
fd = qemu_open(filename, O_RDWR | O_CREAT, 0600);
if (fd == -1) {
return -1;
}
if (lockf(fd, F_TLOCK, 0) == -1) {
close(fd);
return -1;
}
len = snprintf(buffer, s... | {
"code": [
" close(fd);"
],
"line_no": [
41
]
} | int FUNC_0(const char *VAR_0)
{
char VAR_1[128];
int VAR_2;
int VAR_3;
VAR_3 = qemu_open(VAR_0, O_RDWR | O_CREAT, 0600);
if (VAR_3 == -1) {
return -1;
}
if (lockf(VAR_3, F_TLOCK, 0) == -1) {
close(VAR_3);
return -1;
}
VAR_2 = snprintf(VAR_1, siz... | [
"int FUNC_0(const char *VAR_0)\n{",
"char VAR_1[128];",
"int VAR_2;",
"int VAR_3;",
"VAR_3 = qemu_open(VAR_0, O_RDWR | O_CREAT, 0600);",
"if (VAR_3 == -1) {",
"return -1;",
"}",
"if (lockf(VAR_3, F_TLOCK, 0) == -1) {",
"close(VAR_3);",
"return -1;",
"}",
"VAR_2 = snprintf(VAR_1, sizeof(VAR_1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43
],
[
45
... |
1,663 | static av_cold int v410_decode_init(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_YUV444P10;
avctx->bits_per_raw_sample = 10;
if (avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even.\n");
return AVERROR_INVALIDDATA;
}
avctx->cod... | true | FFmpeg | 6ed3565f08abf3b1c2a1d2d7fac768b18753530c | static av_cold int v410_decode_init(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_YUV444P10;
avctx->bits_per_raw_sample = 10;
if (avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even.\n");
return AVERROR_INVALIDDATA;
}
avctx->cod... | {
"code": [
" av_log(avctx, AV_LOG_ERROR, \"v410 requires width to be even.\\n\");",
" return AVERROR_INVALIDDATA;"
],
"line_no": [
13,
15
]
} | static av_cold int FUNC_0(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_YUV444P10;
avctx->bits_per_raw_sample = 10;
if (avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even.\n");
return AVERROR_INVALIDDATA;
}
avctx->coded_frame =... | [
"static av_cold int FUNC_0(AVCodecContext *avctx)\n{",
"avctx->pix_fmt = PIX_FMT_YUV444P10;",
"avctx->bits_per_raw_sample = 10;",
"if (avctx->width & 1) {",
"av_log(avctx, AV_LOG_ERROR, \"v410 requires width to be even.\\n\");",
"return AVERROR_INVALIDDATA;",
"}",
"avctx->coded_frame = avc... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
21
],
[
25
],
[
27
],
[
29
],
[
31
],
[
35
],
[
37
]
] |
1,664 | static int alloc_picture(H264Context *h, Picture *pic)
{
int i, ret = 0;
av_assert0(!pic->f.data[0]);
if (h->avctx->hwaccel) {
const AVHWAccel *hwaccel = h->avctx->hwaccel;
av_assert0(!pic->hwaccel_picture_private);
if (hwaccel->priv_data_size) {
pic->hwaccel_... | true | FFmpeg | 9c9ede44f37e291677c0db1c5fabf1c3f6106008 | static int alloc_picture(H264Context *h, Picture *pic)
{
int i, ret = 0;
av_assert0(!pic->f.data[0]);
if (h->avctx->hwaccel) {
const AVHWAccel *hwaccel = h->avctx->hwaccel;
av_assert0(!pic->hwaccel_picture_private);
if (hwaccel->priv_data_size) {
pic->hwaccel_... | {
"code": [
" pic->tf.f = &pic->f;",
" ret = ff_thread_get_buffer(h->avctx, &pic->tf, pic->reference ?",
" AV_GET_BUFFER_FLAG_REF : 0);",
" if (ret < 0)",
" goto fail;",
" h->linesize = pic->f.linesize[0];",
" h->uvl... | static int FUNC_0(H264Context *VAR_0, Picture *VAR_1)
{
int VAR_2, VAR_3 = 0;
av_assert0(!VAR_1->f.data[0]);
if (VAR_0->avctx->VAR_4) {
const AVHWAccel *VAR_4 = VAR_0->avctx->VAR_4;
av_assert0(!VAR_1->hwaccel_picture_private);
if (VAR_4->priv_data_size) {
VAR_... | [
"static int FUNC_0(H264Context *VAR_0, Picture *VAR_1)\n{",
"int VAR_2, VAR_3 = 0;",
"av_assert0(!VAR_1->f.data[0]);",
"if (VAR_0->avctx->VAR_4) {",
"const AVHWAccel *VAR_4 = VAR_0->avctx->VAR_4;",
"av_assert0(!VAR_1->hwaccel_picture_private);",
"if (VAR_4->priv_data_size) {",
"VAR_1->hwaccel_priv_buf... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23,
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35,
37
],
[
39,
41
],
[
45
],
[
47
],
[
51
],
... |
1,665 | static void rc4030_dma_tt_update(rc4030State *s, uint32_t new_tl_base,
uint32_t new_tl_limit)
{
int entries, i;
dma_pagetable_entry *dma_tl_contents;
if (s->dma_tl_limit) {
/* write old dma tl table to physical memory */
memory_region_del_subregion(g... | true | qemu | c627e7526a902dd5bb1907dbbd5cf961679dfa68 | static void rc4030_dma_tt_update(rc4030State *s, uint32_t new_tl_base,
uint32_t new_tl_limit)
{
int entries, i;
dma_pagetable_entry *dma_tl_contents;
if (s->dma_tl_limit) {
memory_region_del_subregion(get_system_memory(), &s->dma_tt_alias);
... | {
"code": [
" memory_region_transaction_begin();",
" memory_region_transaction_commit();",
"static void rc4030_dma_tt_update(rc4030State *s, uint32_t new_tl_base,",
" uint32_t new_tl_limit)",
" int entries, i;",
" dma_pagetable_entry *dma_tl_... | static void FUNC_0(rc4030State *VAR_0, uint32_t VAR_1,
uint32_t VAR_2)
{
int VAR_3, VAR_4;
dma_pagetable_entry *dma_tl_contents;
if (VAR_0->dma_tl_limit) {
memory_region_del_subregion(get_system_memory(), &VAR_0->dma_tt_alias);
cpu_physical... | [
"static void FUNC_0(rc4030State *VAR_0, uint32_t VAR_1,\nuint32_t VAR_2)\n{",
"int VAR_3, VAR_4;",
"dma_pagetable_entry *dma_tl_contents;",
"if (VAR_0->dma_tl_limit) {",
"memory_region_del_subregion(get_system_memory(), &VAR_0->dma_tt_alias);",
"cpu_physical_memory_write(VAR_0->dma_tl_limit & 0x7fffffff,\... | [
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
0,
1,
1,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19,
21,
23
],
[
25
],
[
27
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[... |
1,666 | static int mov_read_dvc1(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
uint8_t profile_level;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
if (atom.size >= (1<<28) || atom.size < 7)
return AVERROR_INVALIDDATA;
profi... | true | FFmpeg | 5c720657c23afd798ae0db7c7362eb859a89ab3d | static int mov_read_dvc1(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
uint8_t profile_level;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
if (atom.size >= (1<<28) || atom.size < 7)
return AVERROR_INVALIDDATA;
profi... | {
"code": [
" avio_read(pb, st->codec->extradata, st->codec->extradata_size);",
" return AVERROR_INVALIDDATA;"
],
"line_no": [
45,
21
]
} | static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)
{
AVStream *st;
uint8_t profile_level;
if (VAR_0->fc->nb_streams < 1)
return 0;
st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];
if (VAR_2.size >= (1<<28) || VAR_2.size < 7)
return AVERROR_INVALIDDAT... | [
"static int FUNC_0(MOVContext *VAR_0, AVIOContext *VAR_1, MOVAtom VAR_2)\n{",
"AVStream *st;",
"uint8_t profile_level;",
"if (VAR_0->fc->nb_streams < 1)\nreturn 0;",
"st = VAR_0->fc->streams[VAR_0->fc->nb_streams-1];",
"if (VAR_2.size >= (1<<28) || VAR_2.size < 7)\nreturn AVERROR_INVALIDDATA;",
"profile... | [
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11,
13
],
[
15
],
[
19,
21
],
[
25
],
[
27,
29
],
[
33
],
[
35
],
[
37,
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
]
] |
1,667 | static void zero_remaining(unsigned int b, unsigned int b_max,
const unsigned int *div_blocks, int32_t *buf)
{
unsigned int count = 0;
while (b < b_max)
count += div_blocks[b];
if (count)
memset(buf, 0, sizeof(*buf) * count);
}
| false | FFmpeg | f0f2babca23a3d099bcd5a1e18cf5d0eae2f4ef3 | static void zero_remaining(unsigned int b, unsigned int b_max,
const unsigned int *div_blocks, int32_t *buf)
{
unsigned int count = 0;
while (b < b_max)
count += div_blocks[b];
if (count)
memset(buf, 0, sizeof(*buf) * count);
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(unsigned int VAR_0, unsigned int VAR_1,
const unsigned int *VAR_2, int32_t *VAR_3)
{
unsigned int VAR_4 = 0;
while (VAR_0 < VAR_1)
VAR_4 += VAR_2[VAR_0];
if (VAR_4)
memset(VAR_3, 0, sizeof(*VAR_3) * VAR_4);
}
| [
"static void FUNC_0(unsigned int VAR_0, unsigned int VAR_1,\nconst unsigned int *VAR_2, int32_t *VAR_3)\n{",
"unsigned int VAR_4 = 0;",
"while (VAR_0 < VAR_1)\nVAR_4 += VAR_2[VAR_0];",
"if (VAR_4)\nmemset(VAR_3, 0, sizeof(*VAR_3) * VAR_4);",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11,
13
],
[
17,
19
],
[
21
]
] |
1,668 | static int push_samples(AVFilterContext *ctx, int nb_samples)
{
AVFilterLink *outlink = ctx->outputs[0];
LoopContext *s = ctx->priv;
AVFrame *out;
int ret, i = 0;
while (s->loop != 0 && i < nb_samples) {
out = ff_get_audio_buffer(outlink, FFMIN(nb_samples, s->nb_samples - s->current... | true | FFmpeg | 645f7c1ce547f247af56990e6306d08d3d6a6286 | static int push_samples(AVFilterContext *ctx, int nb_samples)
{
AVFilterLink *outlink = ctx->outputs[0];
LoopContext *s = ctx->priv;
AVFrame *out;
int ret, i = 0;
while (s->loop != 0 && i < nb_samples) {
out = ff_get_audio_buffer(outlink, FFMIN(nb_samples, s->nb_samples - s->current... | {
"code": [
" if (ret < 0)"
],
"line_no": [
25
]
} | static int FUNC_0(AVFilterContext *VAR_0, int VAR_1)
{
AVFilterLink *outlink = VAR_0->outputs[0];
LoopContext *s = VAR_0->priv;
AVFrame *out;
int VAR_2, VAR_3 = 0;
while (s->loop != 0 && VAR_3 < VAR_1) {
out = ff_get_audio_buffer(outlink, FFMIN(VAR_1, s->VAR_1 - s->current_sample));... | [
"static int FUNC_0(AVFilterContext *VAR_0, int VAR_1)\n{",
"AVFilterLink *outlink = VAR_0->outputs[0];",
"LoopContext *s = VAR_0->priv;",
"AVFrame *out;",
"int VAR_2, VAR_3 = 0;",
"while (s->loop != 0 && VAR_3 < VAR_1) {",
"out = ff_get_audio_buffer(outlink, FFMIN(VAR_1, s->VAR_1 - s->current_sample));"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
41
],
[
43,
45
],
[
49
],
[... |
1,669 | void *qemu_realloc(void *ptr, size_t size)
{
if (!size && !allow_zero_malloc()) {
abort();
}
return oom_check(realloc(ptr, size ? size : 1));
}
| true | qemu | cd245a19329edfcd968b00d05ad92de7a0e2daa1 | void *qemu_realloc(void *ptr, size_t size)
{
if (!size && !allow_zero_malloc()) {
abort();
}
return oom_check(realloc(ptr, size ? size : 1));
}
| {
"code": [
" return oom_check(realloc(ptr, size ? size : 1));"
],
"line_no": [
11
]
} | void *FUNC_0(void *VAR_0, size_t VAR_1)
{
if (!VAR_1 && !allow_zero_malloc()) {
abort();
}
return oom_check(realloc(VAR_0, VAR_1 ? VAR_1 : 1));
}
| [
"void *FUNC_0(void *VAR_0, size_t VAR_1)\n{",
"if (!VAR_1 && !allow_zero_malloc()) {",
"abort();",
"}",
"return oom_check(realloc(VAR_0, VAR_1 ? VAR_1 : 1));",
"}"
] | [
0,
0,
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
]
] |
1,670 | static int coreaudio_init_out (HWVoiceOut *hw, struct audsettings *as)
{
OSStatus status;
coreaudioVoiceOut *core = (coreaudioVoiceOut *) hw;
UInt32 propertySize;
int err;
const char *typ = "playback";
AudioValueRange frameRange;
/* create mutex */
err = pthread_mutex_init(&co... | true | qemu | 5706db1deb061ee9affdcea81e59c4c2cad7c41e | static int coreaudio_init_out (HWVoiceOut *hw, struct audsettings *as)
{
OSStatus status;
coreaudioVoiceOut *core = (coreaudioVoiceOut *) hw;
UInt32 propertySize;
int err;
const char *typ = "playback";
AudioValueRange frameRange;
err = pthread_mutex_init(&core->mutex, NULL);
... | {
"code": [
"static int coreaudio_init_out (HWVoiceOut *hw, struct audsettings *as)"
],
"line_no": [
1
]
} | static int FUNC_0 (HWVoiceOut *VAR_0, struct audsettings *VAR_1)
{
OSStatus status;
coreaudioVoiceOut *core = (coreaudioVoiceOut *) VAR_0;
UInt32 propertySize;
int VAR_2;
const char *VAR_3 = "playback";
AudioValueRange frameRange;
VAR_2 = pthread_mutex_init(&core->mutex, NULL... | [
"static int FUNC_0 (HWVoiceOut *VAR_0, struct audsettings *VAR_1)\n{",
"OSStatus status;",
"coreaudioVoiceOut *core = (coreaudioVoiceOut *) VAR_0;",
"UInt32 propertySize;",
"int VAR_2;",
"const char *VAR_3 = \"playback\";",
"AudioValueRange frameRange;",
"VAR_2 = pthread_mutex_init(&core->mutex, NULL)... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
33
],
[
39
],
[
41,
43,
45,
47
],
[
49
],
[
51,
53
],
[
55
... |
1,671 | static void xilinx_spips_flush_txfifo(XilinxSPIPS *s)
{
int debug_level = 0;
XilinxQSPIPS *q = (XilinxQSPIPS *) object_dynamic_cast(OBJECT(s),
TYPE_XILINX_QSPIPS);
for (;;) {
int i;
uint8_t tx = 0;
uint8_t tx_rx[num... | true | qemu | 2e1cf2c9685978193ef429cdb711bf50debea9d8 | static void xilinx_spips_flush_txfifo(XilinxSPIPS *s)
{
int debug_level = 0;
XilinxQSPIPS *q = (XilinxQSPIPS *) object_dynamic_cast(OBJECT(s),
TYPE_XILINX_QSPIPS);
for (;;) {
int i;
uint8_t tx = 0;
uint8_t tx_rx[num... | {
"code": [
" if (!(s->regs[R_LQSPI_CFG] & LQSPI_CFG_LQ_MODE)) {",
" s->regs[R_INTR_STATUS] |= IXR_TX_FIFO_UNDERFLOW;"
],
"line_no": [
29,
31
]
} | static void FUNC_0(XilinxSPIPS *VAR_0)
{
int VAR_1 = 0;
XilinxQSPIPS *q = (XilinxQSPIPS *) object_dynamic_cast(OBJECT(VAR_0),
TYPE_XILINX_QSPIPS);
for (;;) {
int VAR_2;
uint8_t tx = 0;
uint8_t tx_rx[num_effective_bu... | [
"static void FUNC_0(XilinxSPIPS *VAR_0)\n{",
"int VAR_1 = 0;",
"XilinxQSPIPS *q = (XilinxQSPIPS *) object_dynamic_cast(OBJECT(VAR_0),\nTYPE_XILINX_QSPIPS);",
"for (;;) {",
"int VAR_2;",
"uint8_t tx = 0;",
"uint8_t tx_rx[num_effective_busses(VAR_0)];",
"uint8_t dummy_cycles = 0;",
"uint8_t addr_lengt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3
],
[
5
],
[
7,
9
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[... |
1,674 | static int img_set_parameters(AVFormatContext *s, AVFormatParameters *ap)
{
VideoData *img = s->priv_data;
AVStream *st;
AVImageFormat *img_fmt;
int i;
/* find output image format */
if (ap && ap->image_format) {
img_fmt = ap->image_format;
} else {
img_fmt = gues... | false | FFmpeg | c04c3282b4334ff64cfd69d40fea010602e830fd | static int img_set_parameters(AVFormatContext *s, AVFormatParameters *ap)
{
VideoData *img = s->priv_data;
AVStream *st;
AVImageFormat *img_fmt;
int i;
if (ap && ap->image_format) {
img_fmt = ap->image_format;
} else {
img_fmt = guess_image_format(s->filename);
... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)
{
VideoData *img = VAR_0->priv_data;
AVStream *st;
AVImageFormat *img_fmt;
int VAR_2;
if (VAR_1 && VAR_1->image_format) {
img_fmt = VAR_1->image_format;
} else {
img_fmt = guess_image_format(VAR... | [
"static int FUNC_0(AVFormatContext *VAR_0, AVFormatParameters *VAR_1)\n{",
"VideoData *img = VAR_0->priv_data;",
"AVStream *st;",
"AVImageFormat *img_fmt;",
"int VAR_2;",
"if (VAR_1 && VAR_1->image_format) {",
"img_fmt = VAR_1->image_format;",
"} else {",
"img_fmt = guess_image_format(VAR_0->filenam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27,
29
],
[
33,
35
],
[
39
],
[
43
],
[
45,
47
],
[
49
],
[
51,
53
],
[
55
... |
1,676 | void qemu_coroutine_enter(Coroutine *co)
{
Coroutine *self = qemu_coroutine_self();
CoroutineAction ret;
trace_qemu_coroutine_enter(self, co, co->entry_arg);
if (co->caller) {
fprintf(stderr, "Co-routine re-entered recursively\n");
abort();
}
co->caller = self;
... | true | qemu | 480cff632221dc4d4889bf72dd0f09cd35096bc1 | void qemu_coroutine_enter(Coroutine *co)
{
Coroutine *self = qemu_coroutine_self();
CoroutineAction ret;
trace_qemu_coroutine_enter(self, co, co->entry_arg);
if (co->caller) {
fprintf(stderr, "Co-routine re-entered recursively\n");
abort();
}
co->caller = self;
... | {
"code": [],
"line_no": []
} | void FUNC_0(Coroutine *VAR_0)
{
Coroutine *self = qemu_coroutine_self();
CoroutineAction ret;
trace_qemu_coroutine_enter(self, VAR_0, VAR_0->entry_arg);
if (VAR_0->caller) {
fprintf(stderr, "Co-routine re-entered recursively\n");
abort();
}
VAR_0->caller = self;
... | [
"void FUNC_0(Coroutine *VAR_0)\n{",
"Coroutine *self = qemu_coroutine_self();",
"CoroutineAction ret;",
"trace_qemu_coroutine_enter(self, VAR_0, VAR_0->entry_arg);",
"if (VAR_0->caller) {",
"fprintf(stderr, \"Co-routine re-entered recursively\\n\");",
"abort();",
"}",
"VAR_0->caller = self;",
"VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19
],
[
21
],
[
25
],
[
27
],
[
37
],
[
41
],
[
45
],
[
49
],
[
51,
53
],
[
55,
57
],
[
59
],
[
61
],
[
63... |
1,678 | static void aarch64_cpu_set_pc(CPUState *cs, vaddr value)
{
ARMCPU *cpu = ARM_CPU(cs);
/*
* TODO: this will need updating for system emulation,
* when the core may be in AArch32 mode.
*/
cpu->env.pc = value;
}
| true | qemu | 7633378d5fbe932c9d38ae8961ef035d1ed26bfd | static void aarch64_cpu_set_pc(CPUState *cs, vaddr value)
{
ARMCPU *cpu = ARM_CPU(cs);
cpu->env.pc = value;
}
| {
"code": [
" cpu->env.pc = value;"
],
"line_no": [
15
]
} | static void FUNC_0(CPUState *VAR_0, vaddr VAR_1)
{
ARMCPU *cpu = ARM_CPU(VAR_0);
cpu->env.pc = VAR_1;
}
| [
"static void FUNC_0(CPUState *VAR_0, vaddr VAR_1)\n{",
"ARMCPU *cpu = ARM_CPU(VAR_0);",
"cpu->env.pc = VAR_1;",
"}"
] | [
0,
0,
1,
0
] | [
[
1,
3
],
[
5
],
[
15
],
[
17
]
] |
1,679 | static struct iovec *cap_sg(struct iovec *sg, int cap, int *cnt)
{
int i;
int total = 0;
for (i = 0; i < *cnt; i++) {
if ((total + sg[i].iov_len) > cap) {
sg[i].iov_len -= ((total + sg[i].iov_len) - cap);
i++;
break;
}
total += sg[i].io... | true | qemu | 302a0d3ed721e4c30c6a2a37f64c60b50ffd33b9 | static struct iovec *cap_sg(struct iovec *sg, int cap, int *cnt)
{
int i;
int total = 0;
for (i = 0; i < *cnt; i++) {
if ((total + sg[i].iov_len) > cap) {
sg[i].iov_len -= ((total + sg[i].iov_len) - cap);
i++;
break;
}
total += sg[i].io... | {
"code": [
" break;",
" break;",
" return sg;",
"static struct iovec *cap_sg(struct iovec *sg, int cap, int *cnt)",
" int i;",
" int total = 0;",
" for (i = 0; i < *cnt; i++) {",
" if ((total + sg[i].iov_len) > cap) {",
" sg[i].i... | static struct iovec *FUNC_0(struct iovec *VAR_0, int VAR_1, int *VAR_2)
{
int VAR_3;
int VAR_4 = 0;
for (VAR_3 = 0; VAR_3 < *VAR_2; VAR_3++) {
if ((VAR_4 + VAR_0[VAR_3].iov_len) > VAR_1) {
VAR_0[VAR_3].iov_len -= ((VAR_4 + VAR_0[VAR_3].iov_len) - VAR_1);
VAR_3++;
... | [
"static struct iovec *FUNC_0(struct iovec *VAR_0, int VAR_1, int *VAR_2)\n{",
"int VAR_3;",
"int VAR_4 = 0;",
"for (VAR_3 = 0; VAR_3 < *VAR_2; VAR_3++) {",
"if ((VAR_4 + VAR_0[VAR_3].iov_len) > VAR_1) {",
"VAR_0[VAR_3].iov_len -= ((VAR_4 + VAR_0[VAR_3].iov_len) - VAR_1);",
"VAR_3++;",
"break;",
"}",... | [
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
29
],
[
33
],
[
35
]
] |
1,680 | void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
{
mcf_fec_state *s;
qemu_check_nic_model(nd, "mcf_fec");
s = (mcf_fec_state *)qemu_mallocz(sizeof(mcf_fec_state));
s->irq = irq;
s->mmio_index = cpu_register_io_memory(mcf_fec_readfn,
... | true | qemu | ae50b2747f77944faa79eb914272b54eb30b63b3 | void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
{
mcf_fec_state *s;
qemu_check_nic_model(nd, "mcf_fec");
s = (mcf_fec_state *)qemu_mallocz(sizeof(mcf_fec_state));
s->irq = irq;
s->mmio_index = cpu_register_io_memory(mcf_fec_readfn,
... | {
"code": [
" s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,",
" mcf_fec_can_receive, mcf_fec_receive, NULL,",
" mcf_fec_cleanup, s);",
" s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,",
" s->vc = qe... | void FUNC_0(NICInfo *VAR_0, target_phys_addr_t VAR_1, qemu_irq *VAR_2)
{
mcf_fec_state *s;
qemu_check_nic_model(VAR_0, "mcf_fec");
s = (mcf_fec_state *)qemu_mallocz(sizeof(mcf_fec_state));
s->VAR_2 = VAR_2;
s->mmio_index = cpu_register_io_memory(mcf_fec_readfn,
... | [
"void FUNC_0(NICInfo *VAR_0, target_phys_addr_t VAR_1, qemu_irq *VAR_2)\n{",
"mcf_fec_state *s;",
"qemu_check_nic_model(VAR_0, \"mcf_fec\");",
"s = (mcf_fec_state *)qemu_mallocz(sizeof(mcf_fec_state));",
"s->VAR_2 = VAR_2;",
"s->mmio_index = cpu_register_io_memory(mcf_fec_readfn,\nmcf_fec_writefn, s);",
... | [
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
13
],
[
15
],
[
17,
19
],
[
21
],
[
25,
27,
29
],
[
31
],
[
33
],
[
35
]
] |
1,681 | static int opt_sameq(void *optctx, const char *opt, const char *arg)
{
av_log(NULL, AV_LOG_WARNING, "Ignoring option '%s'\n", opt);
return 0;
}
| true | FFmpeg | a62242678ff96eade59960d1bbf65e4f3f03344f | static int opt_sameq(void *optctx, const char *opt, const char *arg)
{
av_log(NULL, AV_LOG_WARNING, "Ignoring option '%s'\n", opt);
return 0;
}
| {
"code": [
" av_log(NULL, AV_LOG_WARNING, \"Ignoring option '%s'\\n\", opt);",
" return 0;"
],
"line_no": [
5,
7
]
} | static int FUNC_0(void *VAR_0, const char *VAR_1, const char *VAR_2)
{
av_log(NULL, AV_LOG_WARNING, "Ignoring option '%s'\n", VAR_1);
return 0;
}
| [
"static int FUNC_0(void *VAR_0, const char *VAR_1, const char *VAR_2)\n{",
"av_log(NULL, AV_LOG_WARNING, \"Ignoring option '%s'\\n\", VAR_1);",
"return 0;",
"}"
] | [
0,
1,
1,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
1,682 | static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, int dstFormat)
{
//FIXME Optimize (just quickly writen not opti..)
int i;
for(i=0; i<dstW; i++)
{
... | true | FFmpeg | 221b804f3491638ecf2eec1302c669ad2d9ec799 | static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
uint8_t *dest, uint8_t *uDest, int dstW, int chrDstW, int dstFormat)
{
int i;
for(i=0; i<dstW; i++)
{
int val=1<<18;
int j;
for(j=0; j<lumFilterS... | {
"code": [
"\tint i;",
"\tint i;",
"\tfor(i=0; i<dstW; i++)",
"\t\tint val=1<<18;",
"\t\tint j;",
"\t\tfor(j=0; j<lumFilterSize; j++)",
"\t\t\tval += lumSrc[j][i] * lumFilter[j];",
"\t\tdest[i]= av_clip_uint8(val>>19);",
"\t\tfor(i=0; i<chrDstW; i++)",
"\t\t\tint u=1<<18;",
... | static inline void FUNC_0(int16_t *VAR_0, int16_t **VAR_1, int VAR_2,
int16_t *VAR_3, int16_t **VAR_4, int VAR_5,
uint8_t *VAR_6, uint8_t *VAR_7, int VAR_8, int VAR_9, int VAR_10)
{
int VAR_11;
for(VAR_11=0; VAR_11<VAR_8; VAR_11++)
{
int VAR_12=1<<18;
int VAR_16;
for(VAR_16=0; VAR_16<VAR_2;... | [
"static inline void FUNC_0(int16_t *VAR_0, int16_t **VAR_1, int VAR_2,\nint16_t *VAR_3, int16_t **VAR_4, int VAR_5,\nuint8_t *VAR_6, uint8_t *VAR_7, int VAR_8, int VAR_9, int VAR_10)\n{",
"int VAR_11;",
"for(VAR_11=0; VAR_11<VAR_8; VAR_11++)",
"{",
"int VAR_12=1<<18;",
"int VAR_16;",
"for(VAR_16=0; VAR_... | [
1,
1,
1,
0,
1,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0
] | [
[
1,
3,
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
33,
35
],
[
39,
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
51
],
[
53... |
1,684 | static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
ptrdiff_t mref, ptrdiff_t pref)
{
const uint8_t *srcp_above = srcp + mref;
const uint8_t *srcp_below = srcp + pref;
const uint8_t *srcp_above2 = srcp + mref * 2;
const uint8_t... | false | FFmpeg | a7f6bfdc185a04a703bedd712ee306435372af12 | static void lowpass_line_complex_c(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
ptrdiff_t mref, ptrdiff_t pref)
{
const uint8_t *srcp_above = srcp + mref;
const uint8_t *srcp_below = srcp + pref;
const uint8_t *srcp_above2 = srcp + mref * 2;
const uint8_t... | {
"code": [],
"line_no": []
} | static void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1, const uint8_t *VAR_2,
ptrdiff_t VAR_3, ptrdiff_t VAR_4)
{
const uint8_t *VAR_5 = VAR_2 + VAR_3;
const uint8_t *VAR_6 = VAR_2 + VAR_4;
const uint8_t *VAR_7 = VAR_2 + VAR_3 * 2;
const uint8_t *VAR_8 = VAR_2 + VAR_... | [
"static void FUNC_0(uint8_t *VAR_0, ptrdiff_t VAR_1, const uint8_t *VAR_2,\nptrdiff_t VAR_3, ptrdiff_t VAR_4)\n{",
"const uint8_t *VAR_5 = VAR_2 + VAR_3;",
"const uint8_t *VAR_6 = VAR_2 + VAR_4;",
"const uint8_t *VAR_7 = VAR_2 + VAR_3 * 2;",
"const uint8_t *VAR_8 = VAR_2 + VAR_4 * 2;",
"int VAR_9;",
"fo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
25,
27,
29
],
[
31
],
[
33
]
] |
1,685 | static void pic_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
HeathrowPICS *s = opaque;
HeathrowPIC *pic;
unsigned int n;
n = ((addr & 0xfff) - 0x10) >> 4;
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
if (n ... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void pic_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
HeathrowPICS *s = opaque;
HeathrowPIC *pic;
unsigned int n;
n = ((addr & 0xfff) - 0x10) >> 4;
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
if (n ... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
HeathrowPICS *s = VAR_0;
HeathrowPIC *pic;
unsigned int VAR_4;
VAR_4 = ((VAR_1 & 0xfff) - 0x10) >> 4;
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\VAR_4", VAR_1, VAR_4, VAR_... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"HeathrowPICS *s = VAR_0;",
"HeathrowPIC *pic;",
"unsigned int VAR_4;",
"VAR_4 = ((VAR_1 & 0xfff) - 0x10) >> 4;",
"PIC_DPRINTF(\"writel: \" TARGET_FMT_plx \" %u: %08x\\VAR_4\", VAR_1, VAR_4, VAR_2);",
"if (V... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25
],
[
27,
29
],
[
31
],
[
33
],
[
35,
39
],
[
41
],
[
43
],
[
45
],
[
47,
49
],
[... |
1,686 | static void tcg_out_jxx(TCGContext *s, int opc, int label_index, int small)
{
int32_t val, val1;
TCGLabel *l = &s->labels[label_index];
if (l->has_value) {
val = tcg_pcrel_diff(s, l->u.value_ptr);
val1 = val - 2;
if ((int8_t)val1 == val1) {
if (opc == -1) {
... | false | qemu | bec1631100323fac0900aea71043d5c4e22fc2fa | static void tcg_out_jxx(TCGContext *s, int opc, int label_index, int small)
{
int32_t val, val1;
TCGLabel *l = &s->labels[label_index];
if (l->has_value) {
val = tcg_pcrel_diff(s, l->u.value_ptr);
val1 = val - 2;
if ((int8_t)val1 == val1) {
if (opc == -1) {
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TCGContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{
int32_t val, val1;
TCGLabel *l = &VAR_0->labels[VAR_2];
if (l->has_value) {
val = tcg_pcrel_diff(VAR_0, l->u.value_ptr);
val1 = val - 2;
if ((int8_t)val1 == val1) {
if (VAR_1 == -1) {
... | [
"static void FUNC_0(TCGContext *VAR_0, int VAR_1, int VAR_2, int VAR_3)\n{",
"int32_t val, val1;",
"TCGLabel *l = &VAR_0->labels[VAR_2];",
"if (l->has_value) {",
"val = tcg_pcrel_diff(VAR_0, l->u.value_ptr);",
"val1 = val - 2;",
"if ((int8_t)val1 == val1) {",
"if (VAR_1 == -1) {",
"tcg_out8(VAR_0, O... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43... |
1,687 | hwaddr ppc_hash32_get_phys_page_debug(CPUPPCState *env, target_ulong addr)
{
struct mmu_ctx_hash32 ctx;
if (unlikely(ppc_hash32_get_physical_address(env, &ctx, addr, 0, ACCESS_INT)
!= 0)) {
return -1;
}
return ctx.raddr & TARGET_PAGE_MASK;
}
| false | qemu | 91cda45b69e45a089f9989979a65db3f710c9925 | hwaddr ppc_hash32_get_phys_page_debug(CPUPPCState *env, target_ulong addr)
{
struct mmu_ctx_hash32 ctx;
if (unlikely(ppc_hash32_get_physical_address(env, &ctx, addr, 0, ACCESS_INT)
!= 0)) {
return -1;
}
return ctx.raddr & TARGET_PAGE_MASK;
}
| {
"code": [],
"line_no": []
} | hwaddr FUNC_0(CPUPPCState *env, target_ulong addr)
{
struct mmu_ctx_hash32 VAR_0;
if (unlikely(ppc_hash32_get_physical_address(env, &VAR_0, addr, 0, ACCESS_INT)
!= 0)) {
return -1;
}
return VAR_0.raddr & TARGET_PAGE_MASK;
}
| [
"hwaddr FUNC_0(CPUPPCState *env, target_ulong addr)\n{",
"struct mmu_ctx_hash32 VAR_0;",
"if (unlikely(ppc_hash32_get_physical_address(env, &VAR_0, addr, 0, ACCESS_INT)\n!= 0)) {",
"return -1;",
"}",
"return VAR_0.raddr & TARGET_PAGE_MASK;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9,
11
],
[
13
],
[
15
],
[
19
],
[
21
]
] |
1,689 | static int vhdx_log_write(BlockDriverState *bs, BDRVVHDXState *s,
void *data, uint32_t length, uint64_t offset)
{
int ret = 0;
void *buffer = NULL;
void *merged_sector = NULL;
void *data_tmp, *sector_write;
unsigned int i;
int sector_offset;
uint32_t desc_s... | false | qemu | f50159fa9b5a0ad82e30c123643ec39a1df81d9a | static int vhdx_log_write(BlockDriverState *bs, BDRVVHDXState *s,
void *data, uint32_t length, uint64_t offset)
{
int ret = 0;
void *buffer = NULL;
void *merged_sector = NULL;
void *data_tmp, *sector_write;
unsigned int i;
int sector_offset;
uint32_t desc_s... | {
"code": [],
"line_no": []
} | static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,
void *VAR_2, uint32_t VAR_3, uint64_t VAR_4)
{
int VAR_5 = 0;
void *VAR_6 = NULL;
void *VAR_7 = NULL;
void *VAR_8, *VAR_9;
unsigned int VAR_10;
int VAR_11;
uint32_t desc_sectors, sectors, tota... | [
"static int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,\nvoid *VAR_2, uint32_t VAR_3, uint64_t VAR_4)\n{",
"int VAR_5 = 0;",
"void *VAR_6 = NULL;",
"void *VAR_7 = NULL;",
"void *VAR_8, *VAR_9;",
"unsigned int VAR_10;",
"int VAR_11;",
"uint32_t desc_sectors, sectors, total_length;",
"uint32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[... |
1,690 | Aml *aml_index(Aml *arg1, Aml *idx)
{
Aml *var = aml_opcode(0x88 /* IndexOp */);
aml_append(var, arg1);
aml_append(var, idx);
build_append_byte(var->buf, 0x00 /* NullNameOp */);
return var;
}
| false | qemu | 439e2a6e10ed7f5da819bf7dcaa54b8cfdbeab0d | Aml *aml_index(Aml *arg1, Aml *idx)
{
Aml *var = aml_opcode(0x88 );
aml_append(var, arg1);
aml_append(var, idx);
build_append_byte(var->buf, 0x00 );
return var;
}
| {
"code": [],
"line_no": []
} | Aml *FUNC_0(Aml *arg1, Aml *idx)
{
Aml *var = aml_opcode(0x88 );
aml_append(var, arg1);
aml_append(var, idx);
build_append_byte(var->buf, 0x00 );
return var;
}
| [
"Aml *FUNC_0(Aml *arg1, Aml *idx)\n{",
"Aml *var = aml_opcode(0x88 );",
"aml_append(var, arg1);",
"aml_append(var, idx);",
"build_append_byte(var->buf, 0x00 );",
"return var;",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
]
] |
1,691 | static void timer_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
LM32TimerState *s = opaque;
trace_lm32_timer_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_SR:
s->regs[R_SR] &= ~SR_TO;
break;
cas... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | static void timer_write(void *opaque, target_phys_addr_t addr,
uint64_t value, unsigned size)
{
LM32TimerState *s = opaque;
trace_lm32_timer_memory_write(addr, value);
addr >>= 2;
switch (addr) {
case R_SR:
s->regs[R_SR] &= ~SR_TO;
break;
cas... | {
"code": [],
"line_no": []
} | static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{
LM32TimerState *s = VAR_0;
trace_lm32_timer_memory_write(VAR_1, VAR_2);
VAR_1 >>= 2;
switch (VAR_1) {
case R_SR:
s->regs[R_SR] &= ~SR_TO;
break;
case ... | [
"static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,\nuint64_t VAR_2, unsigned VAR_3)\n{",
"LM32TimerState *s = VAR_0;",
"trace_lm32_timer_memory_write(VAR_1, VAR_2);",
"VAR_1 >>= 2;",
"switch (VAR_1) {",
"case R_SR:\ns->regs[R_SR] &= ~SR_TO;",
"break;",
"case R_CR:\ns->regs[R_CR] = VAR_2;",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
15
],
[
17
],
[
19,
21
],
[
23
],
[
25,
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43,
45
],
[
47
],
[
49... |
1,692 | static inline void menelaus_rtc_start(MenelausState *s)
{
s->rtc.next += qemu_get_clock(rt_clock);
qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
}
| false | qemu | 7bd427d801e1e3293a634d3c83beadaa90ffb911 | static inline void menelaus_rtc_start(MenelausState *s)
{
s->rtc.next += qemu_get_clock(rt_clock);
qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
}
| {
"code": [],
"line_no": []
} | static inline void FUNC_0(MenelausState *VAR_0)
{
VAR_0->rtc.next += qemu_get_clock(rt_clock);
qemu_mod_timer(VAR_0->rtc.hz_tm, VAR_0->rtc.next);
}
| [
"static inline void FUNC_0(MenelausState *VAR_0)\n{",
"VAR_0->rtc.next += qemu_get_clock(rt_clock);",
"qemu_mod_timer(VAR_0->rtc.hz_tm, VAR_0->rtc.next);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
1,693 | static void test_visitor_in_alternate_number(TestInputVisitorData *data,
const void *unused)
{
Visitor *v;
Error *err = NULL;
AltStrBool *asb;
AltStrNum *asn;
AltNumStr *ans;
AltStrInt *asi;
AltIntNum *ain;
AltNumInt *ani;
/* ... | false | qemu | c363acef772647f66becdbf46dd54e70e67f3cc9 | static void test_visitor_in_alternate_number(TestInputVisitorData *data,
const void *unused)
{
Visitor *v;
Error *err = NULL;
AltStrBool *asb;
AltStrNum *asn;
AltNumStr *ans;
AltStrInt *asi;
AltIntNum *ain;
AltNumInt *ani;
... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
Visitor *v;
Error *err = NULL;
AltStrBool *asb;
AltStrNum *asn;
AltNumStr *ans;
AltStrInt *asi;
AltIntNum *ain;
AltNumInt *ani;
v = visitor_input_tes... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"Visitor *v;",
"Error *err = NULL;",
"AltStrBool *asb;",
"AltStrNum *asn;",
"AltNumStr *ans;",
"AltStrInt *asi;",
"AltIntNum *ain;",
"AltNumInt *ani;",
"v = visitor_input_test_init(VAR_0, \"42\");",
"visit_type_AltStrBool(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
29
],
[
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
49
],
[
51
],
[
57
],
[... |
1,694 | static int zipl_run(struct scsi_blockptr *pte)
{
struct component_header *header;
struct component_entry *entry;
uint8_t tmp_sec[SECTOR_SIZE];
virtio_read(pte->blockno, tmp_sec);
header = (struct component_header *)tmp_sec;
if (!zipl_magic(tmp_sec)) {
goto fail;
}
... | false | qemu | abd696e4f74a9d30801c6ae2693efe4e5979c2f2 | static int zipl_run(struct scsi_blockptr *pte)
{
struct component_header *header;
struct component_entry *entry;
uint8_t tmp_sec[SECTOR_SIZE];
virtio_read(pte->blockno, tmp_sec);
header = (struct component_header *)tmp_sec;
if (!zipl_magic(tmp_sec)) {
goto fail;
}
... | {
"code": [],
"line_no": []
} | static int FUNC_0(struct scsi_blockptr *VAR_0)
{
struct component_header *VAR_1;
struct component_entry *VAR_2;
uint8_t tmp_sec[SECTOR_SIZE];
virtio_read(VAR_0->blockno, tmp_sec);
VAR_1 = (struct component_header *)tmp_sec;
if (!zipl_magic(tmp_sec)) {
goto fail;
}
... | [
"static int FUNC_0(struct scsi_blockptr *VAR_0)\n{",
"struct component_header *VAR_1;",
"struct component_entry *VAR_2;",
"uint8_t tmp_sec[SECTOR_SIZE];",
"virtio_read(VAR_0->blockno, tmp_sec);",
"VAR_1 = (struct component_header *)tmp_sec;",
"if (!zipl_magic(tmp_sec)) {",
"goto fail;",
"}",
"if (... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
27
],
[
29
],
[
31
],
[
35
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
[
53
],
[
57
... |
1,695 | static int udp_write(URLContext *h, const uint8_t *buf, int size)
{
UDPContext *s = h->priv_data;
int ret;
for(;;) {
if (!s->is_connected) {
ret = sendto (s->udp_fd, buf, size, 0,
(struct sockaddr *) &s->dest_addr,
s->dest_add... | false | FFmpeg | ebba2b3e2a551ce638d17332761431ba748f178f | static int udp_write(URLContext *h, const uint8_t *buf, int size)
{
UDPContext *s = h->priv_data;
int ret;
for(;;) {
if (!s->is_connected) {
ret = sendto (s->udp_fd, buf, size, 0,
(struct sockaddr *) &s->dest_addr,
s->dest_add... | {
"code": [],
"line_no": []
} | static int FUNC_0(URLContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
UDPContext *s = VAR_0->priv_data;
int VAR_3;
for(;;) {
if (!s->is_connected) {
VAR_3 = sendto (s->udp_fd, VAR_1, VAR_2, 0,
(struct sockaddr *) &s->dest_addr,
... | [
"static int FUNC_0(URLContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"UDPContext *s = VAR_0->priv_data;",
"int VAR_3;",
"for(;;) {",
"if (!s->is_connected) {",
"VAR_3 = sendto (s->udp_fd, VAR_1, VAR_2, 0,\n(struct sockaddr *) &s->dest_addr,\ns->dest_addr_len);",
"} else",
"VAR_3 = send(s->udp_f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
11
],
[
13
],
[
15,
17,
19
],
[
21
],
[
23
],
[
25
],
[
27,
29,
31
],
[
33
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
]
] |
1,696 | static int megasas_cache_flush(MegasasState *s, MegasasCmd *cmd)
{
bdrv_drain_all();
return MFI_STAT_OK;
}
| false | qemu | 4be746345f13e99e468c60acbd3a355e8183e3ce | static int megasas_cache_flush(MegasasState *s, MegasasCmd *cmd)
{
bdrv_drain_all();
return MFI_STAT_OK;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(MegasasState *VAR_0, MegasasCmd *VAR_1)
{
bdrv_drain_all();
return MFI_STAT_OK;
}
| [
"static int FUNC_0(MegasasState *VAR_0, MegasasCmd *VAR_1)\n{",
"bdrv_drain_all();",
"return MFI_STAT_OK;",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
]
] |
1,697 | static void test_visitor_in_fail_list_nested(TestInputVisitorData *data,
const void *unused)
{
int64_t i64 = -1;
Visitor *v;
/* Unvisited nested list tail */
v = visitor_input_test_init(data, "[ 0, [ 1, 2, 3 ] ]");
visit_start_list(v, NULL, N... | false | qemu | a4a1c70dc759e5b81627e96564f344ab43ea86eb | static void test_visitor_in_fail_list_nested(TestInputVisitorData *data,
const void *unused)
{
int64_t i64 = -1;
Visitor *v;
v = visitor_input_test_init(data, "[ 0, [ 1, 2, 3 ] ]");
visit_start_list(v, NULL, NULL, 0, &error_abort);
visi... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
int64_t i64 = -1;
Visitor *v;
v = visitor_input_test_init(VAR_0, "[ 0, [ 1, 2, 3 ] ]");
visit_start_list(v, NULL, NULL, 0, &error_abort);
visit_type_int(v, NULL, &i64,... | [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"int64_t i64 = -1;",
"Visitor *v;",
"v = visitor_input_test_init(VAR_0, \"[ 0, [ 1, 2, 3 ] ]\");",
"visit_start_list(v, NULL, NULL, 0, &error_abort);",
"visit_type_int(v, NULL, &i64, &error_abort);",
"g_assert_cmpint(i64, ==, 0);"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
17
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
37
],
[
39
]
] |
1,698 | static void mptsas_scsi_uninit(PCIDevice *dev)
{
MPTSASState *s = MPT_SAS(dev);
qemu_bh_delete(s->request_bh);
if (s->msi_in_use) {
msi_uninit(dev);
}
}
| false | qemu | 2e2aa31674444b61e79536a90d63a90572e695c8 | static void mptsas_scsi_uninit(PCIDevice *dev)
{
MPTSASState *s = MPT_SAS(dev);
qemu_bh_delete(s->request_bh);
if (s->msi_in_use) {
msi_uninit(dev);
}
}
| {
"code": [],
"line_no": []
} | static void FUNC_0(PCIDevice *VAR_0)
{
MPTSASState *s = MPT_SAS(VAR_0);
qemu_bh_delete(s->request_bh);
if (s->msi_in_use) {
msi_uninit(VAR_0);
}
}
| [
"static void FUNC_0(PCIDevice *VAR_0)\n{",
"MPTSASState *s = MPT_SAS(VAR_0);",
"qemu_bh_delete(s->request_bh);",
"if (s->msi_in_use) {",
"msi_uninit(VAR_0);",
"}",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
]
] |
1,699 | static unsigned int dec_swap_r(DisasContext *dc)
{
TCGv t0;
#if DISAS_CRIS
char modename[4];
#endif
DIS(fprintf (logfile, "swap%s $r%u\n",
swapmode_name(dc->op2, modename), dc->op1));
cris_cc_mask(dc, CC_MASK_NZ);
t0 = tcg_temp_new(TCG_TYPE_TL);
t_gen_mov_TN_reg(t0, dc->op1);
if (dc->op2 & 8)... | false | qemu | a7812ae412311d7d47f8aa85656faadac9d64b56 | static unsigned int dec_swap_r(DisasContext *dc)
{
TCGv t0;
#if DISAS_CRIS
char modename[4];
#endif
DIS(fprintf (logfile, "swap%s $r%u\n",
swapmode_name(dc->op2, modename), dc->op1));
cris_cc_mask(dc, CC_MASK_NZ);
t0 = tcg_temp_new(TCG_TYPE_TL);
t_gen_mov_TN_reg(t0, dc->op1);
if (dc->op2 & 8)... | {
"code": [],
"line_no": []
} | static unsigned int FUNC_0(DisasContext *VAR_0)
{
TCGv t0;
#if DISAS_CRIS
char modename[4];
#endif
DIS(fprintf (logfile, "swap%s $r%u\n",
swapmode_name(VAR_0->op2, modename), VAR_0->op1));
cris_cc_mask(VAR_0, CC_MASK_NZ);
t0 = tcg_temp_new(TCG_TYPE_TL);
t_gen_mov_TN_reg(t0, VAR_0->op1);
if (V... | [
"static unsigned int FUNC_0(DisasContext *VAR_0)\n{",
"TCGv t0;",
"#if DISAS_CRIS\nchar modename[4];",
"#endif\nDIS(fprintf (logfile, \"swap%s $r%u\\n\",\nswapmode_name(VAR_0->op2, modename), VAR_0->op1));",
"cris_cc_mask(VAR_0, CC_MASK_NZ);",
"t0 = tcg_temp_new(TCG_TYPE_TL);",
"t_gen_mov_TN_reg(t0, VAR... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7,
9
],
[
11,
13,
15
],
[
19
],
[
21
],
[
23
],
[
25,
27
],
[
29,
31
],
[
33,
35
],
[
37,
39
],
[
41,
43
],
[
45
],
[
47
],
[
49
]
] |
1,700 | static void test_visitor_in_number(TestInputVisitorData *data,
const void *unused)
{
double res = 0, value = 3.14;
Visitor *v;
v = visitor_input_test_init(data, "%f", value);
visit_type_number(v, NULL, &res, &error_abort);
g_assert_cmpfloat(res, ==, valu... | false | qemu | b3db211f3c80bb996a704d665fe275619f728bd4 | static void test_visitor_in_number(TestInputVisitorData *data,
const void *unused)
{
double res = 0, value = 3.14;
Visitor *v;
v = visitor_input_test_init(data, "%f", value);
visit_type_number(v, NULL, &res, &error_abort);
g_assert_cmpfloat(res, ==, valu... | {
"code": [],
"line_no": []
} | static void FUNC_0(TestInputVisitorData *VAR_0,
const void *VAR_1)
{
double VAR_2 = 0, VAR_3 = 3.14;
Visitor *v;
v = visitor_input_test_init(VAR_0, "%f", VAR_3);
visit_type_number(v, NULL, &VAR_2, &error_abort);
g_assert_cmpfloat(VAR_2, ==, VAR_3);
}
| [
"static void FUNC_0(TestInputVisitorData *VAR_0,\nconst void *VAR_1)\n{",
"double VAR_2 = 0, VAR_3 = 3.14;",
"Visitor *v;",
"v = visitor_input_test_init(VAR_0, \"%f\", VAR_3);",
"visit_type_number(v, NULL, &VAR_2, &error_abort);",
"g_assert_cmpfloat(VAR_2, ==, VAR_3);",
"}"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
13
],
[
17
],
[
19
],
[
21
]
] |
1,702 | static int protocol_client_auth(VncState *vs, uint8_t *data, size_t len)
{
/* We only advertise 1 auth scheme at a time, so client
* must pick the one we sent. Verify this */
if (data[0] != vs->vd->auth) { /* Reject auth */
VNC_DEBUG("Reject auth %d\n", (int)data[0]);
vnc_write_u32(vs, ... | false | qemu | 1263b7d6131cdaed2c460cf03757aaaf5696ec47 | static int protocol_client_auth(VncState *vs, uint8_t *data, size_t len)
{
if (data[0] != vs->vd->auth) {
VNC_DEBUG("Reject auth %d\n", (int)data[0]);
vnc_write_u32(vs, 1);
if (vs->minor >= 8) {
static const char err[] = "Authentication failed";
vnc_write_u... | {
"code": [],
"line_no": []
} | static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)
{
if (VAR_1[0] != VAR_0->vd->auth) {
VNC_DEBUG("Reject auth %d\n", (int)VAR_1[0]);
vnc_write_u32(VAR_0, 1);
if (VAR_0->minor >= 8) {
static const char VAR_4[] = "Authentication failed";
vnc_wr... | [
"static int FUNC_0(VncState *VAR_0, uint8_t *VAR_1, size_t VAR_2)\n{",
"if (VAR_1[0] != VAR_0->vd->auth) {",
"VNC_DEBUG(\"Reject auth %d\\n\", (int)VAR_1[0]);",
"vnc_write_u32(VAR_0, 1);",
"if (VAR_0->minor >= 8) {",
"static const char VAR_4[] = \"Authentication failed\";",
"vnc_write_u32(VAR_0, sizeof(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
9
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33,
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
... |
1,703 | BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);
return bdrv_co_aio_rw_vector(bs, sector_num, qi... | false | qemu | 61007b316cd71ee7333ff7a0a749a8949527575f | BlockAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);
return bdrv_co_aio_rw_vector(bs, sector_num, qi... | {
"code": [],
"line_no": []
} | BlockAIOCB *FUNC_0(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *qiov, int nb_sectors,
BlockCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);
return bdrv_co_aio_rw_vector(bs, sector_num, qiov, nb_s... | [
"BlockAIOCB *FUNC_0(BlockDriverState *bs, int64_t sector_num,\nQEMUIOVector *qiov, int nb_sectors,\nBlockCompletionFunc *cb, void *opaque)\n{",
"trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque);",
"return bdrv_co_aio_rw_vector(bs, sector_num, qiov, nb_sectors, 0,\ncb, opaque, false);",
"}"
] | [
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
13,
15
],
[
17
]
] |
1,704 | static int do_qmp_capabilities(Monitor *mon, const QDict *params,
QObject **ret_data)
{
/* Will setup QMP capabilities in the future */
if (monitor_ctrl_mode(mon)) {
mon->qmp.command_mode = 1;
}
return 0;
}
| false | qemu | 6a50636f35ba677c747f2f6127b0dba994b039ca | static int do_qmp_capabilities(Monitor *mon, const QDict *params,
QObject **ret_data)
{
if (monitor_ctrl_mode(mon)) {
mon->qmp.command_mode = 1;
}
return 0;
}
| {
"code": [],
"line_no": []
} | static int FUNC_0(Monitor *VAR_0, const QDict *VAR_1,
QObject **VAR_2)
{
if (monitor_ctrl_mode(VAR_0)) {
VAR_0->qmp.command_mode = 1;
}
return 0;
}
| [
"static int FUNC_0(Monitor *VAR_0, const QDict *VAR_1,\nQObject **VAR_2)\n{",
"if (monitor_ctrl_mode(VAR_0)) {",
"VAR_0->qmp.command_mode = 1;",
"}",
"return 0;",
"}"
] | [
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
9
],
[
11
],
[
13
],
[
17
],
[
19
]
] |
1,705 | int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
void *data, uint32_t length, uint64_t offset)
{
int ret = 0;
VHDXLogSequence logs = { .valid = true,
.count = 1,
.hdr = { 0 } };
/* Make sure... | false | qemu | c6572fa0d2b81bc3a9ca5716f975f2bf59c62e6c | int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
void *data, uint32_t length, uint64_t offset)
{
int ret = 0;
VHDXLogSequence logs = { .valid = true,
.count = 1,
.hdr = { 0 } };
bdrv... | {
"code": [],
"line_no": []
} | int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,
void *VAR_2, uint32_t VAR_3, uint64_t VAR_4)
{
int VAR_5 = 0;
VHDXLogSequence logs = { .valid = true,
.count = 1,
.hdr = { 0 } };
bdrv_flush(VAR... | [
"int FUNC_0(BlockDriverState *VAR_0, BDRVVHDXState *VAR_1,\nvoid *VAR_2, uint32_t VAR_3, uint64_t VAR_4)\n{",
"int VAR_5 = 0;",
"VHDXLogSequence logs = { .valid = true,",
".count = 1,\n.hdr = { 0 } };",
"bdrv_flush(VAR_0);",
"VAR_5 = vhdx_log_write(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4);",
"if (VAR_5 < 0) {... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
9
],
[
11,
13
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
51
],
[
55,
57
],
[
59
]
] |
1,707 | static bool release_pending(sPAPRDRConnector *drc)
{
return drc->awaiting_release;
}
| false | qemu | f1c52354e5bdab6983d13a4c174759c585e834b3 | static bool release_pending(sPAPRDRConnector *drc)
{
return drc->awaiting_release;
}
| {
"code": [],
"line_no": []
} | static bool FUNC_0(sPAPRDRConnector *drc)
{
return drc->awaiting_release;
}
| [
"static bool FUNC_0(sPAPRDRConnector *drc)\n{",
"return drc->awaiting_release;",
"}"
] | [
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
]
] |
1,708 | void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
MemoryRegion *address_space,
qemu_irq irq, void* mem_opaque,
void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write))
{
dp8393xState *s;
qemu_... | false | qemu | a8170e5e97ad17ca169c64ba87ae2f53850dab4c | void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift,
MemoryRegion *address_space,
qemu_irq irq, void* mem_opaque,
void (*memory_rw)(void *opaque, target_phys_addr_t addr, uint8_t *buf, int len, int is_write))
{
dp8393xState *s;
qemu_... | {
"code": [],
"line_no": []
} | void FUNC_0(NICInfo *VAR_0, target_phys_addr_t VAR_1, int VAR_2,
MemoryRegion *VAR_3,
qemu_irq VAR_4, void* VAR_5,
void (*VAR_6)(void *VAR_7, target_phys_addr_t VAR_8, uint8_t *VAR_9, int VAR_10, int VAR_11))
{
dp8393xState *s;
qemu_check_nic_model(V... | [
"void FUNC_0(NICInfo *VAR_0, target_phys_addr_t VAR_1, int VAR_2,\nMemoryRegion *VAR_3,\nqemu_irq VAR_4, void* VAR_5,\nvoid (*VAR_6)(void *VAR_7, target_phys_addr_t VAR_8, uint8_t *VAR_9, int VAR_10, int VAR_11))\n{",
"dp8393xState *s;",
"qemu_check_nic_model(VAR_0, \"dp83932\");",
"s = g_malloc0(sizeof(dp839... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7,
9
],
[
11
],
[
15
],
[
19
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31
],
[
33
],
[
35
],
[
39
],
[
41
],
[
45
],
[
49
],
[
51
],
[
53
],
[
57,
59
... |
1,709 | int net_init_l2tpv3(const NetClientOptions *opts,
const char *name,
NetClientState *peer, Error **errp)
{
/* FIXME error_setg(errp, ...) on failure */
const NetdevL2TPv3Options *l2tpv3;
NetL2TPV3State *s;
NetClientState *nc;
int fd = -1, gairet;
s... | false | qemu | 32bafa8fdd098d52fbf1102d5a5e48d29398c0aa | int net_init_l2tpv3(const NetClientOptions *opts,
const char *name,
NetClientState *peer, Error **errp)
{
const NetdevL2TPv3Options *l2tpv3;
NetL2TPV3State *s;
NetClientState *nc;
int fd = -1, gairet;
struct addrinfo hints;
struct addrinfo *... | {
"code": [],
"line_no": []
} | int FUNC_0(const NetClientOptions *VAR_0,
const char *VAR_1,
NetClientState *VAR_2, Error **VAR_3)
{
const NetdevL2TPv3Options *VAR_4;
NetL2TPV3State *s;
NetClientState *nc;
int VAR_5 = -1, VAR_6;
struct addrinfo VAR_7;
struct addrinfo *VAR_... | [
"int FUNC_0(const NetClientOptions *VAR_0,\nconst char *VAR_1,\nNetClientState *VAR_2, Error **VAR_3)\n{",
"const NetdevL2TPv3Options *VAR_4;",
"NetL2TPV3State *s;",
"NetClientState *nc;",
"int VAR_5 = -1, VAR_6;",
"struct addrinfo VAR_7;",
"struct addrinfo *VAR_8 = NULL;",
"char *VAR_9, *VAR_10;",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
[
1,
3,
5,
7
],
[
11
],
[
13
],
[
15
],
[
17
],
[
19
],
[
21
],
[
23
],
[
27
],
[
31
],
[
35
],
[
37
],
[
39
],
[
43
],
[
45
],
[
49
],
[
51
],
[
53
],
[
55... |
1,711 | CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler)
{
CPUDebugExcpHandler *old_handler = debug_excp_handler;
debug_excp_handler = handler;
return old_handler;
}
| false | qemu | 83f338f73ecb88cc6f85d6e7b81ebef112ce07be | CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler)
{
CPUDebugExcpHandler *old_handler = debug_excp_handler;
debug_excp_handler = handler;
return old_handler;
}
| {
"code": [],
"line_no": []
} | CPUDebugExcpHandler *FUNC_0(CPUDebugExcpHandler *handler)
{
CPUDebugExcpHandler *old_handler = debug_excp_handler;
debug_excp_handler = handler;
return old_handler;
}
| [
"CPUDebugExcpHandler *FUNC_0(CPUDebugExcpHandler *handler)\n{",
"CPUDebugExcpHandler *old_handler = debug_excp_handler;",
"debug_excp_handler = handler;",
"return old_handler;",
"}"
] | [
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
9
],
[
11
],
[
13
]
] |
1,714 | av_cold int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s,
int flip, int has_alpha)
{
int i;
s->avctx = avctx;
avctx->pix_fmt = has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
if (avctx->skip_alpha) avctx->pix_fmt = AV_PIX_FMT_YUV420P;
... | false | FFmpeg | 03dab49a1267630375c4fc15dec1136814b1f117 | av_cold int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s,
int flip, int has_alpha)
{
int i;
s->avctx = avctx;
avctx->pix_fmt = has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
if (avctx->skip_alpha) avctx->pix_fmt = AV_PIX_FMT_YUV420P;
... | {
"code": [],
"line_no": []
} | av_cold int FUNC_0(AVCodecContext *avctx, VP56Context *s,
int flip, int has_alpha)
{
int VAR_0;
s->avctx = avctx;
avctx->pix_fmt = has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
if (avctx->skip_alpha) avctx->pix_fmt = AV_PIX_FMT_YUV420P;
ff_h264chr... | [
"av_cold int FUNC_0(AVCodecContext *avctx, VP56Context *s,\nint flip, int has_alpha)\n{",
"int VAR_0;",
"s->avctx = avctx;",
"avctx->pix_fmt = has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;",
"if (avctx->skip_alpha) avctx->pix_fmt = AV_PIX_FMT_YUV420P;",
"ff_h264chroma_init(&s->h264chroma, 8);",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5
],
[
7
],
[
11
],
[
13
],
[
15
],
[
19
],
[
21
],
[
23
],
[
25
],
[
27
],
[
29
],
[
31,
33
],
[
35,
37
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49
],
... |
1,715 | static av_always_inline void dist_scale(HEVCContext *s, Mv *mv,
int min_pu_width, int x, int y,
int elist, int ref_idx_curr, int ref_idx)
{
RefPicList *refPicList = s->ref->refPicList;
MvField *tab_mvf = s->ref->tab_mvf;
... | false | FFmpeg | 246d3bf0ec93dd21069f9352ed4909aec334cd4d | static av_always_inline void dist_scale(HEVCContext *s, Mv *mv,
int min_pu_width, int x, int y,
int elist, int ref_idx_curr, int ref_idx)
{
RefPicList *refPicList = s->ref->refPicList;
MvField *tab_mvf = s->ref->tab_mvf;
... | {
"code": [],
"line_no": []
} | static av_always_inline void FUNC_0(HEVCContext *s, Mv *mv,
int min_pu_width, int x, int y,
int elist, int ref_idx_curr, int ref_idx)
{
RefPicList *refPicList = s->ref->refPicList;
MvField *tab_mvf = s->ref->tab_mvf;
... | [
"static av_always_inline void FUNC_0(HEVCContext *s, Mv *mv,\nint min_pu_width, int x, int y,\nint elist, int ref_idx_curr, int ref_idx)\n{",
"RefPicList *refPicList = s->ref->refPicList;",
"MvField *tab_mvf = s->ref->tab_mvf;",
"int VAR_0 = refPicList[elist].list[TAB_MVF(x, y).ref_idx[elist]];",
... | [
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3,
5,
7
],
[
9
],
[
11
],
[
13
],
[
15
],
[
19,
21
],
[
23
]
] |
1,716 | static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size)
{
RMContext *rm = s->priv_data;
ByteIOContext *pb = &s->pb;
StreamInfo *stream = rm->video_stream;
int key_frame = stream->enc->coded_frame->key_frame;
/* XXX: this is incorrect: should be a parameter */
/* We... | false | FFmpeg | 3c895fc098f7637f6d5ec3a9d6766e724a8b9e41 | static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size)
{
RMContext *rm = s->priv_data;
ByteIOContext *pb = &s->pb;
StreamInfo *stream = rm->video_stream;
int key_frame = stream->enc->coded_frame->key_frame;
#if 1
write_packet_header(s, stream, size + 7, ... | {
"code": [],
"line_no": []
} | static int FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)
{
RMContext *rm = VAR_0->priv_data;
ByteIOContext *pb = &VAR_0->pb;
StreamInfo *stream = rm->video_stream;
int VAR_3 = stream->enc->coded_frame->VAR_3;
#if 1
write_packet_header(VAR_0, stream, VAR_2 +... | [
"static int FUNC_0(AVFormatContext *VAR_0, const uint8_t *VAR_1, int VAR_2)\n{",
"RMContext *rm = VAR_0->priv_data;",
"ByteIOContext *pb = &VAR_0->pb;",
"StreamInfo *stream = rm->video_stream;",
"int VAR_3 = stream->enc->coded_frame->VAR_3;",
"#if 1\nwrite_packet_header(VAR_0, stream, VAR_2 + 7, VAR_3);",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
[
1,
3
],
[
5
],
[
7
],
[
9
],
[
11
],
[
23,
25
],
[
29
],
[
35
],
[
37
],
[
39
],
[
41
],
[
43
],
[
45
],
[
47
],
[
49,
53
],
[
55
],
[
57
],
[
59
],
[
61,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.