functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
check_socket_policies(struct role_acl *role) { struct proc_acl *tmp; struct ip_acl *tmpi; int has_connect; int has_bind; unsigned int i; for_each_subject(tmp, role) { has_connect = 0; has_bind = 0; for (i = 0; i < tmp->ip_num; i++) { tmpi = tmp->ips[i]; if (tmpi->mode & GR_IP_BIND) has_bind = 1; ...
false
false
false
false
false
0
_ZmodF_poly_FFT_factor( ZmodF_t* x, unsigned long rows_depth, unsigned long cols_depth, unsigned long skip, unsigned long nonzero, unsigned long length, unsigned long twist, unsigned long n, ZmodF_t* scratch) { FLINT_ASSERT(skip >= 1); FLINT_ASSERT(n >= 1); FLINT_ASSERT(rows...
false
false
false
false
false
0
drv_CF_write1(const int row, const int col, const char *data, const int len) { char cmd[3] = "\021xy"; /* set cursor position */ if (row == 0 && col == 0) { drv_generic_serial_write("\001", 1); /* cursor home */ } else { cmd[1] = (char) col; cmd[2] = (char) row; drv_generic_serial_write(cmd, 3); } ...
false
false
false
false
false
0
pci_alloc_child_bus(struct pci_bus *parent, struct pci_dev *bridge, int busnr) { struct pci_bus *child; int i; int ret; /* * Allocate a new bus, and inherit stuff from the parent.. */ child = pci_alloc_bus(parent); if (!child) return NULL; child->parent = parent; child->ops = parent->ops; child...
false
false
false
false
false
0
activate_entry_shift_x(GtkWidget *entry, gpointer user_data) { G_CONST_RETURN gchar* t; gdouble a; GtkWidget* xyplot = NULL; gdouble xmin; gdouble ymin; gdouble xmax; gdouble ymax; GList* data_list = NULL; GList* current = NULL; XYPlotWinData* data; if(!user_data || !G_IS_OBJECT(user_data)) return; xyplo...
false
false
false
false
false
0
syncevo_server_get_presence (SyncevoServer *syncevo, const char *config_name, SyncevoServerGetPresenceCb callback, gpointer userdata) { ServerAsyncData *data; SyncevoServerPrivate *priv; priv = GET_PRIVATE (syncevo); ...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx__drivers__LFBDisplayDriver_ReleaseSurface(struct __ecereNameSpace__ecere__com__Instance * display, struct __ecereNameSpace__ecere__com__Instance * surface) { struct __ecereNameSpace__ecere__gfx__drivers__LFBSurface * lfbSurface = ((struct __ecereNameSpace__ecere__gfx__Surface ...
false
false
false
false
false
0
_mf_cover(long *p) { unsigned long z,i,w; if(p && (w=*(p-1))==(*(p-2))) { int rc; unsigned long ww=(*(p-2))+2*sizeof(long *); #if defined(linux) if(initMutex) initMutex=_initMutex(); #endif if(memTrack && ww>=memTrackThreshold) printf("0x%x freeing %lu bytes\n",p,ww); for...
false
false
false
false
false
0
interpretOidsOption(List *defList) { ListCell *cell; /* Scan list to see if OIDS was included */ foreach(cell, defList) { DefElem *def = (DefElem *) lfirst(cell); if (pg_strcasecmp(def->defname, "oids") == 0) return defGetBoolean(def); } /* OIDS option was not specified, so use default. */ return ...
false
false
false
false
false
0
ERROR_Unsupported(CTX ctx, const char *whatis, kclass_t cid, const char *symbol) { if(symbol == NULL) { return GammaBuilder_perror(ctx, KC_ERR, "unsupported %s", whatis); } else if(cid == CLASS_unknown) { return GammaBuilder_perror(ctx, KC_ERR, "unsupported %s: %s", whatis, symbol); } else { return GammaBuil...
false
false
false
false
false
0
closelistfield (FuncState *fs, struct ConsControl *cc) { if (cc->v.k == VVOID) return; /* there is no list item */ luaK_exp2nextreg(fs, &cc->v); cc->v.k = VVOID; if (cc->tostore == LFIELDS_PER_FLUSH) { luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore); /* flush */ cc->tostore = 0; /* no more items...
false
false
false
false
false
0
smoothing_ok (j_decompress_ptr cinfo) { j_lossy_d_ptr lossyd = (j_lossy_d_ptr) cinfo->codec; d_coef_ptr coef = (d_coef_ptr) lossyd->coef_private; boolean smoothing_useful = FALSE; int ci, coefi; jpeg_component_info *compptr; JQUANT_TBL * qtable; int * coef_bits; int * coef_bits_latch; if (! cinfo->pr...
false
false
false
false
false
0
snd_pcm_hw_params_get_min_align(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val) { unsigned int format, channels, fb, min_align; int err; err = snd_pcm_hw_param_get(params, SND_PCM_HW_PARAM_FORMAT, &format, NULL); if (err < 0) return err; err = snd_pcm_hw_param_get(params, SND_PCM_HW_PARAM_CHANNELS, &...
false
false
false
false
false
0
free_devices_list(GList *dev_list) { while (dev_list) { g_free( ((dev_info*)dev_list->data)->name); g_free( ((dev_info*)dev_list->data)->icon); g_free(dev_list->data); dev_list = g_list_delete_link (dev_list, dev_list); } g_list_free(dev_list); }
false
false
false
false
false
0
setCurrentMeshIndex(int index) { if ( index < 0 || index >= modelInfo->nofMeshes ) modelInfo->currentMeshIndex = NO_INDEX; else modelInfo->currentMeshIndex = index; }
false
false
false
false
false
0
showdisplay(char *buf, char *name, int id, char *args, struct adsi_script *state, const char *script, int lineno) { char *tok, dispname[80]; int line = 0, flag = 0, cmd = 3; struct adsi_display *disp; /* Get display */ if (!(tok = get_token(&args, script, lineno)) || process_token(dispname, tok, sizeof(dispname) ...
false
false
false
false
false
0
efx_reset_down(struct efx_nic *efx, enum reset_type method) { EFX_ASSERT_RESET_SERIALISED(efx); if (method == RESET_TYPE_MCDI_TIMEOUT) efx->type->prepare_flr(efx); efx_stop_all(efx); efx_disable_interrupts(efx); mutex_lock(&efx->mac_lock); if (efx->port_initialized && method != RESET_TYPE_INVISIBLE && m...
false
false
false
false
false
0
sbranch(cond, label) ccode_pt cond; label_no label; { #ifdef I8088 char *cnameptr; if ((ccode_t) cond != RN) { outsbranch(); outbyte(*(cnameptr = scondnames[(int) cond])); outbyte(*(cnameptr + 1)); outtab(); outlabel(label); outnl(); } #endif #ifdef MC6809 outsbranch(); outcond(cond); ...
false
false
false
false
false
0
egg_list_box_real_motion_notify_event (GtkWidget *widget, GdkEventMotion *event) { EggListBox *list_box = EGG_LIST_BOX (widget); EggListBoxChildInfo *child; GdkWindow *window, *event_window; gint relative_y; gdouble parent_y; window = gtk_widget_get_window (GTK_WIDGET (list_box)); event_window...
false
false
false
false
false
0
pci_quirk_intel_pch_acs(struct pci_dev *dev, u16 acs_flags) { u16 flags = dev->dev_flags & PCI_DEV_FLAGS_ACS_ENABLED_QUIRK ? INTEL_PCH_ACS_FLAGS : 0; if (!pci_quirk_intel_pch_acs_match(dev)) return -ENOTTY; return acs_flags & ~flags ? 0 : 1; }
false
false
false
false
false
0
getDataWord() const { u_int n = getFrameDataLength(); u_int w = (n >= 1) ? (*this)[3] : 0; if (n >= 2) w = (w<<8)|(*this)[4]; if (n >= 3) w = (w<<8)|(*this)[5]; if (n >= 4) w = (w<<8)|(*this)[6]; return w; }
false
false
false
false
false
0
printLine (SourceLocation *source) { if (source == NULL) { return ; } string file = source->filename ; int line = source->lineno ; char buf[1024] ; int n = 0 ; std::ifstream s (file.c_str()) ; if (!s) { //std::cerr << "can't find file " << file << '\n' ; return ; ...
false
false
false
false
false
0
evhttp_send_reply_chunk_with_cb(struct evhttp_request *req, struct evbuffer *databuf, void (*cb)(struct evhttp_connection *, void *), void *arg) { struct evhttp_connection *evcon = req->evcon; struct evbuffer *output; if (evcon == NULL) return; output = bufferevent_get_output(evcon->bufev); if (evbuffer_g...
false
false
false
false
false
0
send_packet (GSocket *socket, GSocketAddress *address, XDMCPPacket *packet) { gchar *address_string; guint8 data[1024]; gssize n_written; address_string = socket_address_to_string (address); g_debug ("Send %s to %s", xdmcp_packet_tostring (packet), address_string); g_free (address_string); ...
false
false
false
false
false
0
goc_canvas_get_item_at (GocCanvas *canvas, double x, double y) { GocItem *result = NULL; double d = goc_item_distance (GOC_ITEM (canvas->root), x, y, &result); return (d == 0.)? result: NULL; }
false
false
false
false
false
0
static_origin (gamgi_object *child, gamgi_object *parent) { gamgi_text *text; gamgi_orbital *orbital; gamgi_atom *atom; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; double origin[3]; ...
false
false
false
false
false
0
gettoken_query(TSQueryParserState state, int8 *operator, int *lenval, char **strval, int16 *weight) { while (1) { switch (state->state) { case WAITFIRSTOPERAND: case WAITOPERAND: if (t_iseq(state->buf, '!')) { (state->buf)++; /* can safely ++, t_iseq guarantee * that pg_...
false
false
false
false
false
0
ShowCaretAtCurrentPosition() { if (hasFocus) { caret.active = true; caret.on = true; SetTicking(true); } else { caret.active = false; caret.on = false; } InvalidateCaret(); }
false
false
false
false
false
0
configNoReload(bool reload, eConfigFloatValues index, char const* fieldname, float defvalue) { if (!reload) return true; float val = sConfig.GetFloatDefault(fieldname, defvalue); if (val != getConfig(index)) sLog.outError("%s option can't be changed at mangosd.conf reload, using current val...
false
false
false
false
false
0
get_winsize(void) { int fd; if ((fd=open(consolename,O_RDONLY))<0) { fprintf(stderr,"%s: ",prgname); perror(consolename); exit(1); } ioctl(fd, TIOCGWINSZ, &win); opt_buf=win.ws_col*win.ws_row; close(fd); opt_buf +=4; /* 2:size, 1:terminator, 1:alignment */ opt_buf*=2; /* the ...
false
false
false
false
false
0
handle_coins(void) { int coins; /* if we got a coin, set the IRQ on the main CPU */ coins = input_port_3_r(0) & 3; if (((coins ^ last_coins) & 0x01) && (coins & 0x01) == 0) { coin_state &= ~0x01; cpu_set_irq_line(0, 0, ASSERT_LINE); } if (((coins ^ last_coins) & 0x02) && (coins & 0x02) == 0) { ...
false
false
false
false
false
0
summon_specific(int y1, int x1, int lev, int type, int delay) { int i, x = 0, y = 0, r_idx; /* Look for a location */ for (i = 0; i < 20; ++i) { /* Pick a distance */ int d = (i / 15) + 1; /* Pick a location */ scatter(&y, &x, y1, x1, d, 0); /* Require "empty" floor grid */ if (!cave_empty_bold(y, x...
false
false
false
false
false
0
snd_config_imake_string(snd_config_t **config, const char *id, const char *value) { int err; snd_config_t *tmp; err = snd_config_make(&tmp, id, SND_CONFIG_TYPE_STRING); if (err < 0) return err; if (value) { tmp->u.string = strdup(value); if (!tmp->u.string) { snd_config_delete(tmp); return -ENOMEM; ...
false
false
false
false
false
0
write_journal_file(ext2_filsys fs, char *filename, blk_t num_blocks, int flags) { errcode_t retval; char *buf = 0; int fd, ret_size; blk_t i; if ((retval = ext2fs_create_journal_superblock(fs, num_blocks, flags, &buf))) return retval; /* Open the device or journal file */ if ((fd = op...
false
false
false
false
true
1
tunnelHandlerParent(int fd, TunnelPtr tunnel) { char *message; int n; if(tunnel->buf1.buf == NULL) tunnel->buf1.buf = get_chunk(); if(tunnel->buf1.buf == NULL) { message = "Couldn't allocate buffer"; goto fail; } if(tunnel->buf1.tail != tunnel->buf1.head) { messa...
false
false
false
false
false
0
process_cmd_line(int argc, const char *argv[]) { for (int ii = 1; ii < argc; /*inside*/) { try { if (strcasecmp(argv[ii], "-i") == 0) {itested(); ++ii; if (ii < argc) {itested(); CMD::command(std::string("include ") + argv[ii++], &CARD_LIST::card_list); }else{untested(); } }else if (strcasecm...
false
false
false
false
false
0
Bop_rgb24_Kto_Aop( GenefxState *gfxs ) { int w = gfxs->length; u8 *D = gfxs->Aop[0]; u8 *S = gfxs->Bop[0]; u32 Skey = gfxs->Skey; int Ostep = gfxs->Ostep; if (Ostep < 0) { D += (gfxs->length - 1) * 3; S += (gfxs->length - 1) * 3; } ...
false
false
false
false
false
0
tty_schedule_flip(struct tty_port *port) { struct tty_bufhead *buf = &port->buf; /* paired w/ acquire in flush_to_ldisc(); ensures * flush_to_ldisc() sees buffer data. */ smp_store_release(&buf->tail->commit, buf->tail->used); queue_work(system_unbound_wq, &buf->work); }
false
false
false
false
false
0
rb_f_exit(argc, argv) int argc; VALUE *argv; { VALUE status; int istatus; rb_secure(4); if (rb_scan_args(argc, argv, "01", &status) == 1) { switch (status) { case Qtrue: istatus = EXIT_SUCCESS; break; case Qfalse: istatus = EXIT_FAILURE; break; default: istatu...
false
false
false
false
false
0
dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg, int nents, int dir) { struct scatterlist *s; int i; #ifdef CONFIG_IOMMU_DEBUG pr_debug("dma_map_sg overflow\n"); #endif for_each_sg(sg, s, nents, i) { unsigned long addr = sg_phys(s); if (nonforced_iommu(dev, addr, s->length)) { add...
false
false
false
false
false
0
match(const char *sym, const char * const pat[]) { const char *p; while (*pat) { p = *pat++; const char *endp = p + strlen(p) - 1; /* "*foo" */ if (*p == '*') { if (strrcmp(sym, p + 1) == 0) return 1; } /* "foo*" */ else if (*endp == '*') { if (strncmp(sym, p, strlen(p) - 1) == 0) return ...
false
false
false
false
false
0
IDirectFBDataBuffer_Memory_GetData( IDirectFBDataBuffer *thiz, unsigned int length, void *data_buffer, unsigned int *read_out ) { unsigned int size; DIRECT_INTERFACE_GET_D...
false
false
false
false
false
0
ebnet_get_addresses(const char *host, char *ipv6_address, char *ipv4_address) { struct addrinfo hints; struct addrinfo *info_list = NULL; struct addrinfo *info; char dummy_service[IN_PORTSTRLEN]; int gai_error; *ipv6_address = '\0'; *ipv4_address = '\0'; /* * Look up `ebnet_host_i...
true
true
false
false
false
1
glade_gtk_widget_write_widget (GladeWidgetAdaptor *adaptor, GladeWidget *widget, GladeXmlContext *context, GladeXmlNode *node) { GladeProjectFormat fmt; fmt = glade_project_get_format (widget->project); if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET (fmt))) ...
false
false
false
false
false
0
insert_veteran_help(char *outbuf, size_t outlen, const struct veteran_system *veteran, const char *intro, const char *nolevels) { /* game.veteran can be NULL in pregame; if so, keep quiet about * veteran levels */ if (!veteran) { return FALSE; ...
false
false
false
false
false
0
S_do_oddball(pTHX_ SV **oddkey, SV **firstkey) { dVAR; PERL_ARGS_ASSERT_DO_ODDBALL; if (*oddkey) { if (ckWARN(WARN_MISC)) { const char *err; if (oddkey == firstkey && SvROK(*oddkey) && (SvTYPE(SvRV(*oddkey)) == SVt_PVAV || SvTYPE(SvRV(*oddkey)) == SVt_PVHV)) { err = "Refere...
false
false
false
false
false
0
display() const { for(std::map<unsigned int,BindingEnergyTable*>::const_iterator it = tables.begin(); it != tables.end(); it++) it->second->display(); }
false
false
false
false
false
0
x509_build_subjectAltNames(linked_list_t *list) { chunk_t subjectAltNames = chunk_empty, name; enumerator_t *enumerator; identification_t *id; if (list->get_count(list) == 0) { return chunk_empty; } enumerator = list->create_enumerator(list); while (enumerator->enumerate(enumerator, &id)) { name = build_...
false
false
false
false
false
0
OutputErrorAux(TestCase * ptcase, std::string strErr1, int i1, std::string strErr2, int i2, bool showValues, int valueFound, int valueExpected) { // if (g_debugMode) // ::DebugBreak(); if (!g_silentMode) { //std::cout << ptcase->TestName() << ": "; std::cout << strErr1; if (i1 > -1) { std:...
false
false
false
false
false
0
mpage_map_and_submit_buffers(struct mpage_da_data *mpd) { struct pagevec pvec; int nr_pages, i; struct inode *inode = mpd->inode; struct buffer_head *head, *bh; int bpp_bits = PAGE_CACHE_SHIFT - inode->i_blkbits; pgoff_t start, end; ext4_lblk_t lblk; sector_t pblock; int err; start = mpd->map.m_lblk >> bpp_b...
false
false
false
false
false
0
parse_zlib(zbuf *a, int parse_header) { int final, type; if (parse_header) if (!parse_zlib_header(a)) return 0; a->num_bits = 0; a->code_buffer = 0; do { final = zreceive(a,1); type = zreceive(a,2); if (type == 0) { if (!parse_uncompressed_block(a)) return 0; } else...
false
false
false
false
false
0
em28xx_get_key_winfast_usbii_deluxe(struct i2c_client *i2c_dev, enum rc_type *protocol, u32 *scancode) { unsigned char subaddr, keydetect, key; struct i2c_msg msg[] = { { .addr = i2c_dev->addr, .flags = 0, .buf = &subaddr, .len = 1}, { .addr = i2c_dev->addr, .flags = I2C_M_RD, .buf = &keydetect, .le...
false
false
false
false
false
0
Deal_With_HTTP( SOCKET fd, netAddress &HTTPAddress ) { int res; double sec1, sec2, diff; sec1 = get_seconds(); netSocket NewHTTP; PIPCNT pip; NewHTTP.setHandle (fd); pip = Add_to_IP_Count(HTTPAddress, sec1); pip->i_http_requests++; if (VERB9) { string s = HTTPAddress.getHost(...
false
false
false
false
false
0
symtab_list_finalize(symbol_ident_list *list) { int i; for (i=0; i<list->size; i++) { SAFE_FREE(list->idents[i]); } SAFE_FREE(list->idents); }
false
false
false
false
false
0
displayStateAsLanes(int level, const char *text, void *statePointer) { unsigned int i; #if (KeccakF_width == 1600) unsigned long long int *state = statePointer; #endif #if (KeccakF_width == 800) unsigned int *state = statePointer; #endif #if (KeccakF_width == 400) unsigned short *state = statePointer; #...
false
false
false
false
false
0
vd_dnd_drop_leave(GtkWidget *widget, GdkDragContext *context, guint time, gpointer data) { ViewDir *vd = data; if (vd->drop_fd != vd->click_fd) vd_color_set(vd, vd->drop_fd, FALSE); vd->drop_fd = NULL; if (vd->dnd_drop_leave_func) vd->dnd_drop_leave_func(vd); }
false
false
false
false
false
0
close() { ((std::fstream*)out)->close(); }
false
false
false
false
false
0
UFOOutputGroups(char *basedir,SplineFont *sf) { FILE *plist = PListCreate( basedir, "groups.plist" ); if ( plist==NULL ) return( false ); /* These don't act like fontforge's groups. There are comments that this */ /* could be used for defining classes (kerning classes, etc.) but no */ /* resoluti...
false
false
false
false
false
0
main(argc,argv) int argc; char **argv; { xargc = argc; /* Make global copies of argc */ xargv = argv; /* ...and argv. */ start = 0; /* No default start state. */ seq = 0; /* Packet sequence number. */ parity = 0; /* Initial parity. */ strncpy(ttname,dftty,DEVNAMLEN); /* Default devi...
false
false
false
false
false
0
x264_reference_reset( x264_t *h ) { while( h->frames.reference[0] ) x264_frame_push_unused( h, x264_frame_pop( h->frames.reference ) ); h->fdec->i_poc = h->fenc->i_poc = 0; }
false
false
false
false
false
0
readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) { Guint offset; int type, gen, c, i, j; if (first + n < 0) { return gFalse; } if (first + n > size) { if (resize(first + n) != size) { error(-1, "Invalid 'size' inside xref table"); return gFalse; } } for (i = first;...
false
false
false
false
false
0
sanei_genesys_write_0x8c (Genesys_Device * dev, uint8_t index, uint8_t val) { SANE_Status status; DBG (DBG_io, "sanei_genesys_write_0x8c: 0x%02x,0x%02x\n", index, val); status = sanei_usb_control_msg (dev->dn, REQUEST_TYPE_OUT, REQUEST_REGISTER, VALUE_BUF_ENDACCESS, index, 1, &val); if (status != SA...
false
false
false
false
false
0
shell_show_overview_page (GnomeControlCenter *center) { GnomeControlCenterPrivate *priv = center->priv; notebook_select_page (priv->notebook, priv->scrolled_window); if (priv->current_panel_box) notebook_remove_page (priv->notebook, priv->current_panel_box); priv->current_panel = NULL; priv->current_pan...
false
false
false
false
false
0
message_get_priority(int which) { int i; int priority; if ( which == MESSAGE_GET_HIGHEST ){ priority = MESSAGE_PRIORITY_LOW; } else { priority = MESSAGE_PRIORITY_HIGH; } for ( i = 0; i < Num_messages_playing; i++ ) { if ( (which == MESSAGE_GET_HIGHEST) && (Playing_messages[i].priority > priority) ){ pr...
false
false
false
false
false
0
AddColumnToTable( int tblHandle, int colType, const char* colName, int colSize, const char* colOpts ) { if ( ! colName ) { vtkErrorMacro( "Cannot add column with empty name to table " << tblHandle ); return -1; } if ( tblHandle < 0 || tblHandle >= this->GetNumberOfTables() ) { vtkErrorM...
false
false
false
false
false
0
LocateItemContainingRegExp(struct Item *list,char *string) { struct Item *ip; regex_t rx,rxcache; regmatch_t pmatch; int line = 1; if (CfRegcomp(&rxcache,string, REG_EXTENDED) != 0) { return NULL; } for (ip = list; (ip != NULL); ip=ip->next) { if (ip->name == NULL) { continue; ...
false
false
false
false
false
0
__vxge_hw_vp_initialize(struct __vxge_hw_device *hldev, u32 vp_id, struct __vxge_hw_virtualpath *vpath) { enum vxge_hw_status status = VXGE_HW_OK; vxge_trace(); if (!(hldev->vpath_assignments & vxge_mBIT(vp_id))) { status = VXGE_HW_ERR_VPATH_NOT_AVAILABLE; goto exit; } vpath->vp_id = vp_id; vpath->vp_op...
false
false
false
false
false
0
tpf_persona_store_construct (GType object_type, TpAccount* account) { TpfPersonaStore * self = NULL; TpAccount* _tmp0_ = NULL; TpAccount* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; TpAccount* _tmp4_ = NULL; const gchar* _tmp5_ = NULL; g_return_val_if_fail (account != NULL, NULL); _t...
false
false
false
false
false
0
_set_image_uv_by_axis_y(Evas_Map *map, Elm_Transit_Effect_ResizableFlip_Node *flip, Eina_Bool revert) { if (revert) { evas_map_point_image_uv_set(map, 0, (flip->from_size.x * 2) + flip->to_size.x, 0); evas_map_point_image_uv...
false
false
false
false
false
0
Trspi_LoadBlob_RSA_KEY_PARMS(UINT64 *offset, BYTE *blob, TCPA_RSA_KEY_PARMS *parms) { Trspi_LoadBlob_UINT32(offset, parms->keyLength, blob); Trspi_LoadBlob_UINT32(offset, parms->numPrimes, blob); Trspi_LoadBlob_UINT32(offset, parms->exponentSize, blob); if (parms->exponentSize > 0) Trspi_LoadBlob(offset, parms->...
false
false
false
false
false
0
ide_check_pm_state(ide_drive_t *drive, struct request *rq) { struct ide_pm_state *pm = rq->special; if (rq->cmd_type == REQ_TYPE_ATA_PM_SUSPEND && pm->pm_step == IDE_PM_START_SUSPEND) /* Mark drive blocked when starting the suspend sequence. */ drive->dev_flags |= IDE_DFLAG_BLOCKED; else if (rq->cmd_type =...
false
false
false
false
false
0
key_yank_from_cutbuffer(void) { char *cutbuffer; cutbuffer = gui_entry_get_cutbuffer(active_entry); if (cutbuffer != NULL) { gui_entry_insert_text(active_entry, cutbuffer); g_free(cutbuffer); } }
false
false
false
false
false
0
cache_manager_render_file(CleanData *cd) { if (cd->list) { FileData *fd; gint success; fd = cd->list->data; cd->list = g_list_remove(cd->list, fd); cd->tl = (ThumbLoaderStd *)thumb_loader_new(options->thumbnails.max_width, options->thumbnails.max_height); thumb_loader_set_callbacks((ThumbLoader *)cd->t...
false
false
false
false
false
0
table_ref(struct table *table_0X, long key_1X) { long arg0K0; long next_5X; long i_4X; long *keys_3X; long size_2X; { if ((0 < (table_0X->size))) { size_2X = table_0X->size; keys_3X = table_0X->keys; arg0K0 = ((key_1X ^ ((((key_1X)<<1)) ^ (((key_1X)>>10)))) & (-1 + size_2X)); goto L3709;} ...
false
false
false
false
false
0
dump_ops_vector (FILE *file, VEC (operand_entry_t, heap) *ops) { operand_entry_t oe; unsigned int i; FOR_EACH_VEC_ELT (operand_entry_t, ops, i, oe) { fprintf (file, "Op %d -> rank: %d, tree: ", i, oe->rank); print_generic_expr (file, oe->op, 0); } }
false
false
false
false
false
0
comp_extrafit_corr( mgtmp *m /* Current resolution mgtmp */ ) { rspl *s = m->s; int n; int dno = s->d.no; int di = s->di; double *x = m->q.x; /* Grid solution values */ int f = m->f; /* Output dimensions being worked on */ /* Compute error for each data point */ for (n = 0; n < dno; n++) { int j; int ...
false
false
false
false
false
0
el_filename_list_possib(char *pathname, char ***av) { char *dir; char *file; int ac; if (SplitPath(pathname, &dir, &file) < 0) return 0; ac = FindMatches(dir, file, av); free(dir); free(file); return ac; }
false
false
false
false
false
0
gnm_font_button_set_show_preview_entry (GnmFontButton *font_button, gboolean show) { GnmFontButtonPrivate *priv = font_button->priv; if (priv->font_dialog) gtk_font_chooser_set_show_preview_entry (GTK_FONT_CHOOSER (priv->font_dialog), show); else priv->show_p...
false
false
false
false
false
0
_k_dataChanged( const QModelIndex & topLeft, const QModelIndex & bottomRight ) { if( topLeft.parent().isValid() ) { return; } updateHiddenState( topLeft.row(), bottomRight.row() ); }
false
false
false
false
false
0
WriteMsg(std::string &Text,bool Sync,const char *Fmt,...) { va_list args; va_start(args,Fmt); // sprintf the description char S[512]; vsnprintf(S,sizeof(S) - 4,Fmt,args); va_end(args); if (Sync == true) strcat(S," 2> /dev/null || echo\n"); else strcat(S," 2> /dev/null\n"); // S...
false
false
false
false
false
0
PrintResults( FILE *f, UInt32 dictionarySize, UInt64 elapsedTime, UInt64 size, bool decompressMode, UInt64 secondSize) { UInt64 speed = MyMultDiv64(size, elapsedTime); fprintf(f, "%6d KB/s ", (unsigned int)(speed / 1024)); UInt64 rating; if (decompressMode) rating = GetDecompressRati...
false
false
false
false
false
0
exec_internal(request_rec *r, const char *extpath) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "mod_auth_dacs: Unsupported authentication method: \"internal\""); return(HTTP_INTERNAL_SERVER_ERROR); }
false
false
false
false
false
0
initCache() { cachetail = 1; // leave zero empty so zero means not in cache. cache = malloc(CACHESIZE); if(!cache) { printf("Failure to allocate cache of size %lld\n", CACHESIZE); exit(1); } cachemap = calloc(CACHEMAPSIZE, sizeof(unsigned long long)); if(!cachemap) { printf("Failure to allocate ...
false
false
false
false
false
0
null_new(const char *subplugin) { struct pluginDevice* nd = ST_MALLOCT(struct pluginDevice); if (nd == NULL) { LOG(PIL_CRIT, "out of memory"); return(NULL); } memset(nd, 0, sizeof(*nd)); nd->pluginid = pluginid; nd->idinfo = DEVICE; nd->sp.s_ops = &nullOps; return (StonithPlugin *)nd; }
false
false
false
false
false
0
gst_flv_demux_create_index (GstFlvDemux * demux, gint64 pos, GstClockTime ts) { gint64 size; GstFormat fmt = GST_FORMAT_BYTES; size_t tag_size; guint64 old_offset; GstBuffer *buffer; GstClockTime tag_time; GstFlowReturn ret = GST_FLOW_OK; if (G_UNLIKELY (!gst_pad_query_peer_duration (demux->sinkpad, &f...
false
false
false
false
false
0
setData(const QString &mimeType, const QVariant &data) { if (data.type() == QVariant::ByteArray) { QMimeData::setData(mimeType, data.toByteArray()); } else if (data.canConvert(QVariant::String)) { QMimeData::setData(mimeType, data.toString().toLatin1()); } }
false
false
false
false
false
0
dma_find_channel(enum dma_transaction_type tx_type) { return this_cpu_read(channel_table[tx_type]->chan); }
false
false
false
false
false
0
diff_file_content_load_workdir(git_diff_file_content *fc) { int error = 0; git_buf path = GIT_BUF_INIT; if (fc->file->mode == GIT_FILEMODE_COMMIT) return diff_file_content_commit_to_str(fc, true); if (fc->file->mode == GIT_FILEMODE_TREE) return 0; if (git_buf_joinpath( &path, git_repository_workdir(fc->r...
false
false
false
false
false
0
qos_tmpnam(apr_pool_t *pool, server_rec *s) { qos_srv_config *sconf = (qos_srv_config*)ap_get_module_config(s->module_config, &qos_module); char *path = QS_MFILE; char *id; char *e; if(sconf && sconf->mfile) { path = sconf->mfile; } if(s) { unsigned int scode = 0; char *key = apr_psprintf(pool...
false
false
false
false
false
0
ReadImageInfo(int index) { (void)index; this->palette_count = this->pal_count; if (ReadPalette() != IM_ERR_NONE) return IM_ERR_ACCESS; imBinFileReadInteger(handle, &this->width); imBinFileReadInteger(handle, &this->height); if (imBinFileError(handle)) return IM_ERR_ACCESS; this->file_data_ty...
false
false
false
false
false
0
getSemaphore(CPAL_DevTypeDef CPAL_Dev) { xSemaphoreHandle result = NULL; if (CPAL_Dev == (I2C1_DEV)->CPAL_Dev) { result = i2cdevDmaEventI2c1; } else if (CPAL_Dev == (I2C2_DEV)->CPAL_Dev) { result = i2cdevDmaEventI2c2; } else if (CPAL_Dev == (I2C3_DEV)->CPAL_Dev) { result = i2cdevDmaEventI2c3; } e...
false
false
false
false
false
0
InsertNextTuple2(double val0, double val1) { double tuple[2]; int numComp = this->GetNumberOfComponents(); if (numComp != 2) { vtkErrorMacro("The number of components do not match the number requested: " << numComp << " != 2"); } tuple[0] = val0; tuple[1] = val1; this->InsertNe...
false
false
false
false
false
0
efx_ef10_mcdi_poll_reboot(struct efx_nic *efx) { struct efx_ef10_nic_data *nic_data = efx->nic_data; int rc; rc = efx_ef10_get_warm_boot_count(efx); if (rc < 0) { /* The firmware is presumably in the process of * rebooting. However, we are supposed to report each * reboot just once, so we must only do tha...
false
false
false
false
false
0
RemoveElectron (Electron* electron) { // remove the electron from children so that it is not taken into account when // updating. electron->SetParent (NULL); Update (); // Force view update. Document *pDoc = reinterpret_cast<Document*> (GetDocument ()); if (pDoc) pDoc->GetView ()->Update (this); }
false
false
false
false
false
0
GetNextUnload() { // If we're already doing something, let them know about it if (lastLoad != None) throw 1; // Look for anything that needs unloaded // Start with highest LOD, work down to lowest trpgManagedTile *tile = NULL; for (int i=pageInfo.size()-1;i>=0;i--) { LodPageInfo...
false
false
false
false
false
0
reinsert(int structno, int address) { if (!HaveEnoughSize()) return 0; instruction[structno][2]=address; return 1; }
false
false
false
false
false
0
setText(CharacterIterator &text, UErrorCode &status) { if (U_SUCCESS(status)) { text.getText(m_text_); usearch_setText(m_strsrch_, m_text_.getBuffer(), m_text_.length(), &status); } }
false
false
false
false
false
0
create_nodetree() { #ifdef _DEBUG std::cout << "ArticleJBBS::create_nodetree " << get_url() << std::endl; #endif return new NodeTreeJBBS( get_url(), get_date_modified() ); }
false
false
false
false
false
0
resolves_to_fixed_type_p (tree instance, int* nonnull) { tree t = TREE_TYPE (instance); int cdtorp = 0; tree fixed = fixed_type_or_null (instance, nonnull, &cdtorp); if (fixed == NULL_TREE) return 0; if (POINTER_TYPE_P (t)) t = TREE_TYPE (t); if (!same_type_ignoring_top_level_qualifiers_p (t, fix...
false
false
false
false
false
0
readBlock(const uint64_t data_size, FILE* read) { pdebug("readBlock()\n"); if(ferror(read)) { fclose(read); perror("Error reading block\n"); return NULL; } uint8_t* data = calloc(data_size, sizeof(uint8_t)); const uint64_t size = fread(data, sizeof(uint8_t), data_size,...
false
false
false
false
false
0