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
babl_extension_load_dir (const char *base_path) { DIR *dir; if ((dir = opendir (base_path))) { struct dirent *dentry; while ((dentry = readdir (dir)) != NULL) { if (dentry->d_name[0] != '.') { char *path = NULL; struct stat st; ...
false
false
false
false
false
0
NewerThan(time_t t) const { return((defined&DATE) && date>t); }
false
false
false
false
false
0
validatePage() { if (!serverWidget->connectionSucceeded()) return false; // get grants on database for the user Utils::Database::Grants grants = serverWidget->grantsOnLastConnectedDatabase(); // if grants not suffisant -> warning dialog if (!((grants & Utils::Database::Grant_Select) && ...
false
false
false
false
false
0
MakePtyBuffers() { int fd=ssh->getfd(); if(fd==-1) return; ssh->Kill(SIGCONT); send_buf=new IOBufferFDStream(new FDStream(ssh->getfd_pipe_out(),"pipe-out"),IOBuffer::PUT); recv_buf=new IOBufferFDStream(new FDStream(ssh->getfd_pipe_in(),"pipe-in"),IOBuffer::GET); pty_send_buf=new IOBufferFDStream...
false
false
false
false
false
0
rtl92d_phy_set_poweron(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); unsigned long flags; u8 value8; u16 i; u32 mac_reg = (rtlhal->interfaceindex == 0 ? REG_MAC0 : REG_MAC1); /* notice fw know band status 0x81[1]/0x53[1] = 0: 5G, 1: 2G */ i...
false
false
false
false
false
0
pre_expr_reaches_here_p_work (occr_bb, expr, bb, visited) basic_block occr_bb; struct expr *expr; basic_block bb; char *visited; { edge pred; for (pred = bb->pred; pred != NULL; pred = pred->pred_next) { basic_block pred_bb = pred->src; if (pred->src == ENTRY_BLOCK_PTR /* Ha...
false
false
false
false
false
0
trampoline_handler(struct pt_regs *regs) { struct kretprobe_instance *ri = NULL; struct hlist_head *head, empty_rp; struct hlist_node *tmp; unsigned long flags, orig_ret_address = 0; unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; kprobe_opcode_t *correct_ret_addr = NULL; INIT_HLIST_HEA...
false
false
false
true
true
1
Lgraphic_char_p() { # line 41 "character.d" int i; int narg; register object *DPPbase=vs_base; #define c DPPbase[0] narg = vs_top - vs_base; check_arg(1); # line 43 "character.d" check_type_character(&c); if (char_font(c) != 0 || char_bits(c) != 0) { vs_base[0] = Cnil; vs_top = vs_base + 1; return...
false
false
false
false
false
0
report() { QString url = appsettings->cvalue(main->cyclist, GC_DVURL, "").toString(); if (url == "") return false; // not configured QNetworkRequest request = QNetworkRequest(QUrl(url)); QByteArray *queryText = new QByteArray("<x1:calendar-query xmlns:x1=\"urn:ietf:params:xml:ns:caldav\">" ...
false
false
false
false
false
0
rb_f_trace_var(int argc, VALUE *argv) { VALUE var, cmd; struct global_entry *entry; struct trace_var *trace; rb_secure(4); if (rb_scan_args(argc, argv, "11", &var, &cmd) == 1) { cmd = rb_block_proc(); } if (NIL_P(cmd)) { return rb_f_untrace_var(argc, argv); } entry = rb_global_ent...
false
false
false
false
false
0
eel_editable_label_accessible_get_name (AtkObject *accessible) { if (accessible->name != NULL) return accessible->name; else { GtkWidget *widget; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)); if (widget == NULL) /* State is defunct */ return NULL; ...
false
false
false
false
false
0
ReorderFieldDefns( int* panMap ) { if (nFieldCount == 0) return OGRERR_NONE; OGRErr eErr = OGRCheckPermutation(panMap, nFieldCount); if (eErr != OGRERR_NONE) return eErr; OGRFieldDefn** papoFieldDefnNew = (OGRFieldDefn**) CPLMalloc(sizeof(OGRFieldDefn*) * nFieldCount); fo...
false
false
false
false
false
0
print_ref_list(int kinds, int detached, int verbose, int abbrev, struct commit_list *with_commit) { int i; struct append_ref_cb cb; struct ref_list ref_list; memset(&ref_list, 0, sizeof(ref_list)); ref_list.kinds = kinds; ref_list.verbose = verbose; ref_list.abbrev = abbrev; ref_list.with_commit = with_commit;...
false
false
false
false
false
0
cupsArrayClear(cups_array_t *a) /* I - Array */ { /* * Range check input... */ if (!a) return; /* * Free the existing elements as needed.. */ if (a->freefunc) { int i; /* Looping var */ void **e; /* Current element */ for (i = a->num_elements, e = a->elements; i > 0; i --, e ++...
false
false
false
false
false
0
isUpperCaseName() const { if (!isName()) return false; for (size_t i = 0; i < _str.length(); ++i) { if (std::islower(_str[i])) return false; } return true; }
false
false
false
false
false
0
start (gboolean showpref) { if (!showpref) if (biff_->value_uint ("check_mode") == AUTOMATIC_CHECK) biff_->start_monitoring (3); }
false
false
false
false
false
0
wb_mode_query(const void *mode, int request, void *ptr) { const SpeexSBMode *m = (const SpeexSBMode*)mode; switch (request) { case SPEEX_MODE_FRAME_SIZE: *((int*)ptr)=2*m->frameSize; break; case SPEEX_SUBMODE_BITS_PER_FRAME: if (*((int*)ptr)==0) *((int*)ptr) ...
false
false
false
false
false
0
recoveryStopsAfter(XLogReaderState *record) { uint8 info; uint8 xact_info; uint8 rmid; TimestampTz recordXtime; info = XLogRecGetInfo(record) & ~XLR_INFO_MASK; rmid = XLogRecGetRmid(record); /* * There can be many restore points that share the same name; we stop at * the first one. */ if (recoveryTar...
false
false
false
false
false
0
init_transput_buffers (NODE_T * p) { int k; for (k = 0; k < MAX_TRANSPUT_BUFFER; k++) { ref_transput_buffer[k] = heap_generator (p, MODE (ROWS), 2 * ALIGNED_SIZE_OF (A68_INT) + TRANSPUT_BUFFER_SIZE); BLOCK_GC_HANDLE (&ref_transput_buffer[k]); set_transput_buffer_size (k, TRANSPUT_BUFFER_SIZE); reset...
false
false
false
false
false
0
knh_NameSpace_gettype(CTX ctx, kNameSpace *ns, kbytes_t name) { if(name.utext[0] == 'v') { if(name.len == 4 && name.utext[1] == 'o' && name.utext[2] == 'i' && name.utext[3] == 'd') return TYPE_void; if(name.len == 3 && name.utext[1] == 'a' && name.utext[2] == 'r') { return TYPE_var; } } return knh_NameS...
false
false
false
false
false
0
heap_sift(HeapElem *h, int root, int size) { while(root*2+1 < size) { int child = root*2+1; if(child < size-1 && h[child].val > h[child+1].val) child++; if(h[root].val > h[child].val) { FFSWAP(HeapElem, h[root], h[child]); root = child; } else ...
false
false
false
false
false
0
Entries_Close (List *list) { if (list) { if (!noexec) { if (isfile (CVSADM_ENTLOG)) write_entries (list); } dellist (&list); } }
false
false
false
false
false
0
send_session_cancellation_to_relay(turnsession_id sid) { int ret = 0; struct message_to_relay sm; ns_bzero(&sm,sizeof(struct message_to_relay)); sm.t = RMT_CANCEL_SESSION; turnserver_id id = (turnserver_id)(sid / TURN_SESSION_ID_FACTOR); struct relay_server *rs = NULL; if(id>=TURNSERVER_ID_BOUNDARY_BETWEEN_TC...
false
false
false
false
false
0
onCmdBackColor(FXObject*,FXSelector sel,void* ptr){ FXColor color=(FXColor)(FXuval)ptr; background[0]=background[1]=color; if(FXSELTYPE(sel)==SEL_COMMAND || !turbomode){ update(); } return 1; }
false
false
false
false
false
0
data(const QModelIndex& index, int role) const { const Node* node = nodeFromIndex(index); if (node == NULL || node->data() == NULL) return 0; if (node->data()->type() == StyleNode) { // Get the lexer and style ID for this node. StyleData* data = static_cast<StyleData*>(node->data()); QsciLexer* lexer = data...
false
false
false
false
false
0
snd_usb_lock_shutdown(struct snd_usb_audio *chip) { int err; atomic_inc(&chip->usage_count); if (atomic_read(&chip->shutdown)) { err = -EIO; goto error; } err = snd_usb_autoresume(chip); if (err < 0) goto error; return 0; error: if (atomic_dec_and_test(&chip->usage_count)) wake_up(&chip->shutdown_wai...
false
false
false
false
false
0
gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) { GstStructure *structure; GstRtpL16Depay *rtpL16depay; gint clock_rate, payload; gint channels; GstCaps *srccaps; gboolean res; const gchar *channel_order; const GstRTPChannelOrder *order; rtpL16depay = GST_RTP_L16_DEPAY (de...
false
false
false
false
false
0
mypopen(char *cmd, char *mode) { #ifdef __DJGPP__ /* HBB 20010312: Has its own implementation of popen(), which * is better suited to the platform than cscope's */ return (popen)(cmd, mode); #else int p[2]; pid_t *poptr; int myside, yourside; pid_t pid; if(pipe(p) < 0) return(NULL); myside = tst(p[WTR], p[...
false
false
false
false
true
1
pcihp_is_ejectable(acpi_handle handle) { acpi_status status; unsigned long long removable; if (!acpi_has_method(handle, "_ADR")) return 0; if (acpi_has_method(handle, "_EJ0")) return 1; status = acpi_evaluate_integer(handle, "_RMV", NULL, &removable); if (ACPI_SUCCESS(status) && removable) return 1; return...
false
false
false
false
false
0
write_frame( hnd_t handle, uint8_t *p_nalu, int i_size, x264_picture_t *p_picture ) { flv_hnd_t *p_flv = handle; flv_buffer *c = p_flv->c; #define convert_timebase_ms( timestamp, timebase ) (int64_t)((timestamp) * (timebase) * 1000 + 0.5) if( !p_flv->i_framenum ) { p_flv->i_delay_time = p_pict...
false
false
false
false
false
0
atk_table_get_index_at (AtkTable *table, gint row, gint column) { AtkTableIface *iface; g_return_val_if_fail (ATK_IS_TABLE (table), -1); g_return_val_if_fail (row >= 0, -1); g_return_val_if_fail (column >= 0, -1); iface = ATK_TABLE_GET_IFACE (table); ...
false
false
false
false
false
0
_parse_playlistmark(BITSTREAM *bits, MPLS_PL *pl) { int ii; MPLS_PLM *plm = NULL; bs_seek_byte(bits, pl->mark_pos); // Skip the length field, I don't use it bs_skip(bits, 32); // Then get the number of marks pl->mark_count = bs_read(bits, 16); plm = calloc(pl->mark_count, sizeof(MPLS_P...
false
false
false
false
false
0
connect_drag_signals (BonoboDock *dock, GtkWidget *item) { if (BONOBO_IS_DOCK_ITEM (item)) { DEBUG (("here")); g_signal_connect (item, "dock_drag_begin", G_CALLBACK (drag_begin), dock); g_signal_connect (item, "dock_drag_motion", G_CALLBACK (drag_motion), dock); ...
false
false
false
false
false
0
nextToken(OptionsParser::TokenType type) { if (m_it == m_end) { if (type == OptionsParser::RequiredToken) { m_hasError = true; if (m_errorString) *m_errorString = QCoreApplication::translate("PluginManager", ...
false
false
false
false
false
0
weight(struct obj *obj) { int wt = objects[obj->otyp].oc_weight; if (obj->otyp == LARGE_BOX && obj->spe == 1) /* Schroedinger's Cat */ wt += mons[PM_HOUSECAT].cwt; if (Is_container(obj) || obj->otyp == STATUE) { struct obj *contents; int cwt = 0; if (obj->otyp == STATUE && obj->corpsenm >= LOW_PM) wt...
false
true
false
false
false
1
av_get_q(void *obj, const char *name, const AVOption **o_out){ int64_t intnum=1; double num=1; int den=1; av_get_number(obj, name, o_out, &num, &den, &intnum); if(num == 1.0 && (int)intnum == intnum) return (AVRational){intnum, den}; else return av_d2q(num*intnum/den, 1<<24); }
false
false
false
false
false
0
getCodecDesc() const { CodecDesc desc; // init file type desc.fileType = "TIFF"; // init pixel types desc.pixelTypes.resize(9); desc.pixelTypes[0] = "BILEVEL"; desc.pixelTypes[1] = "UINT8"; desc.pixelTypes[2] = "INT8"; desc.pixelTypes[3] = "U...
false
false
false
false
false
0
hwloc_export_obj_userdata(void *reserved, struct hwloc_topology *topology __hwloc_attribute_unused, struct hwloc_obj *obj __hwloc_attribute_unused, const char *name, const void *buffer, size_t length) { hwloc__xml_export_state_t state = reserved; if ((name && hwloc__xml_export_check_buffer(name, strlen(n...
false
false
false
false
false
0
cache_action(void) { switch (cache_behavior) { case PLPA_NAME_CAPS(CACHE_USE): if (NULL == map_processor_id_to_tuple) { load_cache(); } break; case PLPA_NAME_CAPS(CACHE_IGNORE): clear_cache(); load_cache(); break; default: return EINV...
false
false
false
false
false
0
i8k_hwmon_show_fan(struct device *dev, struct device_attribute *devattr, char *buf) { int index = to_sensor_dev_attr(devattr)->index; int fan_speed; fan_speed = i8k_get_fan_speed(index); if (fan_speed < 0) return fan_speed; return sprintf(buf, "%d\n", fan_speed); }
false
true
false
false
false
1
SFSplineCharCreate(SplineFont *sf) { SplineChar *sc = SplineCharCreate(sf==NULL?2:sf->layer_cnt); int i; if ( sf==NULL ) { sc->layers[ly_back].background = true; sc->layers[ly_fore].background = false; } else { for ( i=0; i<sf->layer_cnt; ++i ) { sc->layers[i].background = sf->layers[i].backgro...
false
false
false
false
false
0
decode_osc_bits(struct acpi_pci_root *root, char *msg, u32 word, struct pci_osc_bit_struct *table, int size) { char buf[80]; int i, len = 0; struct pci_osc_bit_struct *entry; buf[0] = '\0'; for (i = 0, entry = table; i < size; i++, entry++) if (word & entry->bit) len += snprintf(buf + len, sizeof(buf)...
false
false
false
false
false
0
select_p_step_finish(struct step_record *step_ptr) { select_jobinfo_t *jobinfo = step_ptr->select_jobinfo->data; if (slurmctld_conf.select_type_param & CR_NHC_STEP_NO) { debug3("NHC_No_Steps set not running NHC on steps."); other_step_finish(step_ptr); /* free resources on the job */ post_job_step(step_ptr);...
false
false
false
false
false
0
jpeg_fdct_4x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) { INT32 tmp0, tmp1; INT32 tmp10, tmp11; DCTELEM *dataptr; JSAMPROW elemptr; int ctr; SHIFT_TEMPS /* Pre-zero output coefficient block. */ MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); /* Pass 1: process rows. */ ...
false
false
false
false
false
0
rotate(unsigned char *a, int rot_amount, long long abytes) { int rot_bytes = rot_amount / 8; int rot_bits = rot_amount - (rot_bytes * 8); int i; unsigned char temp[abytes]; memcpy(temp, a, abytes); for (i = 0; i < abytes; i++) { a[(i + rot_bytes) % abytes] = temp[i]; } memcpy(temp, a, abytes); for (i = 1; i ...
false
false
false
false
false
0
decoder_query_generic_fold (GstPad * item, GValue * ret, QueryFold * fold) { gboolean res; if ((res = gst_pad_query (item, fold->query))) { g_value_set_boolean (ret, TRUE); GST_DEBUG_OBJECT (item, "answered query %p", fold->query); } gst_object_unref (item); /* and stop as soon as we have a valid r...
false
false
false
false
false
0
qmonCreateARControl( Widget parent ) { Widget ar_submit, ar_update, ar_done, ar_main_link, ar_pending, ar_folder; #ifdef AR_PENDING static Widget pw[2]; #endif static Widget rw[2]; DENTER(GUI_LAYER, "qmonCreateARControl"); qmon_ar = XmtBuildQueryToplevel( parent, ...
false
false
false
false
false
0
newList() { bool done = false; bool ok = false; QString name; while (!done) { name = QInputDialog::getText(this, tr("New List"), tr("Enter the name of the new list:"), QLineEdit::Normal, "", &ok); if (!ok) { done = true; } else if (ui_.cb_lists->findText(name) != -1) { QMessageBox::critical(this, tr("...
false
false
false
false
false
0
print_system_equation (const int *list, const DATASET *dset, PRN *prn) { int i, v; pputs(prn, "equation"); for (i=1; i<=list[0]; i++) { v = list[i]; if (v == LISTSEP) { pputs(prn, " ;"); } else if (v > 0 && v < dset->v) { pprintf(prn, " %s", dset->varname[v]); } else { pprintf...
false
false
false
false
false
0
readinframes_as_double(char *movieFile,double *stimuli, unsigned long Ntrials,int dimx, int dimy, int x0, int y0, int Nh, int Nv, int cx, int cy) { int nmax,i,j,Ntcurrent=0; unsigned long k; int fsize=(int)((Nv*Nh)/(cx*cy)); double sum; void erroropen(char *); double *b; double *tstpatch; tstpatch=dv...
false
false
false
false
false
0
utf32_strcmp(const uint32 *s1, const uint32 *s2) { uint32 uc; g_assert(NULL != s1); g_assert(NULL != s2); while (0x0000 != (uc = *s1++) && *s2 == uc) s2++; return uc - *s2; }
false
false
false
false
false
0
piezoInit() { if (isInit) return; //Init structures GPIO_InitTypeDef GPIO_InitStructure; TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure; TIM_OCInitTypeDef TIM_OCInitStructure; //Clock the gpio and the timers RCC_AHB1PeriphClockCmd(PIEZO_GPIO_POS_PERIF | PIEZO_GPIO_NEG_PERIF, ENABLE); RCC_APB1Peri...
false
false
false
false
false
0
run_inner(server_ty *sp, string_ty *) const { string_list_ty wl; get_list(wl); server_response_queue(sp, new response_valid_requests(&wl)); server_ok(sp); }
false
false
false
false
false
0
h261_loop_filter_c(uint8_t *src, int stride){ int x,y,xy,yz; int temp[64]; for(x=0; x<8; x++){ temp[x ] = 4*src[x ]; temp[x + 7*8] = 4*src[x + 7*stride]; } for(y=1; y<7; y++){ for(x=0; x<8; x++){ xy = y * stride + x; yz = y * 8 + x; ...
false
false
false
false
false
0
gv_graph_state(GVJ_t *job, graph_t *g) { int j; Agsym_t *a; gv_argvlist_t *list; list = &(job->selected_obj_type_name); j = 0; if (g == agroot(g)) { if (agisdirected(g)) gv_argvlist_set_item(list, j++, s_digraph); else gv_argvlist_set_item(list, j++, s_graph); } ...
false
false
false
false
false
0
Prediction(const TwoDArray < ValueType > & dcdata, const TwoDArray < PredMode > & preddata) const { std::vector < int > nbrs; PredMode pmode; ValueType result = 0; if (m_b_xp > 0 && m_b_yp > 0) { pmode = preddata[m_b_yp-1][m_b_xp]; if (pmo...
false
false
false
false
false
0
parse_udp (packetinfo *pi) { update_asset(pi); //if (is_set_guess_upd_direction(config)) { udp_guess_direction(pi); // fix DNS server transfers? // Check for Passive DNS static char ip_addr_s[INET6_ADDRSTRLEN]; u_ntop_src(pi, ip_addr_s); if ( ntohs(pi->s_port) == 53 ) { // For now - ...
false
false
false
false
false
0
require_size(PyArrayObject* ary, npy_intp* size, int n) { int i; int success = 1; int len; char desired_dims[255] = "["; char s[255]; char actual_dims[255] = "["; for(i=0; i < n;i++) { if (size[i] != -1 && size[i] != array_size(ary,i)) { success = 0; } } if (!success) { for (i =...
false
false
false
false
false
0
S_gen_constant_list(pTHX_ OP *o) { dVAR; OP *curop; const I32 oldtmps_floor = PL_tmps_floor; list(o); if (PL_parser && PL_parser->error_count) return o; /* Don't attempt to run with errors */ PL_op = curop = LINKLIST(o); o->op_next = 0; CALL_PEEP(curop); Perl_pp_pushmark(aTHX); ...
false
false
false
false
false
0
qd_get(struct gfs2_sbd *sdp, struct kqid qid, struct gfs2_quota_data **qdp) { struct gfs2_quota_data *qd, *new_qd; unsigned int hash = gfs2_qd_hash(sdp, qid); rcu_read_lock(); *qdp = qd = gfs2_qd_search_bucket(hash, sdp, qid); rcu_read_unlock(); if (qd) return 0; new_qd = qd_alloc(hash, sdp, qid); if (...
false
false
false
false
false
0
GetKeyCount(string SectionName) { map< string, map<string,string> >::iterator it; it = stConfigDataTable.find(SectionName); if (it == stConfigDataTable.end()) { return -1; } map<string,string> tmpMap = it->second; return tmpMap.size(); }
false
false
false
false
false
0
dump(int i) { indent(i); printf("%p %s func=%s type=%s e1=%p\n", this, Token::toChars(op), func->toChars(), type_print(type), e1); if (e1) e1->dump(i + 2); }
false
false
false
false
false
0
consume_until_comma_or_semi (bool immediate) { if (immediate && token () != ',' && token () != ';') require2 (',', ';'); for (;;) switch (token ()) { case ',': advance (); return true; case ';': advance (); return false; default: advance (); break; case '(': consume_balanced (...
false
false
false
false
false
0
cond_alloc(void) { cond *c; if (cond_free_list) { c = cond_free_list; cond_free_list = c->next; } else c = (cond *)mem_alloc(sizeof(cond)); return c; }
false
false
false
false
false
0
get_pvc(int itf,int *vci) { struct sockaddr_atmpvc addr; struct atm_qos qos; int s,error; if ((s = socket(PF_ATMPVC,SOCK_DGRAM,0)) < 0) diag(COMPONENT,DIAG_FATAL,"get_pvc: %s",strerror(errno)); memset(&qos,0,sizeof(qos)); qos.aal = ATM_AAL5; qos.rxtp.traffic_class = qos.txtp.traffic...
false
false
false
false
false
0
WriteAppendedPiece(int index, vtkIndent indent) { // Write the point data and cell data arrays. vtkDataSet* input = this->GetInputAsDataSet(); this->WritePointDataAppended(input->GetPointData(), indent, &this->PointDataOM->GetPiece(index)); if (this->Erro...
false
false
false
false
false
0
hostlist_resize(hostlist_t hl, size_t newsize) { int i; size_t oldsize; assert(hl != NULL); assert(hl->magic == HOSTLIST_MAGIC); oldsize = hl->size; hl->size = newsize; hl->hr = realloc((void *) hl->hr, hl->size*sizeof(hostrange_t)); if (!(hl->hr)) return 0; for (i = oldsiz...
false
false
false
false
false
0
gst_flups_demux_reset_psm (GstFluPSDemux * demux) { gint i; #define FILL_TYPE(start, stop, type) \ for (i=start; i <= stop; i++) \ demux->psm[i] = type; FILL_TYPE (0x00, 0x1f, -1); FILL_TYPE (0x20, 0x3f, ST_PS_DVD_SUBPICTURE); FILL_TYPE (0x40, 0x7f, -1); FILL_TYPE (0x80, 0x87, ST_PS_AUDIO_AC3); FI...
false
false
false
false
false
0
hashFindPointer(hash_ *h, char *key, void ***record) { record_ *recs; unsigned int off, ind, size; unsigned int code; ReturnErrIf(h == NULL); ReturnErrIf(key == NULL); ReturnErrIf(record == NULL); code = strhash(key); recs = h->records; size = sizes[h->size_index]; ind = code % size; ...
false
false
false
false
false
0
ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel) { u16 reg; if (channel & AD_CHAN_WAV) { /* Disable wave channel */ reg = ad1889_readw(chip, AD_DS_WSMC) & ~AD_DS_WSMC_WAEN; ad1889_writew(chip, AD_DS_WSMC, reg); chip->wave.reg = reg; /* disable IRQs */ reg = ad1889_readw(chip, AD_DM...
false
false
false
false
false
0
_e2_pane_focus_action (gpointer from, E2_ActionRuntime *art) { E2_PaneRuntime *rt = (E2_PaneRuntime *)art->action->data; if (rt != NULL && rt != curr_pane) { e2_pane_activate_other (); return TRUE; } else if (rt == NULL) { gtk_widget_grab_focus (curr_view->treeview); return TRUE; } return FALSE; }
false
false
false
false
false
0
dim_vector_set_one(Dim_vector *p, int *nested_id, int nest, void *body) { int i, n = 0; for (i = 0; i < nest; i++) { #if 0 assert(nested_id[i] < size[i]); #endif n += nested_id[i] * p->stride[i]; } p->dim_vec[n] = body; }
false
false
false
false
false
0
e_gdbus_async_call_opid_ready_cb (GObject *source_proxy, GAsyncResult *result, gpointer user_data) { GVariant *_result; GError *error = NULL; AsyncOpData *op_data = user_data; _result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_proxy), result...
false
false
false
false
false
0
thex_download_free(struct thex_download **ptr) { struct thex_download *ctx = *ptr; if (ctx) { if (ctx->rx) { rx_free(ctx->rx); ctx->rx = NULL; } HFREE_NULL(ctx->data); G_FREE_NULL(ctx->leaves); atom_sha1_free_null(&ctx->sha1); atom_tth_free_null(&ctx->tth); WFREE(ctx); *ptr = NULL; } }
false
false
false
false
false
0
installCValueSymbols() { cValueSymbols_[0] = makeFalse(); cValueSymbols_[1] = makeTrue(); for (size_t i = 2; i < FOTBuilder::nSymbols; i++) { SymbolObj *sym = makeSymbol(makeStringC(FOTBuilder::symbolName(FOTBuilder::Symbol(i)))); sym->setCValue(FOTBuilder::Symbol(i)); cValueSymbols_[i] = sym; } }
false
false
false
false
false
0
parse_mteTriggerTable(const char *token, char *line) { char owner[MTE_STR1_LEN+1]; char tname[MTE_STR1_LEN+1]; void *vp; size_t len; struct mteTrigger *entry; DEBUGMSGTL(("disman:event:conf", "Parsing previous mteTriggerTable config... ")); /* * Read in the index information for...
false
false
false
false
false
0
USB_ReqGetStatus (void) { uint32_t n, m; uint16_t* ep0 = (uint16_t __attribute__((packed)) *)EP0Buf; switch (SetupPacket.bmRequestType.BM.Recipient) { case REQUEST_TO_DEVICE: EP0Data.pData = (uint8_t *)&USB_DeviceStatus; break; case REQUEST_TO_INTERFACE: if ((USB_Configuration != 0) && ...
false
false
false
false
false
0
simple_object_coff_find_sections (simple_object_read *sobj, int (*pfn) (void *, const char *, off_t offset, off_t length), void *data, int *err) { struct simple_object_coff_read *ocr = (struct simple_object_coff_read *) sobj->data; size_t scnhdr_size; unsigned char *scnbuf; cons...
false
false
false
false
false
0
latex_post_processor_push_file_on_stack (LatexPostProcessor* self, const gchar* filename, gboolean reliable) { LatexPostProcessorFileInStack file = {0}; gboolean _tmp0_ = FALSE; gchar* clean_filename = NULL; gchar* bad_suffix = NULL; gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; ...
false
false
false
false
false
0
operator==(const Dictionary::Id & rhs, const Dictionary::Id & lhs) { if (rhs.ptr == 0 || lhs.ptr == 0) { if (rhs.file_name == 0 || lhs.file_name == 0) return false; #ifdef USE_FILE_INO return rhs.ino == lhs.ino && rhs.dev == lhs.dev; #else return strcmp(rhs.file_name, lhs.file_name) == 0; #endi...
false
false
false
false
false
0
save_quetzal(zterp_io *savefile, int is_meta) { if(setjmp(exception) != 0) return 0; size_t local_written = 0; size_t game_len; uint32_t memsize; uint8_t *compressed; uint8_t *mem = memory; long stks_pos; size_t stack_size; WRITEID("FORM"); WRITEID(" "); /* to be filled in */ WRITEID(is_meta ...
false
false
false
false
true
1
cxd2820r_get_frontend_t2(struct dvb_frontend *fe) { struct cxd2820r_priv *priv = fe->demodulator_priv; struct dtv_frontend_properties *c = &fe->dtv_property_cache; int ret; u8 buf[2]; ret = cxd2820r_rd_regs(priv, 0x0205c, buf, 2); if (ret) goto error; switch ((buf[0] >> 0) & 0x07) { case 0: c->transmissio...
false
false
false
false
false
0
ho_objlist_new () { ho_objlist *new_hocr_object_list; /* allocate memory for struct */ new_hocr_object_list = (ho_objlist *) malloc (sizeof (ho_objlist)); /* check for new memory */ if (!new_hocr_object_list) return NULL; /* init struct values */ new_hocr_object_list->size = 0; new_hocr_object_li...
false
true
false
false
false
1
sfx_derivespecialcodesonthefly(Sfxiterator *sfi) { GtCodetype code; unsigned int prefixindex; unsigned long stidx; Enumcodeatposition *ecp; Specialcontext specialcontext; for (prefixindex=1U; prefixindex < sfi->prefixlength; prefixindex++) { ecp = gt_Enumcodeatposition_new(sfi->encseq,sfi->readmode, ...
false
false
false
false
false
0
free_undo (int count) { undo_t *p; if (count > undo_count) count = undo_count; while (count--) { p = first_undo; if (curr_undo == first_undo) curr_undo = curr_undo->next; first_undo = first_undo->next; free (p); undo_count--; } if (first_undo) first_undo->prev = NULL; else last_undo = NULL; }
false
false
false
false
false
0
json_array_deep_copy(json_t *array) { json_t *result; unsigned int i; result = json_array(); if(!result) return NULL; for(i = 0; i < json_array_size(array); i++) json_array_append_new(result, json_deep_copy(json_array_get(array, i))); return result; }
false
false
false
false
false
0
hmm_add_pseudo_phones(HTK_HMM_INFO *hmminfo) { HMM_Logical *lg; char buf[MAX_HMMNAME_LEN]; boolean ok_p = TRUE; hmminfo->totalpseudonum = 0; /* add pseudo monophone */ for (lg = hmminfo->lgstart; lg; lg = lg->next) { if (lg->is_pseudo) continue; if (hmm_add_pseudo_phones_sub(hmminfo, center_name(lg...
false
false
false
false
false
0
_e_xsettings_start(void) { Eina_List *l; E_Manager *man; if (running) return; _e_xsettings_theme_set(); _e_xsettings_icon_theme_set(); _e_xsettings_font_set(); _e_xsettings_cursor_path_set(); EINA_LIST_FOREACH(e_manager_list(), l, man) { Settings_Manager *sm = E_NEW(Settings_Mana...
false
false
false
false
false
0
installDerivations(Globals & globals, const Strings & args, const Path & profile) { debug(format("installing derivations")); /* Get the set of user environment elements to be installed. */ DrvInfos newElems; queryInstSources(globals.state, globals.instSource, args, newElems, true); StringSet n...
false
false
false
false
false
0
libgnac_metadata_process_video_info(LibgnacMetadata *md) { GList *video_info = gst_discoverer_info_get_video_streams(md->priv->info); if (!video_info) return; libgnac_metadata_add_boolean_value(md, GNAC_TAG_HAS_VIDEO, TRUE); GList *first = g_list_first(video_info); GstDiscovererVideoInfo *video = (GstDiscov...
false
false
false
false
false
0
DoneWithGetTemplatePtrs() { WriterMutexLock ml(mutex_); for (TemplateCallMap::iterator it = get_template_calls_->begin(); it != get_template_calls_->end(); ++it) { it->first->DecRefN(it->second); // it.second: # of times GetTpl was called } get_template_calls_->clear(); }
false
false
false
false
false
0
cob_move_all (cob_field *src, cob_field *dst) { size_t i; size_t digcount; cob_field temp; cob_field_attr attr; COB_ATTR_INIT (COB_TYPE_ALPHANUMERIC, 0, 0, 0, NULL); if (COB_FIELD_IS_NUMERIC(dst)) { digcount = 18; attr.type = COB_TYPE_NUMERIC_DISPLAY; attr.digits = 18; /* if (COB_FIELD_TYPE(dst) & ...
false
false
false
false
false
0
changed_cb(struct btrfs_root *left_root, struct btrfs_root *right_root, struct btrfs_path *left_path, struct btrfs_path *right_path, struct btrfs_key *key, enum btrfs_compare_tree_result result, void *ctx) { int ret = 0; struct send_ctx *sctx = ctx; if (result == BTRF...
false
false
false
false
false
0
drawexplosions(void) { int i, any; /* We'll say if there are any more or not: */ any = 0; for (i = 0; i < NUM_EXPLOSIONS; i++) { if (explosions[i].exist == YES) { /* (There are some!) */ any = 1; /* There's an animation slow-down... */ explosions[i].animrate...
false
false
false
false
false
0
from_string( const char *pv) { int h = -1; channel = h; char p[21], v[81]; // make it 20 if ( 3 == sscanf( pv, "%u:%20[a-z_]:%80s", &h, p, v) && h != -1 ) { channel = h - 1; ...
false
false
false
false
false
0
search_points_to_pointer_type(Type_table *org_type, Type_table *new_pointed_type) { Type_table *tpt; for (tpt = type_head; tpt != NULL; tpt = tpt->next) { if (tpt->type == TYPE_PTR && tpt->val.ptr.ref_type == new_pointed_type->type && tpt->val.ptr.t...
false
false
false
false
false
0
IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2) { int value2 = op2->i; exp->type = 2; exp->string = PrintInt(op1->i |= value2); if(!exp->expType) { exp->expType = op1->type; if(op1->type) op1->type->refCount++; } return 0x1; }
false
false
false
false
false
0
mm_TLSSock_check_cert_alive(PyObject *self, PyObject *args, PyObject *kwargs) { /* ???? Should be threadified? */ time_t now; X509 *cert = NULL; SSL *ssl = NULL; assert(mm_TLSSock_Check(self)); FAIL_IF_ARGS(); ssl = ((mm_TLSSock*)self)->ssl; if (!(cert =...
false
false
false
false
false
0
keyboard_rebind(void) { KeyBindingTree *old; old = keyboard_firstnode; keyboard_firstnode = NULL; if (old) node_rebind(old); tree_destroy(old); set_curpos(NULL); grab_keys(TRUE); }
false
false
false
false
false
0
int104_div_uint (Int104 *x, guint y) { guint carry, tmp, i; carry = 0; for ( i = 0; i < 13; i++ ) { tmp = x->byte[i] + (carry<<8); x->byte[i] = tmp / y; carry = tmp % y; } return carry; }
false
false
false
false
false
0