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
getAuthenticatedPortionLength() { if(!buf_) { return 0; } if(!auth_tag_) { return length_; } return (length_ > auth_tag_length_) ? (length_ - auth_tag_length_) : 0; }
false
false
false
false
false
0
gui_defect_build(void) { struct model_pak *model; /* checks and setup */ model = sysenv.active_model; if (!model) return; if (model->periodic != 3) return; /* TODO - if the building is long - run in background */ defect_new(&defect, model); }
false
false
false
false
false
0
setMaxLength(u_int len) { if (slength>1) resizeInternal(fxmax(len,slength-1)); }
false
false
false
false
false
0
spline_solve(Spline *spline, gfloat y2[]) { gfloat p, sig, *u; gint i, k; u = g_malloc ((spline->num_points - 1) * sizeof (u[0])); y2[0] = u[0] = 0.0; /* set lower boundary condition to "natural" */ for (i = 1; i < spline->num_points - 1; ++i) { sig = ((spline->points[i][0] - spline->points[i - 1...
false
false
false
false
false
0
dconf_blame_enabled (void) { gint fd; if (getenv ("DCONF_BLAME")) return TRUE; fd = open ("/proc/cmdline", O_RDONLY); if (fd != -1) { gchar buffer[1024]; gssize s; s = read (fd, buffer, sizeof buffer - 1); close (fd); if (0 < s && s < sizeof buffer) { ...
false
false
false
false
false
0
G_CH_destroy_int(GSource* source) { GCHSource* chp = (GCHSource*)source; g_assert(IS_CHSOURCE(chp)); if (debug_level > 1) { cl_log(LOG_DEBUG, "%s(chp=0x%lx, sock=%d) {", __FUNCTION__ , (unsigned long)chp, chp->infd.fd); } if (chp->dnotify) { if (debug_level > 1) { cl_log(LOG_DEBUG , "%s: Calling dn...
false
false
false
false
false
0
xml_showmatchline(GthSA *sa, unsigned int indentlevel, GtFile *outfp) { gth_indent(outfp, indentlevel); gt_file_xprintf(outfp, "<MATCH_line gen_id=\"%s\" gen_strand=\"%c\" ", gth_sa_gen_id(sa), gth_sa_gen_strand_char(sa)); if (gth_sa_alphatyp...
false
false
false
false
false
0
main (int argc, char **argv) { int do_config = 0, do_default = 0; FcChar8 *format = NULL; int i; FcObjectSet *os = 0; FcPattern *pat; #if HAVE_GETOPT_LONG || HAVE_GETOPT int c; #if HAVE_GETOPT_LONG while ((c = getopt_long (argc, argv, "cdf:Vh", longopts, NULL)) != -1) #else whi...
false
true
false
false
true
1
ScanEventsAtThisTime() { // save the current iterator state MIDIMultiTrackIteratorState istate ( state.iterator.GetState() ); int prev_measure = state.cur_measure; int prev_beat = state.cur_beat; // process all messages up to and including this time only MIDIClockTime orig_clock = state.cur_cloc...
false
false
false
false
false
0
ps_cmyk_encode (PSL_LONG *nbytes, unsigned char *input) { /* Recode RGB stream as CMYK stream */ PSL_LONG in, out, nout; unsigned char *output; nout = *nbytes / 3 * 4; output = (unsigned char *)ps_memory (VNULL, (size_t)nout, sizeof (unsigned char)); for (in = out = 0; in < *nbytes; out += 4, in += 3) ps_rgb_t...
false
false
false
false
false
0
dirtyDiskEntry(ObjectPtr object) { DiskCacheEntryPtr entry = object->disk_entry; if(entry && entry != &negativeEntry) entry->metadataDirty = 1; }
false
false
false
false
false
0
addRide(QString name, bool dosignal) { QDateTime dt; if (!parseRideFileName(name, &dt)) { fprintf(stderr, "bad name: %s\n", name.toAscii().constData()); assert(false); } RideItem *last = new RideItem(RIDE_TYPE, home.path(), name, dt, zones(), hrZones(), this); int index = 0; whi...
false
false
false
false
false
0
is_including_test_name (const gchar *function_name, SymbolNames *names) { gboolean included = FALSE; GString *suffix; gchar *base_name; if (names->cpp) { const gchar *target_namespace_end; GString *target_namespace; GString *test_namespace; guint64 function_name_length; ...
false
false
false
false
false
0
store_host_reset(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct Scsi_Host *shost = class_to_shost(dev); struct scsi_host_template *sht = shost->hostt; int ret = -EINVAL; int type; type = check_reset_type(buf); if (!type) goto exit_store_host_reset; if (sht->host_...
false
false
false
false
false
0
hdpvr_stop_streaming(struct hdpvr_device *dev) { int actual_length; uint c = 0; u8 *buf; if (dev->status == STATUS_IDLE) return 0; else if (dev->status != STATUS_STREAMING) return -EAGAIN; buf = kmalloc(dev->bulk_in_size, GFP_KERNEL); if (!buf) v4l2_err(&dev->v4l2_dev, "failed to allocate temporary buffe...
false
false
false
false
false
0
vlv_display_power_well_init(struct drm_i915_private *dev_priv) { enum pipe pipe; /* * Enable the CRI clock source so we can get at the * display and the reference clock for VGA * hotplug / manual detection. Supposedly DSI also * needs the ref clock up and running. * * CHV DPLL B/C have some issues if VGA...
false
false
false
false
false
0
CompareLinCtStereoCarb ( AT_STEREO_CARB *LinearCTStereoCarb1, int nLenLinearCTStereoCarb1, AT_STEREO_CARB *LinearCTStereoCarb2, int nLenLinearCTStereoCarb2 ) { int i, num, ret = 0; /* compare stereocenters */ if ( LinearCTStereoCarb1 && LinearCTStereoCarb2 ) { num = inc...
false
false
false
false
false
0
tree_full_name(tree_t* tree) { char* res; if (tree->parent) { char* p = tree_full_name(tree->parent); res = g_strdup_printf("%s/%s", p, tree->name); g_free(p); } else { res = g_strdup(tree->name); } return res; }
false
false
false
false
false
0
ellipseRect() { // This returns the ellipse rectangle, but centred on the origin // and not rotated. The rotation and translation are done with // painter->translate() and painter->rotate(). QRectF rect; QPointF c; double rx, ry; if (isSet(RadiusX) && isSet(RadiusY)) { rx = getQtLength(RadiusX); ry = get...
false
false
false
false
false
0
get_pois() { char sql[256]; char *db; bbox_t bbox; printf("*** %s(): \n",__PRETTY_FUNCTION__); bbox = get_bbox_deg(); db = g_strconcat(foxtrotgps_dir, "/", POI_DB, NULL); if(poi_list) g_slist_free(poi_list); poi_list = NULL; if(global_poi_cat==0) { g_snprintf(sql, 256, "SELECT * FROM poi ...
true
true
false
false
false
1
grabWord(char **pp, char *buf, int buflen) { char *p, *q; int len; skipWS(pp); p= *pp; if (!*p) return 0; q= p; if (*q == ',' || *q == ';' || *q == ')' || *q == ']' || *q == '}') { q++; } else { while (*q && *q != '#' && !isspace(*q) && (*q != ',' && *q != ';' && *q != ')' &&...
false
true
false
false
false
1
lto_ft_decl_non_common (tree t) { lto_ft_decl_with_vis (t); LTO_FIXUP_TREE (DECL_ARGUMENT_FLD (t)); LTO_FIXUP_TREE (DECL_RESULT_FLD (t)); LTO_FIXUP_TREE (DECL_VINDEX (t)); /* The C frontends may create exact duplicates for DECL_ORIGINAL_TYPE like for 'typedef enum foo foo'. We have no way of avoiding to...
false
false
false
false
false
0
initProc() { // Find pointer to H+-. HResPtr = particleDataPtr->particleDataEntryPtr(37); // Store H+- mass and width for propagator. mRes = HResPtr->m0(); GammaRes = HResPtr->mWidth(); m2Res = mRes*mRes; GamMRat = GammaRes / mRes; // Couplings. m2W = pow2(particleDataPtr->m0(24)...
false
false
false
false
false
0
rdset_port_mipd(FILE *f, struct itree_t *itp, struct mod_t *ctmdp, char *formnam) { register int32 ii; int32 sav_lcnt, lcnt, si1, si2, ndels, none_set; struct itree_t *itp2; char qualport[IDLEN]; get_sdftok(f); lcnt = __lin_cnt; /* this can and usually will be qualified name */ if (!rd_port(f, qualport, &si1,...
true
true
false
false
false
1
nxp_nci_fw_work(struct work_struct *work) { struct nxp_nci_info *info; struct nxp_nci_fw_info *fw_info; int r; fw_info = container_of(work, struct nxp_nci_fw_info, work); info = container_of(fw_info, struct nxp_nci_info, fw_info); mutex_lock(&info->info_lock); r = fw_info->cmd_result; if (r < 0) goto exit_...
false
false
false
false
false
0
update_clock(void) { struct tm *ptm; static gint min_prev, hour_prev = -1, sec_prev = -1; ChimeData *chime; gboolean hour_tick; if (_GK.client_mode) { ptm = gkrellm_client_server_time(); if (sec_prev == ptm->tm_sec) return; sec_prev = ptm->tm_sec; } else { if (!GK.second_tick) return; ...
false
false
false
false
false
0
main(int argc, char *argv[]) { off_t off; int fd; char buf[1024]; char buf2[1024]; ssize_t act; char *p; sprintf(buf, "/proc/%d/mem", getpid()); fd= open(buf, O_RDWR|O_LARGEFILE); if (fd < 0) { perror("open()"); exit(1); } sprintf(buf, "Hi, I am process %d", getpid()); printf("Origina...
false
false
false
false
false
0
gst_base_transform_set_passthrough (GstBaseTransform * trans, gboolean passthrough) { GstBaseTransformClass *bclass; g_return_if_fail (GST_IS_BASE_TRANSFORM (trans)); bclass = GST_BASE_TRANSFORM_GET_CLASS (trans); GST_OBJECT_LOCK (trans); if (passthrough == FALSE) { if (bclass->transform_ip || bcla...
false
false
false
true
false
1
parse_chunk(char *buffer, unsigned long size, struct patch *patch) { int hdrsize, patchsize; int offset = find_header(buffer, size, &hdrsize, patch); if (offset < 0) return offset; patchsize = parse_single_patch(buffer + offset + hdrsize, size - offset - hdrsize, patch); if (!patchsize) { static const char ...
false
false
false
false
false
0
WalkTableTree(RefAST ast) { Assert(ast->getType() == LITERAL_table); RefAST astTableType = ast->getFirstChild(); Assert(astTableType); int nodetyp = astTableType->getType(); switch (nodetyp) { case LITERAL_glyph: WalkGlyphTableTree(ast); break; case LITERAL_feature: WalkFeatureTableTree(ast); break; ...
false
false
false
false
false
0
store_defs(LEX *lc, RES_ITEM *item, int index, int pass) { RES *res; lex_get_token(lc, T_NAME); if (pass == 2) { Dmsg2(900, "Code=%d name=%s\n", item->code, lc->str); res = GetResWithName(item->code, lc->str); if (res == NULL) { scan_err3(lc, _("Missing config Resource \"%s\" referenced...
false
false
false
false
false
0
g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer user_data) { if (web == NULL) return; web->debug_func = func; web->debug_data = user_data; g_resolv_set_debug(web->resolv, func, user_data); }
false
false
false
false
false
0
timeout (void) { gdk_threads_enter(); if (!GTK_IS_IMAGE(_image)) { gdk_threads_leave(); _timetag = 0; return false; } _current = (_current+1)%_frame.size(); if (_frame.size()) gtk_image_set_from_pixbuf (_image, _frame[_current]); gdk_threads_leave(); return true; }
false
false
false
false
false
0
insert_coalesced_conflicts (void) { struct dlist *d; for (d = WEBS(COALESCED); 0 && d; d = d->next) { struct web *web = DLIST_WEB (d); struct web *aweb = alias (web); struct conflict_link *wl; for (wl = web->conflict_list; wl; wl = wl->next) { struct web *tweb = aweb; int i; in...
false
false
false
false
false
0
mxml_string_putc(int ch, /* I - Character to write */ void *p) /* I - Pointer to string pointers */ { char **pp; /* Pointer to string pointers */ pp = (char **)p; if (ch < 0x80) { /* * Plain ASCII doesn't need special encoding... */ if (pp[0] < pp[1]) pp[0][0] = c...
false
false
false
false
false
0
city_dialog_update_present_units(struct city_dialog *pdialog) { struct unit_list *units; struct unit_node_vector *nodes; int n, m, i; char buf[30]; if (NULL != client.conn.playing && city_owner(pdialog->pcity) != client.conn.playing) { units = pdialog->pcity->client.info_units_present; } else { ...
true
true
false
false
false
1
getExact(BasicBlock *ExitingBlock, ScalarEvolution *SE) const { for (const ExitNotTakenInfo *ENT = &ExitNotTaken; ENT != 0; ENT = ENT->getNextExit()) { if (ENT->ExitingBlock == ExitingBlock) return ENT->ExactNotTaken; } return SE->getCouldNotCompute()...
false
false
false
false
false
0
elm_map_source_set(Evas_Object *obj, Elm_Map_Source_Type type, const char *source_name) { #ifdef HAVE_ELEMENTARY_ECORE_CON ELM_MAP_CHECK(obj); ELM_MAP_DATA_GET(obj, sd); EINA_SAFETY_ON_NULL_RETURN(source_name); if (type == ELM_MAP_SOURCE_TYPE_TILE) _source_tile_set(sd,...
true
true
false
false
true
1
command_register_undo (WorkbookControl *wbc, GObject *obj) { Workbook *wb; GnmCommand *cmd; int undo_trunc; g_return_if_fail (wbc != NULL); wb = wb_control_get_workbook (wbc); cmd = GNM_COMMAND (obj); g_return_if_fail (cmd != NULL); command_list_release (wb->redo_commands); wb->redo_commands = NULL; g_obj...
false
false
false
false
false
0
search(const int *tab[], int v, int geta) { int page = v / PAGE_SIZE; int off = v % PAGE_SIZE; const int *t; if (page >= NR_PAGES) { return geta; } t = tab[page]; if (!t) { return geta; } if (!t[off] && v) { return geta; } return t[off]; }
false
false
false
false
false
0
put_compat_semid_ds(struct semid64_ds *s, struct compat_semid_ds __user *up) { int err; if (!access_ok(VERIFY_WRITE, up, sizeof(*up))) return -EFAULT; err = __put_compat_ipc_perm(&s->sem_perm, &up->sem_perm); err |= __put_user(s->sem_otime, &up->sem_otime); err |= __put_user(s->sem_ctime, &up->sem_ct...
false
false
false
false
false
0
mwave_exit(void) { pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n"); #if 0 for (i = 0; i < pDrvData->nr_registered_attrs; i++) device_remove_file(&mwave_device, mwave_dev_attrs[i]); pDrvData->nr_registered_attrs = 0; if (pDrvData->device_registered) { device_u...
false
false
false
false
false
0
brasero_data_tree_model_node_removed (BraseroDataProject *project, BraseroFileNode *former_parent, guint former_position, BraseroFileNode *node) { /* see if we really need to tell the treeview we changed */ if (node->is_hidden) goto end; if (!node->is_visible && former_parent && ...
false
false
false
false
false
0
maybe_extract_fresh_latin1_string(s48_call_t call, s48_ref_t sch_str, size_t size) { char *result; if (s48_string_length_2(call, sch_str) > (size - 1)) return NULL; result = malloc(size); if (result == NULL) s48_out_of_memory_error_2(call); s48_copy_string_to_latin_1_2(call, sch_str, result); re...
false
false
false
false
false
0
targa_read_pixel( int num_pixels, ubyte **dst, ubyte **src, int bytes_per_pixel, int dest_size ) { int idx; ushort pixel; int pixel32; ubyte pal_index; ubyte r, g, b; ubyte al = 0; for(idx=0; idx<num_pixels; idx++){ // 24 or 32 bit if ( (bytes_per_pixel == 3) || (bytes_per_pixel == 4) ) { memset( &pixel3...
false
false
false
false
false
0
ssa_insert_chg_bb(struct compilation_unit *cu, struct basic_block *pred_bb, struct basic_block *bb, unsigned int bc_offset) { struct basic_block *new_bb; new_bb = alloc_basic_block(cu, bc_offset, bc_offset); if (!new_bb) return NULL; ssa_bb_move(bb, new_bb); bb->end = bb->start; list_add(&new_bb->bb_l...
false
false
false
false
false
0
advection_run (GfsSimulation * sim) { GfsDomain * domain = GFS_DOMAIN (sim); gboolean streamfunction = FALSE; #if FTT_2D GSList * i = domain->variables; while (i && !streamfunction) { streamfunction = (GFS_IS_VARIABLE_STREAM_FUNCTION (i->data) != NULL); i = i->next; } #endif /* 2D */ gfs_simulatio...
false
false
false
false
false
0
hangul_composition(const uint32_t *in, size_t in_len) { if (in_len < 2) return 0; if (in[0] >= l_base && in[0] < l_base + l_count) { unsigned l_index = in[0] - l_base; unsigned v_index; if (in[1] < v_base || in[1] >= v_base + v_count) return 0; v_index = in[1] - v_base; return (l_index * v_count + v...
false
false
false
false
false
0
argv_from_env(const char **argv, const char *name) { char *env = argv ? getenv(name) : NULL; int argc = 0; if (env && *env) env = strdup(env); return !env || argv_from_string(argv, &argc, env); }
false
false
false
false
false
0
_rl_vi_set_mark () { int ch; RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (ch < 'a' || ch > 'z') { rl_ding (); return -1; } ch -= 'a'; vi_mark_chars[ch] = rl_point; return 0; }
false
false
false
false
false
0
update_interrupts(void) { m6840_status &= ~0x80; if ((m6840_status & 0x01) && (m6840_state[0].control & 0x40)) m6840_status |= 0x80; if ((m6840_status & 0x02) && (m6840_state[1].control & 0x40)) m6840_status |= 0x80; if ((m6840_status & 0x04) && (m6840_state[2].control & 0x40)) m6840_status |= 0x80; m684...
false
false
false
false
false
0
devfreq_event_add_edev(struct device *dev, struct devfreq_event_desc *desc) { struct devfreq_event_dev *edev; static atomic_t event_no = ATOMIC_INIT(0); int ret; if (!dev || !desc) return ERR_PTR(-EINVAL); if (!desc->name || !desc->ops) return ERR_PTR(-EINVAL); if (!desc->ops->set_event || !desc->ops...
false
false
false
false
false
0
abi_widget_get_zoom_percentage (AbiWidget * w) { UT_return_val_if_fail ( w != NULL, FALSE ); UT_return_val_if_fail ( IS_ABI_WIDGET(w), FALSE ); UT_return_val_if_fail ( w->priv->m_pFrame, FALSE ); return w->priv->m_pFrame->getZoomPercentage(); }
false
false
false
false
false
0
OnAttach() { #if defined(TRACE_ENVVARS) Manager::Get()->GetLogManager()->DebugLog(F(_T("OnAttach"))); #endif if (!Manager::LoadResource(_T("envvars.zip"))) NotifyMissingFile(_T("envvars.zip")); // load and apply configuration (to application only) ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("...
false
false
false
false
false
0
addPair(const string &english, const wstring &translated) // Add a string pair to the translation vector. { pair<string, wstring> entry (english, translated); m_translation.push_back(entry); }
false
false
false
false
false
0
_imPreeditChanged_cb (GtkIMContext *context, gpointer data) { gchar *text; gint len = 0; gint pos; XAP_UnixFrameImpl * pImpl = static_cast<XAP_UnixFrameImpl*>(data); XAP_Frame* pFrame = pImpl->getFrame(); FV_View * pView = static_cast<FV_View*>(pFrame->getCurrentView ()); ev_UnixKeyboard * pUni...
false
false
false
false
false
0
fm10k_mbx_write(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx) { u32 mbmem = mbx->mbmem_reg; /* write new msg header to notify recipient of change */ fm10k_write_reg(hw, mbmem, mbx->mbx_hdr); /* write mailbox to send interrupt */ if (mbx->mbx_lock) fm10k_write_reg(hw, mbx->mbx_reg, mbx->mbx_lock); /* we no...
false
false
false
false
false
0
DrawAxes( GRA_wxWidgets *graphicsOutput, wxDC &dc, GRA_cartesianAxes *&axes ) { if( !drawAxes_ )return; std::vector<double> xt, yt; xt.push_back( dataXmin_ ); xt.push_back( dataXmax_ ); xt.push_back( dataXmax_ ); xt.push_back( dataXmin_ ); xt.push_back( dataXmin_ ); yt.pu...
false
false
false
false
false
0
evhttp_connection_set_timeout(struct evhttp_connection *evcon, int timeout_in_secs) { if (timeout_in_secs == -1) evhttp_connection_set_timeout_tv(evcon, NULL); else { struct timeval tv; tv.tv_sec = timeout_in_secs; tv.tv_usec = 0; evhttp_connection_set_timeout_tv(evcon, &tv); } }
false
false
false
false
false
0
Oct6100ApiWriteEncoderMemory( IN tPOCT6100_INSTANCE_API f_pApiInstance, IN UINT32 f_ulEncoderIndex, IN UINT32 f_ulCompType, IN UINT16 f_usTsiMemIndex, IN UINT32 f_ulEnableSilenceSuppression, IN UINT32 f_ulAdpcmNibblePosition, IN UINT16 f_usPhasingTsstI...
false
false
false
false
false
0
wil_mask_irq(struct wil6210_priv *wil) { wil_dbg_irq(wil, "%s()\n", __func__); wil6210_mask_irq_tx(wil); wil6210_mask_irq_rx(wil); wil6210_mask_irq_misc(wil); wil6210_mask_irq_pseudo(wil); }
false
false
false
false
false
0
operator()(const IntegerVector &a, const IntegerVector &b, int scaleA, int scaleB, int perturbationDegree)const //bool WeightReverseLexicographicTermOrder::operator()(const IntegerVector &a, const IntegerVector &b)const { if(perturbationDegree==0)return false; //int d=dot(scaleA*a-scaleB*b,weight); int64 d=(in...
false
false
false
false
false
0
name_perm_vector_add_perm(apol_vector_t * v, const char *name, uint32_t perm) { name_perm_t *np = NULL; size_t i = 0; int retv; np = name_perm_create(name); retv = apol_vector_get_index(v, np, name_perm_comp, NULL, &i); if (retv) { np->perms = perm; apol_vector_append(v, (void *)np); } else { free(np); ...
false
false
false
false
false
0
echoListAdd(echoObject *list, echoObject *child) { int idx; if (!( list && child && (echoTypeList == list->type || echoTypeAABBox == list->type) )) return; idx = airArrayLenIncr(LIST(list)->objArr, 1); LIST(list)->obj[idx] = child; return; }
false
false
false
false
false
0
gretl_matrix_XTX_new (const gretl_matrix *X) { gretl_matrix *XTX = NULL; if (!gretl_is_null_matrix(X)) { XTX = gretl_matrix_alloc(X->cols, X->cols); } if (XTX != NULL) { matrix_multiply_self_transpose(X, 1, XTX, GRETL_MOD_NONE); } return XTX; }
false
false
false
false
false
0
ps_packet_closeread(ps_packet_t *packet) { __PS_PACKET_VARS(packet) int ret; size_t pos; if ((ret = pthread_mutex_lock(&state->read_close_mutex))) return ret; if (state->flags & PS_BUFFER_STATS) { buffer->stats->read_packets++; buffer->stats->read_bytes += header->size; } header->flags |= PS_PACKET_HEAD...
false
false
false
false
false
0
build_completion_wait(struct iommu_cmd *cmd, u64 address) { WARN_ON(address & 0x7ULL); memset(cmd, 0, sizeof(*cmd)); cmd->data[0] = lower_32_bits(__pa(address)) | CMD_COMPL_WAIT_STORE_MASK; cmd->data[1] = upper_32_bits(__pa(address)); cmd->data[2] = 1; CMD_SET_TYPE(cmd, CMD_COMPL_WAIT); }
false
false
false
false
false
0
set_command( Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl ){ if( argc!=2 && argc!=3 ){ return Th_WrongNumArgs(interp, "set varname ?value?"); } if( argc==3 ){ Th_SetVar(interp, argv[1], argl[1], argv[2], argl[2]); } return Th_GetVar(interp, argv[1], argl[1]); }
false
false
false
false
false
0
_e_gadcon_layout_smart_item_del_hook(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) { if (!obj) return; e_gadcon_layout_unpack(obj); }
false
false
false
false
false
0
getkey(boolean waitflag) { byte msg[4]; short k; if (!initialized) fixup(); while (TRUE) { /* process data until you find a note */ /* look for data and exit if none found */ /* NOTE: waitflag will force waiting until data arrives */ if (!getbuf(waitflag, msg)) { /* nothing there */ ...
false
false
false
false
false
0
bkn_knet_filter_destroy(kcom_msg_filter_destroy_t *kmsg, int len) { bkn_switch_info_t *sinfo; bkn_filter_t *filter; struct list_head *list; unsigned long flags; int found; kmsg->hdr.type = KCOM_MSG_TYPE_RSP; sinfo = bkn_sinfo_from_unit(kmsg->hdr.unit); if (sinfo == NULL) { kmsg...
false
false
false
false
false
0
nfs41_sequence_free_slot(struct nfs4_sequence_res *res) { struct nfs4_session *session; struct nfs4_slot_table *tbl; struct nfs4_slot *slot = res->sr_slot; bool send_new_highest_used_slotid = false; tbl = slot->table; session = tbl->session; spin_lock(&tbl->slot_tbl_lock); /* Be nice to the server: try to ens...
false
false
false
false
false
0
rndis_wlan_worker(struct work_struct *work) { struct rndis_wlan_private *priv = container_of(work, struct rndis_wlan_private, work); struct usbnet *usbdev = priv->usbdev; if (test_and_clear_bit(WORK_LINK_UP, &priv->work_pending)) rndis_wlan_do_link_up_work(usbdev); if (test_and_clear_bit(WORK_LINK_DOWN, &priv...
false
false
false
false
false
0
stmt_replace_continue(struct stmt *s, struct label *label) { struct stmt *s1; switch (s->type) { case STMT_NONE: assert(0); case STMT_NULL: break; case STMT_LABEL: case STMT_CASE: case STMT_DEFAULT: stmt_replace_continue(s->stmt0, label); break; case STMT_EXPR: break; case STMT_IF: stmt_replace_co...
false
false
false
false
false
0
gst_base_sink_negotiate_pull (GstBaseSink * basesink) { GstCaps *caps; gboolean result; result = FALSE; /* this returns the intersection between our caps and the peer caps. If there * is no peer, it returns NULL and we can't operate in pull mode so we can * fail the negotiation. */ caps = gst_pad_get_...
false
false
false
false
false
0
MakePtas(l_int32 i, l_int32 npts, /* 3 or 4 */ PTA **pptas, PTA **pptad) { *pptas = ptaCreate(npts); ptaAddPt(*pptas, x1[i], y1[i]); ptaAddPt(*pptas, x2[i], y2[i]); ptaAddPt(*pptas, x3[i], y3[i]); if (npts == 4) ptaAddPt(*pptas, x4[i], y4[i]); *pptad = ptaCre...
false
false
false
false
false
0
qspi_transfer_out_in(struct rspi_data *rspi, struct spi_transfer *xfer) { int ret; qspi_receive_init(rspi); ret = rspi_dma_check_then_transfer(rspi, xfer); if (ret != -EAGAIN) return ret; return qspi_trigger_transfer_out_in(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len); }
false
false
false
false
false
0
__check_and_set (xlator_t *each, void *data) { if (!strcmp (each->name, ((struct __get_xl_struct *) data)->name)) ((struct __get_xl_struct *) data)->reply = each; }
false
false
false
false
false
0
ipv4_recv_packet(IrmoNetSocket *_sock, IrmoNetAddress **address) { SockBaseSocket *sock; struct sockaddr_in source; IPv4Address *result_address; socklen_t source_len; ssize_t status; sock = (SockBaseSocket *) _sock; source_len...
false
false
false
false
false
0
hostlist_shift(hostlist_t hl) { char *host = NULL; if (!hl){ error("hostlist_shift: no hostlist given"); return NULL; } LOCK_HOSTLIST(hl); if (hl->nhosts > 0) { hostrange_t hr = hl->hr[0]; host = hostrange_shift(hr); hl->nhosts--; if (hostrange_empty(hr)) { hostlist_delete_range(hl, 0); /* hl...
false
false
false
false
false
0
my_write(int fd, const void *buffer, size_t cnt) { const char *p=(const char *)buffer; while (cnt > 0) { int n=write(fd, p, cnt); if (n <= 0) return -1; p += n; cnt -= n; } return 0; }
false
false
false
false
false
0
put_xiph_size(ByteIOContext *pb, int size) { int i; for (i = 0; i < size / 255; i++) put_byte(pb, 255); put_byte(pb, size % 255); }
false
false
false
false
false
0
read_config_file(bool init, const char* fname) { if (!init) { msg_printf(NULL, MSG_INFO, "Re-reading %s", fname); config.defaults(); log_flags.init(); } FILE* f = boinc_fopen(fname, "r"); if (!f) { msg_printf(NULL, MSG_INFO, "cc_config.xml not found - using defaults"); ...
false
false
false
false
false
0
DumpIPTables(Field f, int nPoints, ListHead **invTable, SegList **listElements) { InvalidComponentHandle iph = NULL; if (*invTable) { int i; ListElement le; iph = DXCreateInvalidComponentHandle((Object)f, NULL, "positions"); if (! iph) goto error; for (i = 0; i < nPoints; i++) if ((*...
false
false
false
false
false
0
make_space(int generation_index) { Space* space = (Space*)calloc(1, sizeof(Space)); if (space == NULL) { s48_gc_error("make_space: out of memory"); } space->generation_index = generation_index; return space; }
false
false
false
true
false
1
set_option(struct xconfig_option *option, const char *arg) { switch (option->type) { case XCONFIG_BOOL: *(int *)option->dest = 1; break; case XCONFIG_INT: *(int *)option->dest = strtol(arg, NULL, 0); break; case XCONFIG_STRING: *(char **)option->dest = strdup(arg); break; case XCONFIG_STR_LIS...
false
false
false
false
false
0
af_get_aes_key_from_passphrase(AFFILE *af,const char *passphrase, unsigned char affkey[32]) { #if defined(HAVE_AES_ENCRYPT) if(af->crypto->sealing_key_set) return AF_ERROR_KEY_SET; // already enabled /* Get the segment with the key in it. It should be AFFKEY_SIZE * but there are a few images out ...
false
false
false
false
false
0
Vsetname(int32 vkey, /* IN: vgroup key */ const char *vgname /* IN: name to set for vgroup */) { CONSTR(FUNC, "Vsetname"); vginstance_t *v = NULL; VGROUP *vg = NULL; size_t name_len; int32 ret_value = SUCCEED; /* clear error stack */ HEclear(); /* check if ...
false
false
false
false
false
0
copy_page(AFFILE *ain,AFFILE *aout,int64_t pagenum,unsigned long arg,u_char *seghash,u_int *seghash_len) { /* If we are preening but not signing, see if we can get out fast */ if(opt_sign==0 && opt_preen==0) return -1; // not preening and not signing /* If we are not signing, don't bother decompressing and...
false
false
false
false
false
0
tm_symbol_print(TMSymbol *sym, guint level) { guint i; g_return_if_fail (sym != NULL); for (i=0; i < level; ++i) fputc('\t', stderr); fprintf(stderr, "%s\n", (sym->tag)?sym->tag->name:"Root"); if (sym->info.children) { if (sym->tag && tm_tag_function_t == sym->tag->type) tm_tag_print(sym->info.equiv, stde...
false
false
false
false
false
0
RelocateRelocInfos(ZoneList<RelocInfo>* infos, byte* old_start, byte* new_start) { for (int i = 0; i < infos->length(); i++) { RelocInfo* info = &(*infos)[i]; info->set_pc(new_start + (info->pc() - old_start)); } }
false
false
false
false
false
0
asyncmode(bool async) { // GNASH_REPORT_FUNCTION; if (_stream) { int fd = fileno(_stream); long flags = fcntl(fd, F_GETFL); int res; if (async) res = fcntl(fd, F_SETFL, flags|O_NONBLOCK); else res = fcntl(fd, F_SETFL, flags&(...
false
false
false
false
false
0
acpi_wmi_init(void) { int error; if (acpi_disabled) return -ENODEV; error = class_register(&wmi_class); if (error) return error; error = acpi_bus_register_driver(&acpi_wmi_driver); if (error) { pr_err("Error loading mapper\n"); class_unregister(&wmi_class); return error; } pr_info("Mapper loaded\n...
false
false
false
false
false
0
lpphy_write_gain_table(struct b43_wldev *dev, int offset, struct lpphy_tx_gain_table_entry data) { if (dev->phy.rev >= 2) lpphy_rev2plus_write_gain_table(dev, offset, data); else lpphy_rev0_1_write_gain_table(dev, offset, data); }
false
false
false
false
false
0
_mesa_VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr) { const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT | SHORT_BIT | UNSIGNED_SHORT_BIT | ...
false
false
false
false
false
0
itg3200_remove(struct i2c_client *client) { struct iio_dev *indio_dev = i2c_get_clientdata(client); iio_device_unregister(indio_dev); if (client->irq) itg3200_remove_trigger(indio_dev); itg3200_buffer_unconfigure(indio_dev); return 0; }
false
false
false
false
false
0
Execute () { if (!_ifn || !_ofn) { // post a dialog to get the file name } else { const char* err = OvImportCmd::Create_Tiled_File( _ifn, _ofn, _twidth, _theight ); if (err) { cerr << "unable to create tiled image: " << err << "\n"; } } }
false
false
false
false
false
0
japanese_locale(void) { char *lang; lang = getenv("LC_MESSAGE"); if (lang) { if (strneq(lang, "ja", 2)) return 0; return 1; } lang = getenv("LANG"); if (lang && strneq(lang, "ja", 2)) return 0; return 1; }
false
false
false
false
false
0
gst_rtp_L24_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad, GstCaps * filter) { GstCaps *otherpadcaps; GstCaps *caps; caps = gst_pad_get_pad_template_caps (pad); otherpadcaps = gst_pad_get_allowed_caps (rtppayload->srcpad); if (otherpadcaps) { if (!gst_caps_is_empty (otherpadcaps)) { ...
false
false
false
false
false
0
main_bitand(int argc, char *argv[]) { int i; uint64_t len0, *sub0, k, end; if (argc < 3) { fprintf(stderr, "Usage: fermi bitand <in1.bit> <in2.bit> [...]\n"); return 1; } sub0 = read_sub(argv[1], &len0); end = (len0 + 63) / 64; for (i = 2; i < argc; ++i) { uint64_t len1, *sub1; sub1 = read_sub(argv[i], &...
false
false
false
false
false
0