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
generateExecCode(CompileState* comp) { generateDebugInfoIfNeeded(comp); CaseBlockNode* caseBlock = this->block.get(); // The code we produce has 2 stages: first, we emit all the conditionals, and pick // the label to jump to (with the jump to the default being last), // then we just emit all the cl...
false
false
false
false
false
0
navi_dialog_frames_duplicate_frame_callback(GtkWidget *w, gpointer data) { SelectedRange *range_list; GimpParam *return_vals; int nreturn_vals; gint32 dummy_layer_id; if(gap_debug) printf("navi_dialog_frames_duplicate_frame_callback\n"); if(naviD->sel_range_list) { navi...
false
false
false
false
false
0
multipart_get_part (CamelMultipart *multipart, guint index) { GList *part; if (!(multipart->parts)) return NULL; part = g_list_nth (multipart->parts, index); if (part) return CAMEL_MIME_PART (part->data); else return NULL; }
false
false
false
false
false
0
ekg_recode_inc_ref(enum ekg_recode_name enc) { struct ekg_recoder *rec = ekg_recode_get(enc); if (rec->count == 0) ekg_recode_init(rec); rec->count++; }
false
false
false
false
false
0
fn_ElIn_get_params(const gs_function_t *pfn_common, gs_param_list *plist) { const gs_function_ElIn_t *const pfn = (const gs_function_ElIn_t *)pfn_common; int ecode = fn_common_get_params(pfn_common, plist); int code; if (pfn->params.C0) { if ((code = param_write_float_values(plist, "C0"...
false
false
false
false
false
0
pipe_read_avail(Q_PIPE_ID pipe) { int bytesAvail = 0; #ifdef Q_OS_WIN DWORD i = 0; if(PeekNamedPipe(pipe, 0, 0, 0, &i, 0)) bytesAvail = (int)i; #endif #ifdef Q_OS_UNIX size_t nbytes = 0; if(ioctl(pipe, FIONREAD, (char *)&nbytes) >= 0) bytesAvail = *((int *)&nbytes); #endif return bytesAvail; }
false
false
false
false
false
0
write_file(File* filePtr) { if (!write_with_record_size(filePtr, this, &visit_region_array<FileWriterVisitor>, REGION_ARRAY_RECORD_SIZE)) return 0; if( !filePtr->file_write( region_info_array, sizeof(RegionInfo)*region_info_count ) ) return 0; //-------- write RegionStat ----------// filePtr->file...
false
false
false
false
false
0
copy_rtx (rtx orig) { rtx copy; int i, j; RTX_CODE code; const char *format_ptr; code = GET_CODE (orig); switch (code) { case REG: case QUEUED: case CONST_INT: case CONST_DOUBLE: case CONST_VECTOR: case SYMBOL_REF: case CODE_LABEL: case PC: case CC0: case SCRATC...
false
true
false
false
true
1
eventFilter(QObject *o, QEvent *e) { //printf("SeqNameWidget::eventFilter(%0x, %d)\n", (int)this, e->type()); if (parentWidget() && parentWidget() == o) { if (e->type() == QEvent::Resize) { QResizeEvent *resizeEvent = static_cast<QResizeEvent*>(e); //record known vi...
false
false
false
false
false
0
stable_and_no_regs_but_for_p (rtx x, rtx src, rtx dst) { RTX_CODE code = GET_CODE (x); switch (GET_RTX_CLASS (code)) { case '<': case '1': case 'c': case '2': case 'b': case '3': { int i; const char *fmt = GET_RTX_FORMAT (code); for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) if (fmt[i] == 'e' ...
false
false
false
false
false
0
saa7127_set_xds(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *data) { struct saa7127_state *state = to_state(sd); u16 xds = data->data[1] << 8 | data->data[0]; int enable = (data->line != 0); if (enable && (data->field != 1 || data->line != 21)) return -EINVAL; if (state->xds_enable != enable) { ...
false
false
false
false
false
0
incorporateTypes(const Module &M) { NamedTypes.run(M, false); // The list of struct types we got back includes all the struct types, split // the unnamed ones out to a numbering and remove the anonymous structs. unsigned NextNumber = 0; std::vector<StructType*>::iterator NextToUse = NamedTypes.begin(), I, E...
false
false
false
false
false
0
knot_dname_labels(const uint8_t *name, const uint8_t *pkt) { if (name == NULL) return KNOT_EINVAL; uint8_t count = 0; while (*name != '\0') { ++count; name = knot_wire_next_label((uint8_t *)name, (uint8_t *)pkt); if (!name) return KNOT_EMALF; } return count; }
false
false
false
false
false
0
_gcry_pk_ctl (int cmd, void *buffer, size_t buflen) { gcry_err_code_t rc = 0; switch (cmd) { case GCRYCTL_DISABLE_ALGO: /* This one expects a buffer pointing to an integer with the algo number. */ if ((! buffer) || (buflen != sizeof (int))) rc = GPG_ERR_INV_ARG; else disable_p...
false
false
false
false
false
0
sync_print_fence(struct seq_file *s, struct sync_fence *fence) { wait_queue_t *pos; unsigned long flags; int i; seq_printf(s, "[%p] %s: %s\n", fence, fence->name, sync_status_str(atomic_read(&fence->status))); for (i = 0; i < fence->num_fences; ++i) { struct sync_pt *pt = container_of(fence->cbs[i].syn...
false
false
false
false
false
0
GetDbfd() { int r = 0; void *res = 0; dbfdcond.Lock(); while (!r && (dbfdrepo.size() <= 0)) r = dbfdcond.WaitMS(30000); if (!r) { if (dbfdrepo.size() > 0) { res = dbfdrepo.front(); dbfdrepo.pop(); } } dbfdcond.UnLock(); return res; }
false
false
false
false
false
0
insmod(struct kmod_ctx *ctx, const char *alias, const char *extra_options) { struct kmod_list *l, *list = NULL; int err; err = kmod_module_new_from_lookup(ctx, alias, &list); if (err < 0) return err; if (list == NULL) return handle_failed_lookup(ctx, alias); if (use_blacklist) { struct kmod_list *f...
false
false
false
false
false
0
P_Bitstring_Fill(Object bs, Object fill) { Check_Type(bs, T_Bitstring); Check_Type(fill, T_Boolean); Fill_Bitstring(bs, Truep(fill)); return Void; }
false
false
false
false
false
0
print_power_state(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { static const char * const names[] = { [ilog2(AC_PWRST_D0SUP)] = "D0", [ilog2(AC_PWRST_D1SUP)] = "D1", [ilog2(AC_PWRST_D2SUP)] = "D2", [ilog2(AC_PWRST_D3SUP)] = "D3", [ilog2(AC_PWRST_D3COLDSUP)] = "D3cold"...
false
false
false
false
false
0
agmt_set_replicated_attributes_total_from_attr(Repl_Agmt *ra, Slapi_Attr *sattr) { int return_value = 0; PR_ASSERT(NULL != ra); PR_Lock(ra->lock); if (ra->frac_attrs_total) { slapi_ch_array_free(ra->frac_attrs_total); ra->frac_attrs_total = NULL; } if (NULL != sattr) { Slapi_Value *sval = NULL; slapi_a...
false
false
false
false
false
0
checkSettingsValidity() { QHash<QString, QVariant> defaultvalues; defaultvalues.insert(DrugsDB::Constants::S_HIDELABORATORY, false); defaultvalues.insert(DrugsDB::Constants::S_ALD_PRE_HTML, DrugsDB::Constants::S_DEF_ALD_PRE_HTML); defaultvalues.insert(DrugsDB::Constants::S_ALD_POST_HTML, DrugsDB::Consta...
false
false
false
false
false
0
arithmetic_flags_clobber_p (rtx insn) { rtx pat, x; if (!NONJUMP_INSN_P (insn)) return false; pat = PATTERN (insn); if (extract_asm_operands (pat)) return false; if (GET_CODE (pat) == PARALLEL && XVECLEN (pat, 0) == 2) { x = XVECEXP (pat, 0, 0); if (GET_CODE (x) != SET) return false...
false
false
false
false
false
0
tidy_region_node_visitor_feature_node(GtNodeVisitor *nv, GtFeatureNode *fn, GT_UNUSED GtError *err) { GtTidyRegionNodeVisitor *trnv; GtFeatureNodeIterator *fni; GtFeatureNode *node; GtGenomeNode *sr; GtRange rang...
false
false
false
false
false
0
gnutls_x509_rdn_get (const gnutls_datum_t * idn, char *buf, size_t * sizeof_buf) { int result; ASN1_TYPE dn = ASN1_TYPE_EMPTY; if (sizeof_buf == 0) { gnutls_assert (); return GNUTLS_E_INVALID_REQUEST; } if (buf) buf[0] = 0; if ((result = asn1_create_elem...
false
false
false
false
false
0
sgml_add_entry_to_index(SGMLScanner *state, const char *phrase, int start, int end) { if (phrase[0]=='@') { add_region(state->element_list,start,end); } else { if (add_region_to_index((struct IndexWriterStruct *)state->data, phrase,start,end)==SGREP_ERROR) { state->failed=1; } } ...
false
false
false
false
false
0
mm_add3(matrixA, matrixB, m_result) const hmat3_t *matrixA; const hmat3_t *matrixB; hmat3_t *m_result; { int row, col; m_result = gm_ALLOC(hmat3_t, m_result, "mm_add3()"); for(row=0; row<4; row++) for(col=0; col<4; col++) m_elem(*m_result, row, col) = m_elem(*matrixA, row, col) + m_elem(*matrixB...
false
false
false
false
true
1
gnm_style_cond_set_overlay (GnmStyleCond *cond, GnmStyle *overlay) { g_return_if_fail (cond != NULL); if (overlay) gnm_style_ref (overlay); if (cond->overlay) gnm_style_unref (cond->overlay); cond->overlay = overlay; }
false
false
false
false
false
0
interest_has_action_comparefunc (gpointer a, gpointer b) { gint interest_id = GPOINTER_TO_INT (a); UnityWebappsHasActionData *data = (UnityWebappsHasActionData*) b; if (interest_has_action (data->manager, interest_id, data->path)) { return 0; } return 1; }
false
false
false
false
false
0
enchant_provider_free (gpointer data, gpointer user_data) { EnchantProvider *provider; GModule *module; g_return_if_fail (data); provider = (EnchantProvider *) data; module = (GModule *) provider->enchant_private_data; if (provider->dispose) (*provider->dispose) (provider); /* close module only after...
false
false
false
false
false
0
cp_add(CPDecl *decl, CTInfo info, CTSize size) { CPDeclIdx top = decl->top; if (top >= CPARSE_MAX_DECLSTACK) cp_err(decl->cp, LJ_ERR_XLEVELS); decl->stack[top].info = info; decl->stack[top].size = size; decl->stack[top].sib = 0; setgcrefnull(decl->stack[top].name); decl->stack[top].next = decl->stack[decl...
false
false
false
false
false
0
isObjectSizeLessThanOrEq(Value *V, uint64_t MaxSize, const DataLayout &DL) { SmallPtrSet<Value *, 4> Visited; SmallVector<Value *, 4> Worklist(1, V); do { Value *P = Worklist.pop_back_val(); P = P->stripPointerCasts(); if (!Visited.insert(P).second) continu...
false
false
false
false
false
0
add_recursive(GtDiagram *d, GtFeatureNode *node, GtFeatureNode* parent, GtFeatureNode *original_node) { NodeInfoElement *ni; GtFeatureNode *rep = GT_UNDEF_REPR; gt_assert(d && node && original_node); if (!parent) return; ni = nodeinfo_get(d, node); if (gt_...
false
false
false
false
false
0
cdrom_log_sense(ide_drive_t *drive, struct request *rq) { struct request_sense *sense = &drive->sense_data; int log = 0; if (!sense || !rq || (rq->cmd_flags & REQ_QUIET)) return 0; ide_debug_log(IDE_DBG_SENSE, "sense_key: 0x%x", sense->sense_key); switch (sense->sense_key) { case NO_SENSE: case RECOVERED_ER...
false
false
false
false
false
0
pc_address_write(struct Address *addr, PCRecType rt, unsigned char attrib, unsigned int *unique_id) { pi_buffer_t *RecordBuffer; int i; buf_rec br; long char_set; get_pref(PREF_CHAR_SET, &char_set, NULL); if (char_set != CHAR_SET_LATIN1) { for (i = 0; i < 19; i++) { ...
false
false
false
false
false
0
z_move_window (void) { zword win = winarg0 (); flush_buffer (); wp[win].y_pos = zargs[1]; wp[win].x_pos = zargs[2]; if (win == cwin) update_cursor (); }
false
false
false
false
false
0
precalc_first(const CARD_LIST* Scope) { assert(Scope); EVAL_BM_ACTION_BASE::precalc_first(Scope); for (std::vector<PARAMETER<double> >::const_iterator p = _c.begin(); p != _c.end(); ++p) { (*p).e_val(0, Scope); } _min.e_val(_default_min, Scope); _max.e_val(_default_max, Scope); _abs.e_val(_default...
false
false
false
false
false
0
ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, gint col, gint row) { ETableSorted *ets = E_TABLE_SORTED (subset); if (e_table_sorting_utils_affects_sort (ets->sort_info, ets->full_header, col)) ets_pr...
false
false
false
false
false
0
gnutls_x509_crl_get_crt_serial (gnutls_x509_crl_t crl, int indx, unsigned char *serial, size_t * serial_size, time_t * t) { int result, _serial_size; char serial_name[ASN1_MAX_NAME_SIZE]; char date_name[ASN1_MAX_NAME_SIZE]; if (crl == NULL) {...
true
true
false
false
false
1
jpc_mqdec_bytein(jpc_mqdec_t *mqdec) { int c; unsigned char prevbuf; if (!mqdec->eof) { if ((c = jas_stream_getc(mqdec->in)) == EOF) { mqdec->eof = 1; c = 0xff; } prevbuf = mqdec->inbuffer; mqdec->inbuffer = c; if (prevbuf == 0xff) { if (c > 0x8f) { mqdec->creg += 0xff00; mqdec->ctreg = 8...
false
false
false
false
false
0
localInitPool( CoreDFB *core, CoreSurfacePool *pool, void *pool_data, void *pool_local, void *system_data, CoreSurfacePoolDescription *ret_desc ) { ...
false
false
false
false
false
0
draw_preview (glMiniLabelPreview *this, cairo_t *cr) { GtkAllocation allocation; GtkStyle *style; gdouble w, h; guint fill_color, line_color, shadow_color; const lglTemplateFrame *frame; gd...
false
false
false
false
false
0
mov_imglayer_menu_callback(GtkWidget *widget, t_mov_gui_stuff *mgp) { gint32 l_image_id; gint32 id; gint value; gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value); id = value; l_image_id = gimp_drawable_get_image(id); if(!gap_image_is_alive(l_image_id)) { if(gap_debug) { ...
false
false
false
false
false
0
DefineDeoptimizationLiteral(Handle<Object> literal) { int result = deoptimization_literals_.length(); for (int i = 0; i < deoptimization_literals_.length(); ++i) { if (deoptimization_literals_[i].is_identical_to(literal)) return i; } deoptimization_literals_.Add(literal); return result; }
false
false
false
false
false
0
CommandShowScoreSheet(char *UNUSED(sz)) { size_t i, width1, width2; char *data[2]; listOLD *pl; if (ms.gs == GAME_NONE) { outputl(_("No game in progress (type `new game' to start one).")); return; } #if USE_GTK if (fX) { GTKShowScoreSheet(); return; } #endif ...
false
false
false
false
false
0
recognize_single_bit_test (gimple cond, tree *name, tree *bit, bool inv) { gimple stmt; /* Get at the definition of the result of the bit test. */ if (gimple_cond_code (cond) != (inv ? EQ_EXPR : NE_EXPR) || TREE_CODE (gimple_cond_lhs (cond)) != SSA_NAME || !integer_zerop (gimple_cond_rhs (cond))) ...
false
false
false
false
false
0
sg_hdy (init_data, detected, easter, year, hd_elems, fday, count) Bool *init_data; const Bool detected; int easter; const int year; int *hd_elems; const int fday; const int count; /* Manages all specific holidays celebrated in Singapore. */ { register int day; ptr_cc_id = "SG...
false
false
false
false
false
0
rioWriteHashIteratorCursor(rio *r, hashTypeIterator *hi, int what) { if (hi->encoding == REDIS_ENCODING_ZIPLIST) { unsigned char *vstr = NULL; unsigned int vlen = UINT_MAX; long long vll = LLONG_MAX; hashTypeCurrentFromZiplist(hi, what, &vstr, &vlen, &vll); if (vstr) { ...
false
false
false
false
false
0
PayloadGSIStream(PayloadStreamInterface *stream, gss_ctx_id_t& ctx, Logger& logger, bool client) : timeout(60), stream(stream), buffer(NULL), bufferpos(0), bufferlen(0), ctx(c...
false
false
false
false
false
0
FetchNumDatapackets(int in_phy) { int r = 0; kis_device_common *common; for (unsigned int x = 0; x < tracked_vec.size(); x++) { if (tracked_vec[x]->phy_type == in_phy || in_phy == KIS_PHY_ANY) { if ((common = (kis_device_common *) tracked_vec[x]->fetch(devcomp_ref_common)) != NULL) r += common->data...
false
false
false
false
false
0
setStorableData(const QVariant &data) { // WARN_FUNC << data; if (!data.isValid()) return; m_OriginalValue = data.toString(); if (m_OriginalValue.simplified().isEmpty() && !patient()->uuid().isEmpty()) populateWithPatientData(); else m_Widget->setNumberWithControlK...
false
false
false
false
false
0
ReindexTable(RangeVar *relation) { Oid heapOid; HeapTuple tuple; heapOid = RangeVarGetRelid(relation, false); tuple = SearchSysCache(RELOID, ObjectIdGetDatum(heapOid), 0, 0, 0); if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for relation %u", heapOid);...
false
false
false
true
false
1
Resize(Widget w) #else static void Resize(w) Widget w; #endif { if (XtIsRealized(w)) XClearWindow(XtDisplay(w), XtWindow(w)); _XmtLayoutChildren((XmtLayoutWidget) w, False); }
false
false
false
false
false
0
do_generate() { if (!open_output_files()) return false; do_generate_begin(); bool b = gm_apply_compiler_stage(this->gen_steps); if (b==false) { close_output_files(true); return false; } if (OPTIONS.get_arg_bool(GMARGFLAG_CPP_CREATE_MAIN)) { do_generate_user_main(); ...
false
false
false
false
false
0
main(int argc, char **argv) { try { printf(" gps2rawlog - Part of the MRPT\n"); printf(" MRPT C++ Library: %s - Sources timestamp: %s\n", MRPT_getVersion().c_str(), MRPT_getCompilationDate().c_str()); // Parse arguments: if (!cmd.parse( argc, argv )) throw std::runtime_error(""); // should exit. const ...
false
false
false
false
false
0
default_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) { rtx symbol; int flags; /* Careful not to prod global register variables. */ if (GET_CODE (rtl) != MEM) return; symbol = XEXP (rtl, 0); if (GET_CODE (symbol) != SYMBOL_REF) return; flags = 0; if (TREE_CODE (decl) ==...
false
false
false
false
false
0
avc_msg_reformat_path(const seaudit_log_t * log, seaudit_avc_message_t * avc, const char *token) { int error; if (avc->path == NULL) { if ((avc->path = strdup(token)) == NULL) { error = errno; ERR(log, "%s", strerror(error)); errno = error; return -1; } } else { size_t len = strlen(avc->path) + str...
false
true
false
false
false
1
gst_mixer_get_option (GstMixer * mixer, GstMixerOptions * opts) { GstMixerClass *klass; g_return_val_if_fail (mixer != NULL, NULL); g_return_val_if_fail (opts != NULL, NULL); klass = GST_MIXER_GET_CLASS (mixer); if (klass->get_option) { return klass->get_option (mixer, opts); } return NULL; }
false
false
false
false
false
0
alreadyDone(Aaddr address) { int i; bool found = FALSE; if (address == 0) return TRUE; /* Have we already done it? */ for (i = 0; i < numberDone; i++) if (addressesDone[i] == address) { found = TRUE; break; } if (found) return TRUE; if (doneSize == numberDone) { doneSize += 100;...
false
false
false
false
false
0
noLogZero(bool xlog, bool ylog) { int pos = 0; int npnts = size(); for (int j = 0; j < npnts; j++) { if (!(xlog && m_X[j] < 0) && !(ylog && m_Y[j] < 0)) { m_X[pos] = m_X[j]; m_Y[pos] = m_Y[j]; m_M[pos] = m_M[j]; pos++; } } resize(pos); }
false
false
false
false
false
0
iff_get_alpha_value(bool is_bright) { if (is_bright == false) return (HUD_COLOR_ALPHA_MAX - iff_bright_delta) * 16; else return HUD_COLOR_ALPHA_MAX * 16; }
false
false
false
false
false
0
gen8_alloc_va_range(struct i915_address_space *vm, uint64_t start, uint64_t length) { struct i915_hw_ppgtt *ppgtt = container_of(vm, struct i915_hw_ppgtt, base); if (USES_FULL_48BIT_PPGTT(vm->dev)) return gen8_alloc_va_range_4lvl(vm, &ppgtt->pml4, start, length); else return gen8_alloc_va_range_3lvl...
false
false
false
false
false
0
PyFFGlyphPen_closePath(PyObject *self, PyObject *args) { SplineChar *sc = ((PyFF_GlyphPen *) self)->sc; int layer = ((PyFF_GlyphPen *) self)->layer; SplineSet *ss; if ( ((PyFF_GlyphPen *) self)->ended ) { PyErr_Format(PyExc_EnvironmentError, "The curveTo operator must be preceded by a moveTo operator"...
false
false
false
false
false
0
calm_nymphs(distance) int distance; { register struct monst *mtmp = fmon; while (mtmp) { if (!DEADMONSTER(mtmp) && mtmp->data->mlet == S_NYMPH && mtmp->mcanmove && distu(mtmp->mx, mtmp->my) < distance) { mtmp->msleeping = 0; mtmp->mpeaceful = 1; mtmp->mavenge = 0; if (canseemon(mtmp)) pline(...
false
false
false
false
false
0
plnge(int *opstr, int opoff, int (*hier) (value * lval), value * lval, char *forcetag, int chkbitwise) { int lvalue, opidx; int count; value lval2 = { NULL, 0, 0, 0, 0, NULL }; lvalue = plnge1(hier, lval); if (nextop(&opidx, opstr) == 0) return l...
false
false
false
false
false
0
function_class_init(as_object& where, const ObjectURI& uri) { Global_as& gl = getGlobal(where); NativeFunction* func = new NativeFunction(gl, emptyFunction); as_object* proto = createObject(gl); func->init_member(NSV::PROP_PROTOTYPE, proto); func->init_member(NSV::PROP_CONSTRUCTOR, func); prot...
false
false
false
false
false
0
dsm_get_label(struct device *dev, char *buf, enum acpi_attr_enum attr) { acpi_handle handle; union acpi_object *obj, *tmp; int len = -1; handle = ACPI_HANDLE(dev); if (!handle) return -1; obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2, DEVICE_LABEL_DSM, NULL); if (!obj) return -1; tmp = o...
false
false
false
false
false
0
graphToScreen(double xGraph, double yGraph, double* xScreen, double* yScreen) const { ASSERT_ENGAUGE(validAxes() || validScale()); double rScreen [3], rGraph [3]; rGraph [0] = xGraph; rGraph [1] = yGraph; rGraph [2] = 1.0; dmlt3x1(rScreen, m_graphToScreen, rGraph); *xScreen = rScreen [0]; *yScreen =...
false
false
false
false
false
0
tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) { int tileno, compno, resno, bandno, precno;/*, cblkno;*/ fprintf(fd, "image {\n"); fprintf(fd, " tw=%d, th=%d x0=%d x1=%d y0=%d y1=%d\n", img->tw, img->th, tcd->image->x0, tcd->image->x1, tcd->image->y0, tcd->image->y1); for (tileno = 0; tileno < img-...
false
false
false
false
false
0
globus_l_gfs_file_utime( globus_gfs_operation_t op, const char * pathname, time_t modtime) { int rc; globus_result_t result; struct utimbuf ubuf; GlobusGF...
false
false
false
false
false
0
stab_tag (void *p, const char *tag) { struct stab_write_handle *info = (struct stab_write_handle *) p; char *s, *buf; s = stab_pop_type (info); buf = (char *) xmalloc (strlen (tag) + strlen (s) + 3); sprintf (buf, "%s:T%s", tag, s); free (s); if (! stab_write_symbol (info, N_LSYM, 0, 0, buf)) retu...
false
false
false
false
false
0
finish_info_provider (NemoDirectory *directory, NemoFile *file, NemoInfoProvider *provider) { file->details->pending_info_providers = g_list_remove (file->details->pending_info_providers, provider); g_object_unref (provider); nemo_directory_async_state_changed (directory); if (file->detail...
false
false
false
false
false
0
splitPathAndValue(const OFString &whole, OFString &path, OFString &value) { size_t pos = whole.find("="); if (pos != OFString_npos) { path = whole.substr(0, pos); value = whole.substr(pos + 1, value.length() - ...
false
false
false
false
false
0
text_replace_char2(const char *src, char *dest, char c_src, char c_dest) { while (*src) { *dest = (*src == c_src) ? c_dest : *src; src++; dest++; } *dest = 0; return dest; }
false
false
false
false
false
0
mkplan(const solver *ego, const problem *p, planner *plnr) { static const plan_adt padt = { X(rdft2_solve), X(null_awake), print, X(plan_null_destroy) }; plan_rdft2 *pln; UNUSED(plnr); if (!applicable(ego, p)) return (plan *) 0; pln = MKPLAN_RDFT2(plan_rdft2, &padt, apply); ...
false
false
false
false
false
0
f_cl(A a,A w,I i){A z;ND2 X2{I ar=a->r,an=a->n,*ad=a->d;XW;I r,n,d[9];i=!ar&&!wr||i==23; if(ar&&wr)if(ar==wr)Q(cm(ad+!i,wd+!i,ar-!i),8)else{ Q(i||wr-ar!=1&&ar-wr!=1,7)n=wr<ar;Q(cm(ad+n,wd+!n,ar-n),8)} if(wr<ar)n=1,mv(d+i,ad,r=ar);else mv(d+i,wd,r=wr),n=i||ar<wr?1:*ad; if(i)++r,*d=1;*d+=n;Q(MAXR<r,13) u=!ar?(an=tr...
false
false
false
false
false
0
intern_dyn_info (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unw_dyn_info_t *di, void *arg) { unw_word_t first_region; int ret; switch (di->format) { case UNW_INFO_FORMAT_DYNAMIC: if ((ret = fetchw (as, a, addr, &di->u.pi.name_ptr, arg)) < 0 || (ret = fetchw (as, a, addr, &di->...
false
false
false
false
false
0
odf_write_sheet_object_styles (GnmOOExport *state) { int i; for (i = 0; i < workbook_sheet_count (state->wb); i++) { Sheet const *sheet = workbook_sheet_by_index (state->wb, i); GSList *objects = sheet_objects_get (sheet, NULL, GNM_SO_FILLED_TYPE), *l; for (l = objects; l != NULL; l = l->next) { SheetObject...
false
false
false
false
false
0
handle_unit_unload(struct player *pplayer, int cargo_id, int trans_id) { struct unit *pcargo = game_unit_by_number(cargo_id); struct unit *ptrans = game_unit_by_number(trans_id); if (NULL == pcargo) { /* Probably died or bribed. */ log_verbose("handle_unit_unload() invalid cargo %d", cargo_id); retur...
false
false
false
false
false
0
show_page (int n, int m) { int i, y; cur_page = n; cur_menu = m; vscroll = 0; for (i=cur_page; i<nwords; i++) { Word *w = words+i; if (w->flags & HEADER) break; y = w->y+w->d; if (max_vscroll < y) max_vscroll = y; } max_vscroll -= (table_height - menu_height); if (max_vscro...
false
false
false
false
false
0
mr_doc_freq(IndexReader *ir, int field_num, const char *t) { int total = 0; /* sum freqs in segments */ int i = MR(ir)->r_cnt; for (i = MR(ir)->r_cnt - 1; i >= 0; i--) { int fnum = mr_get_field_num(MR(ir), i, field_num); if (fnum >= 0) { IndexReader *reader = MR(ir)->sub...
false
false
false
false
false
0
full_write(int fd, const void *buf, size_t len) { ssize_t cc; ssize_t total; total = 0; while (len) { cc = safe_write(fd, buf, len); if (cc < 0) { if (total) { /* we already wrote some! */ /* user can do another write to know the error code */ return total; } return cc; /* write() retur...
false
false
false
false
false
0
isZero() const { for (int i=0; i<dim; i++) if (_rep[i] != 0) return false; return true; }
false
false
false
false
false
0
_token_list_is_empty_ignoring_space (token_list_t *l) { token_node_t *n; if (l == NULL) return 1; n = l->head; while (n != NULL && n->token->type == SPACE) n = n->next; return n == NULL; }
false
false
false
false
false
0
jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines) { JDIMENSION row_ctr, rows_left; if (cinfo->global_state != CSTATE_SCANNING) ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); if (cinfo->next_scanline >= cinfo->image_height) WARNMS(cinfo, JWRN_TO...
false
false
false
false
false
0
edialign_change_first(struct multi_frag *a, struct multi_frag *b) { struct multi_frag c; struct multi_frag *an; struct multi_frag *bn; if(a==b) { /* Change the first list-element with the second one ** (old first-el.). */ c = *a; an = a->next; bn = a->next->next; *a = *(a->next); a->nex...
false
false
false
false
false
0
visitCastInst(CastInst &I) { LatticeVal OpSt = getValueState(I.getOperand(0)); if (OpSt.isOverdefined()) // Inherit overdefinedness of operand markOverdefined(&I); else if (OpSt.isConstant()) // Propagate constant value markConstant(&I, ConstantExpr::getCast(I.getOpcode(), ...
false
false
false
false
false
0
drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used, drm_clip_rect_t *cliprects, int num_cliprects, int DR4, unsigned int rings) { if (bo->bufmgr->bo_mrb_exec) return bo->bufmgr->bo_mrb_exec(bo, used, cliprects, num_cliprects, DR4, rings); switch (rings) { case I915_EXEC_DEFAULT: case I915_EXEC_RENDER...
false
false
false
false
false
0
flags_from_decl_or_type (tree exp) { int flags = 0; tree type = exp; if (DECL_P (exp)) { struct cgraph_rtl_info *i = cgraph_rtl_info (exp); type = TREE_TYPE (exp); if (i) { if (i->pure_function) flags |= ECF_PURE | ECF_LIBCALL_BLOCK; if (i->const_function) flags |= ECF_CON...
false
false
false
false
false
0
nvbios_dpout_match(struct nvkm_bios *bios, u16 type, u16 mask, u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_dpout *info) { u16 data, idx = 0; while ((data = nvbios_dpout_parse(bios, idx++, ver, hdr, cnt, len, info)) || *ver) { if (data && info->type == type) { if ((info->mask & mask) == mask) ...
false
false
false
false
false
0
gst_video_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, GstClockTime * start, GstClockTime * end) { /* for live sources, sync on the timestamp of the buffer */ if (gst_base_src_is_live (basesrc)) { GstClockTime timestamp = GST_BUFFER_DTS (buffer); if (GST_CLOCK_TIME_IS_VALID (timestamp)...
false
false
false
false
false
0
VPgetinfo(HFILEID f, /* IN: file handle */ uint16 ref /* IN: ref of vgroup */) { VGROUP *vg = NULL; /* intn len; intn mismatches Vgbufsize type -- uint32 */ size_t len; VGROUP *ret_value = NULL; /* FAIL */ CONSTR(FUNC, "VPgetinfo"); /* clear error stack */ ...
false
false
false
false
false
0
ipw_wx_set_mode(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { struct ipw_priv *priv = libipw_priv(dev); int err = 0; IPW_DEBUG_WX("Set MODE: %d\n", wrqu->mode); switch (wrqu->mode) { #ifdef CONFIG_IPW2200_MONITOR case IW_MODE_MONITOR: #endif case IW_MOD...
false
false
false
false
false
0
apply_background_to_window (GSManager *manager, GSWindow *window) { cairo_surface_t *surface; GdkScreen *screen; GdkWindow *gdk_window; gint monitor; GdkRectangle monitor_geometry; int width; in...
false
false
false
false
false
0
addmeta(s1, s2, flags) char *s1; CONST char *s2; int flags; { int i, j, c; if (!s2) return(0); if (flags & EA_INQUOTE) flags |= EA_NOEVALQ; for (i = j = 0; s2[i]; i++, j++) { c = '\0'; if (s2[i] == '\'' && !(flags & EA_NOEVALQ)) c = PESCAPE; else if (s2[i] == '"' && !(flags & EA_NOEVALDQ)) c = PESCAPE; #ifnd...
false
false
false
false
false
0
Not(BitString *bsl) { size_t len,i; BitString *result; if (bsl == NULL) { NullPtrError("Not"); return NULL; } len = bsl->count; result = Create(len); if (result == NULL) { iError.RaiseError("iBitString.Not",CONTAINER_ERROR_NOMEMORY); return NULL; } len = 1+(len >> 3); for (i=0; i<le...
false
false
false
false
false
0
InvokeEditOnSnippetFile() // ---------------------------------------------------------------------------- { // Open as file if (not IsSnippetFile() ) return; // If snippet is file, open it wxString FileName = GetConfig()->GetSnippetsTreeCtrl()->GetSnippetFileLink(); // we have an actual file name, n...
false
false
false
false
false
0
dropFrame() { if (m_bVideoAsync || !m_bVideoDropping || avm_get_time_diff(avm_get_time_us(), m_llTimeStart) < 0.3) return false; bool ret = false; // here we try to eliminate all the frames // until next key-frame with reasonable close time //printf("enter drop: async=%f\n", getVideoAsync()); ...
false
false
false
false
false
0
client_sock_buff_data(const void *data0, size_t length, void *ctx) { struct uo_client *client = ctx; const unsigned char *data = data0; if (client->compression_enabled) { ssize_t nbytes; size_t consumed; nbytes = client_decompress(client, data, length); if (nbytes <= 0) ...
false
false
false
false
false
0
__ecereNameSpace__ecere__com__eClass_Resize(struct __ecereNameSpace__ecere__com__Class * _class, int newSize) { struct __ecereNameSpace__ecere__sys__OldLink * deriv; _class->structSize = newSize; for(deriv = _class->derivatives.first; deriv; deriv = deriv->next) __ecereNameSpace__ecere__com__FixOffsets(deriv->data); }
false
false
false
false
false
0
reportDefault(XML_Parser parser, const ENCODING *enc, const char *s, const char *end) { if (MUST_CONVERT(enc, s)) { const char **eventPP; const char **eventEndPP; if (enc == encoding) { eventPP = &eventPtr; eventEndPP = &eventEndPtr; } else { eventPP = &(openInterna...
false
false
false
false
false
0