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
op_set_colour(void) { if(!allow_output) return; z_set_color(current_window, operand[0], operand[1]); }
false
false
false
false
false
0
dglNodeSet_Attr(dglGraph_s * pGraph, dglInt32_t * pnNode, dglInt32_t * pnAttr) { if (pnNode) { switch (pGraph->Version) { case 1: memcpy(DGL_NODE_ATTR_PTR_v1(pnNode), pnAttr, pGraph->NodeAttrSize); return; #ifdef DGL_V2 case 2: case 3: memcpy(DGL_NODE_ATTR_PTR_v2(pnNode), pnAttr, ...
false
false
false
false
false
0
ompcbe_ddsche_set_lock_var_list(List *hmdf_list) { List *li; lock_var_list = NULL; for (li = hmdf_list; li != NULL; li = li->next) { Hmdf_table *h = (Hmdf_table *)li->data; lock_var_list = ddsche_get_lock_var_list(lock_var_list, h); } }
false
false
false
false
false
0
au_br_stfs(struct au_branch *br, struct aufs_stfs *stfs) { int err; struct kstatfs kstfs; err = vfs_statfs(&br->br_path, &kstfs); if (!err) { stfs->f_blocks = kstfs.f_blocks; stfs->f_bavail = kstfs.f_bavail; stfs->f_files = kstfs.f_files; stfs->f_ffree = kstfs.f_ffree; } return err; }
false
false
false
false
false
0
destroy(Data* d) { if (d != NULL) { d->~Data(); MemoryManager::create()->free(d); } }
false
false
false
false
false
0
batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const { m_childConvexShape->batchedUnitVectorGetSupportingVertexWithoutMargin(vectors,supportVerticesOut,numVectors); int i; for (i=0;i<numVectors;i++) { supportVerticesOut[i] = supportVertices...
false
false
false
false
false
0
AddTarget(BreakTarget* target) { // Add the label to the collector, but discard duplicates. int length = targets_->length(); for (int i = 0; i < length; i++) { if (targets_->at(i) == target) return; } targets_->Add(target); }
false
false
false
false
false
0
deleteRule(Rule *r) { if (r!=NULL) { remove(r, true); // and delete the rule if ref counter == 0 renumberRules(); return(true); } return(false); }
false
false
false
false
false
0
pack_backend__exists_prefix( git_oid *out, git_odb_backend *backend, const git_oid *short_id, size_t len) { int error; struct pack_backend *pb = (struct pack_backend *)backend; struct git_pack_entry e = {0}; error = pack_entry_find_prefix(&e, pb, short_id, len); if (error == GIT_ENOTFOUND && !(error = pack_back...
false
false
false
false
false
0
prevCE(int32_t offset) { UErrorCode status = U_ZERO_ERROR; int32_t low = -1, high = -1; uint32_t order; UBool cont = FALSE; if (offset >= bufferMin && offset < bufferMax) { return &ceb[offset]; } if (bufferMax >= bufferSize || offset != bufferMax) { return NULL; } ...
false
false
false
false
false
0
mono_thread_info_lookup (MonoNativeThreadId id) { MonoThreadHazardPointers *hp = mono_hazard_pointer_get (); if (!mono_lls_find (&thread_list, hp, (uintptr_t)id)) { mono_hazard_pointer_clear_all (hp, -1); return NULL; } mono_hazard_pointer_clear_all (hp, 1); return mono_hazard_pointer_get_val (hp, 1); }
false
false
false
false
false
0
log_move(FILE * logfp, const int *anMove, int side, int die0, int die1) { int i; if (!logfp) return; fprintf(logfp, ";%s[%d%d", side ? "B" : "W", die0, die1); for (i = 0; i < 8; i += 2) { if (anMove[i] < 0) break; if (anMove[i] > 23) fprintf(logfp, "y")...
false
false
false
false
false
0
send_naws_size(World *world) { /* 3 for start, 2 for end. Each value is 2 bytes, but may be 4 if it happens to be 0xFFFF and must be IAC escaped. Thus 8 for both values. */ guchar buffer[3 + 8 + 2]; int bsize; guint16 size; guint cols; guint rows; ansitextview_get_size(world->gui,...
false
true
false
false
false
1
imCalcPercentMinMax(const imImage* image, float percent, int ignore_zero, int *min, int *max) { int zero = -imHistogramShift(image->data_type); int hcount; unsigned long* histo = imHistogramNew(image->data_type, &hcount); imCalcGrayHistogram(image, histo, 0); unsigned long acum, cut = (unsigned long)((image...
false
false
false
false
false
0
gst_rtp_theora_pay_reset_packet (GstRtpTheoraPay * rtptheorapay, guint8 TDT) { guint payload_len; GST_DEBUG_OBJECT (rtptheorapay, "reset packet"); rtptheorapay->payload_pos = 4; payload_len = gst_rtp_buffer_get_payload_len (rtptheorapay->packet); rtptheorapay->payload_left = payload_len - 4; rtptheorapay-...
false
false
false
false
false
0
elf_link_sort_cmp1 (const void *A, const void *B) { const struct elf_link_sort_rela *a = (const struct elf_link_sort_rela *) A; const struct elf_link_sort_rela *b = (const struct elf_link_sort_rela *) B; int relativea, relativeb; relativea = a->type == reloc_class_relative; relativeb = b->type == reloc_class...
false
false
false
false
false
0
open_policy_load_module(struct open_policy *op, const char *path) { const char *module_name, *version_string; int module_type; qpol_module_t *module = NULL; GtkTreeIter iter; /* check if modulue was already loaded */ gboolean iter_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(op->module_store), &iter); w...
false
false
false
false
false
0
mp3tunes_harmony_add_download_to_queue(MP3tunesHarmony *harmony, mp3tunes_harmony_download_t* harmony_download) { g_queue_push_tail(harmony->download_queue, harmony_download); if (harmony->sid_state == MP3TUNES_HARMONY_SID_STATE_NONE) { harmony_get_session_id(harmony); } else if (harmony->sid_st...
false
false
false
false
false
0
get_local_debug_decl (struct nesting_info *info, tree decl, tree field) { tree x, new_decl; void **slot; slot = pointer_map_insert (info->var_map, decl); if (*slot) return (tree) *slot; /* Make sure frame_decl gets created. */ (void) get_frame_type (info); x = info->frame_decl; x = build3 (COMPON...
false
false
false
false
false
0
_part_access_check(struct part_record *part_ptr, job_desc_msg_t * job_desc, bitstr_t *req_bitmap, uid_t submit_uid) { uint32_t total_nodes; size_t resv_name_leng = 0; if (job_desc->reservation != NULL) { resv_name_leng = strlen(job_desc->reservation); } if ((part_ptr->flags & PART_FLAG_REQ_RE...
false
false
false
false
false
0
build_startup_packet(const PGconn *conn, char *packet, const PQEnvironmentOption *options) { int packet_len = 0; const PQEnvironmentOption *next_eo; /* Protocol version comes first. */ if (packet) { ProtocolVersion pv = htonl(conn->pversion); memcpy(packet + packet_len, &pv, sizeof(ProtocolVersion));...
false
false
false
false
true
1
getConnectionPrototyperName(QString kind, QString connectionName) const { return QString("%1__%2__%3") .arg(kind) .arg(getName().replace(" ","___")) .arg(connectionName.replace(" ","___")); }
false
false
false
false
false
0
show_exclude_gpu(EXCLUDE_GPU& e) { char t[256], app_name[256], dev[256]; PROJECT *p = gstate.lookup_project(e.url.c_str()); if (!p) return; if (e.type.empty()) { safe_strcpy(t, "all"); } else { safe_strcpy(t, e.type.c_str()); } if (e.appname.empty()) { safe_strcpy(app...
false
false
false
false
false
0
build_tile_data(const struct tile *ptile, struct terrain *pterrain, struct terrain **tterrain_near, bv_special *tspecial_near) { enum direction8 dir; /* Loop over all adjacent tiles. We should have an iterator for this. */ for (dir = 0; dir < 8; dir++) { struct tile *tile1 = mapstep(pti...
false
false
false
false
false
0
deleteProperty(ExecState* exec, const Identifier& propertyName) { bool isArrayIndex; unsigned i = propertyName.toArrayIndex(&isArrayIndex); if (isArrayIndex) return deleteProperty(exec, i); if (propertyName == exec->propertyNames().length) return false; return JSObject::deletePrope...
false
false
false
false
false
0
SetList ( Obj list ) { Obj set; /* result set */ Int lenSet; /* length of <set> */ Int lenList; /* length of <list> */ Obj elm; /* ...
false
false
false
false
false
0
subsChars( char *string, int length, char fromChar, char toChar ) { char * c; for ( c = string; c < &string[ length ]; c++ ) if ( *c == fromChar ) * c = toChar; }
false
false
false
false
false
0
zzip_compr_str(int compr) { switch (compr) { /* *INDENT-OFF* */ case ZZIP_IS_STORED: return "stored"; case ZZIP_IS_SHRUNK: return "shrunk"; case ZZIP_IS_REDUCEDx1: case ZZIP_IS_REDUCEDx2: case ZZIP_IS_REDUCEDx3: case ZZIP_IS_REDUCEDx4: return "reduced"; case ZZIP_IS_IMPLODED: re...
false
false
false
false
false
0
mxr_s_output(struct file *file, void *fh, unsigned int i) { struct video_device *vfd = video_devdata(file); struct mxr_layer *layer = video_drvdata(file); struct mxr_device *mdev = layer->mdev; if (i >= mdev->output_cnt || mdev->output[i] == NULL) return -EINVAL; mutex_lock(&mdev->mutex); if (mdev->n_output >...
false
false
false
false
false
0
vficon_unselect(ViewFile *vf, IconData *id) { VFICON(vf)->prev_selection = id; if (!id || !(id->selected & SELECTION_SELECTED) ) return; VFICON(vf)->selection = g_list_remove(VFICON(vf)->selection, id); vficon_selection_remove(vf, id, SELECTION_SELECTED, NULL); vf_send_update(vf); }
false
false
false
false
false
0
mxf_utf16_to_utf8 (const guint8 * data, guint size) { gchar *ret; GError *error = NULL; ret = g_convert ((const gchar *) data, size, "UTF-8", "UTF-16BE", NULL, NULL, &error); if (ret == NULL) { GST_WARNING ("UTF-16-BE to UTF-8 conversion failed: %s", error->message); g_error_free (error); ...
false
false
false
false
false
0
alps_get_finger_coordinate_v7(struct input_mt_pos *mt, unsigned char *pkt, unsigned char pkt_id) { mt[0].x = ((pkt[2] & 0x80) << 4); mt[0].x |= ((pkt[2] & 0x3F) << 5); mt[0].x |= ((pkt[3] & 0x30) >> 1); mt[0].x |= (pkt[3] & 0x07); mt[0].y = (pkt[1] << 3) | (pkt[0] & 0x07); mt[1].x = ((pkt[3] & 0x80...
false
false
false
false
false
0
y ( size_t number ) const { // which point are we returning? double result = 0; switch ( number % 4 ) { case 0 : result = -5000; // bottom left break; case 1 : result = 5000; // top left - set to out of bound value break; case 2 : result = ...
false
false
false
false
false
0
tp_asv_get_boxed (const GHashTable *asv, const gchar *key, GType type) { GValue *value; g_return_val_if_fail (asv != NULL, NULL); g_return_val_if_fail (key != NULL, NULL); g_return_val_if_fail (G_TYPE_FUNDAMENTAL (type) == G_TYPE_BOXED, NULL); value = g_hash_table_lookup ...
false
false
false
false
false
0
valid_commodity(gnc_commodity *com) { if (gnc_commodity_get_namespace(com) == NULL) { PWARN("Invalid commodity: no namespace"); return FALSE; } if (gnc_commodity_get_mnemonic(com) == NULL) { PWARN("Invalid commodity: no mnemonic"); return FALSE; } if (gnc_comm...
false
false
false
false
false
0
_e_smart_del(Evas_Object *obj) { INTERNAL_ENTRY; e_pan_child_set(obj, NULL); E_FREE(sd); }
false
false
false
false
false
0
_set_distribution(task_dist_states_t distribution, char **dist, char **lllp_dist) { if (((int)distribution >= 0) && (distribution != SLURM_DIST_UNKNOWN)) { switch(distribution) { case SLURM_DIST_CYCLIC: *dist = "cyclic"; break; case SLURM_DIST_BLOCK: *dist = "block"; break; ...
false
false
false
false
false
0
graph_contains_xy(struct graph *g, int x, int y) { int first_x = g->xoffset; int last_x = g->xoffset + g->xdim; int first_y = g->yoffset; int last_y = g->yoffset + g->ydim; return (x >= first_x && x <= last_x) && (y >= first_y && y <= last_y); }
false
false
false
false
false
0
notifyPageSent(TIFF* tif, PageType pt) { if (curreq) server.notifyPageSent(*curreq, TIFFFileName(tif), pt); }
false
false
false
false
false
0
der_put_heim_integer (unsigned char *p, size_t len, const heim_integer *data, size_t *size) { unsigned char *buf = data->data; int hibitset = 0; if (data->length == 0) { if (len < 1) return ASN1_OVERFLOW; *p-- = 0; if (size) *size = 1; return 0; } if (len < data->length) retur...
false
true
false
false
true
1
nd_blk_available_dpa(struct nd_mapping *nd_mapping) { struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); resource_size_t map_end, busy = 0, available; struct resource *res; if (!ndd) return 0; map_end = nd_mapping->start + nd_mapping->size - 1; for_each_dpa_resource(ndd, res) if (res->start >= nd_mapping->sta...
false
false
false
false
false
0
compute_diff(VMG_ vm_val_t *result, const char *ext1, const char *ext2) { char *new_ext; /* allocate our result value */ new_ext = compute_init_2op(vmg_ result, ext1, ext2); /* we're done if we had a non-number operand */ if (new_ext == 0) return; ...
false
false
false
false
false
0
cirdna_OverlapTickRuler(ajint NumGroups, const ajint *NumLabels, float* const * From, const AjPStr PosTicks, ajint RulerTick) { ajint i; ajint j; ajint overlap = 0; for(i=0; i<NumGroups; i++) for(j=0; j<NumLabels[i]; j++) { if(ajStrMatchCaseC(Style[i][j], "Tick") &&...
false
false
false
false
false
0
__ao2_ref_debug(void *user_data, int delta, const char *tag, const char *file, int line, const char *func) { struct astobj2 *obj = INTERNAL_OBJ(user_data); if (obj == NULL) return -1; if (delta != 0) { FILE *refo = fopen(REF_FILE, "a"); if (refo) { fprintf(refo, "%p %s%d %s:%d:%s (%s) [@%d]\n", user_dat...
false
false
false
false
true
1
git_status_pane_set_path_selection_state (GitStatusPane *self, const gchar *path, AnjutaVcsStatus status, StatusType type, gboolean state) { GHashTable *selection_table; switch (type) { ...
false
false
false
false
false
0
arg_ep(struct spq *jp, const struct argop *ao) { jp->spq_end = ao->ao_un.ao_ulong != 0? ao->ao_un.ao_ulong - 1: LOTSANDLOTS; return 1; }
false
false
false
false
false
0
utest_occupancy(ESL_GETOPTS *go, ESL_RANDOMNESS *r, ESL_ALPHABET *abc) { char *msg = "p7_hmm.c:: occupancy unit test failed"; P7_HMM *hmm = NULL; int M = 200; float *occ = malloc(sizeof(float) * (M+1)); float x; if (p7_hmm_Sample(r, M, abc, &hmm) != eslOK) esl_fatal(msg); if ...
false
false
false
false
false
0
jas_cmprof_destroy(jas_cmprof_t *prof) { int i; for (i = 0; i < JAS_CMPROF_NUMPXFORMSEQS; ++i) { if (prof->pxformseqs[i]) { jas_cmpxformseq_destroy(prof->pxformseqs[i]); prof->pxformseqs[i] = 0; } } if (prof->iccprof) jas_iccprof_destroy(prof->iccprof); jas_free(prof); }
false
false
false
false
false
0
softcheckbar(pass) /* allows repeats to be in mid-bar */ int pass; { if (barchecking) { if ((bar_num-barsize*(bar_denom) >= 0) || (barno <= 0)) { checkbar(pass); }; }; }
false
false
false
false
false
0
json_load_file(const char *path, json_error_t *error) { json_t *result; FILE *fp; error_init(error); fp = fopen(path, "r"); if(!fp) { error_set(error, NULL, "unable to open %s: %s", path, strerror(errno)); return NULL; } result = json_loadf(fp, error)...
false
false
false
false
false
0
gst_multiudpsink_add_internal (GstMultiUDPSink * sink, const gchar * host, gint port, gboolean lock) { GstUDPClient *client; GstUDPClient udpclient; GTimeVal now; GList *find; udpclient.host = (gchar *) host; udpclient.port = port; GST_DEBUG_OBJECT (sink, "adding client on host %s, port %d", host, p...
false
false
false
false
false
0
xhline(struct image *image, int x, int y, int width, int fgcolor) { /*Do some clipping */ if (x + width < 0 || y < 0 || y >= image->height || x >= image->width) return; if (x + width >= image->width - 1) width = image->width - x - 2; if (x < 0) width += x, x = 0; if (width < 0) return; switc...
false
false
false
false
false
0
gst_signal_processor_stop (GstSignalProcessor * self) { GstSignalProcessorClass *klass; GstElement *elem; GList *sinks; klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); elem = GST_ELEMENT (self); GST_INFO_OBJECT (self, "stop()"); g_return_if_fail (self->state == GST_SIGNAL_PROCESSOR_STATE_RUNNING); if...
false
false
false
false
false
0
gst_value_serialize_flags (const GValue * value) { guint flags; GFlagsValue *fl; GFlagsClass *klass = (GFlagsClass *) g_type_class_ref (G_VALUE_TYPE (value)); gchar *result, *tmp; gboolean first = TRUE; g_return_val_if_fail (klass, NULL); flags = g_value_get_flags (value); /* if no flags are set, try...
false
false
false
false
false
0
table_OR (struct GMTMATH_INFO *info, double **stack[], GMT_LONG *constant, double *factor, GMT_LONG last, GMT_LONG col, GMT_LONG n_row) /*OPERATOR: OR 2 1 NaN if A or B == NaN, else A. */ { GMT_LONG i, prev; double a, b; prev = last - 1; for (i = 0; i < n_row; i++) { a = (constant[prev]) ? factor[prev] : stack[...
false
false
false
false
false
0
ccp_nakci(f, p, len) fsm *f; u_char *p; int len; { ccp_options *go = &ccp_gotoptions[f->unit]; ccp_options no; /* options we've seen already */ ccp_options try; /* options to ask for next time */ memset(&no, 0, sizeof(no)); try = *go; if (go->deflate && len >= CILEN_DEFLATE && p...
false
false
false
false
false
0
make0sort( TARGETS * chain ) { PROFILE_ENTER( MAKE_MAKE0SORT ); TARGETS * result = 0; /* Walk the current target list. */ while ( chain ) { TARGETS * c = chain; TARGETS * s = result; chain = chain->next; /* Find point s in result for c. */ while ( s && ( s...
false
false
false
false
false
0
skl_link_pcm_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct hdac_ext_stream *link_dev = snd_soc_dai_get_dma_data(dai, substream); dev_dbg(dai->dev, "In %s cmd=%d\n", __func__, cmd); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ca...
false
false
false
false
false
0
send_slc (void) { register int i; /* * Send out list of triplets of special characters * to client. We only send info on the characters * that are currently supported. */ for (i = 1; i <= NSLC; i++) { if ((slctab[i].defset.flag & SLC_LEVELBITS) == SLC_NOSUPPORT) continue; add_slc ((...
false
false
false
false
false
0
fix_sql_mode(sys_var *self, THD *thd, enum_var_type type) { if (type != OPT_GLOBAL) { /* Update thd->server_status */ if (thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) thd->server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES; else thd->server_status&= ~SERVER_STATUS_NO_BACKSLASH_ESCAPE...
false
false
false
false
false
0
hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) { struct hid_report *report; if (type > HID_FEATURE_REPORT) { hid_err(hid, "invalid HID report type %u\n", type); return NULL; } if (id >= HID_...
false
false
false
false
false
0
flmRcaLinkToFileAtEnd( RCACHE * pRCache, FFILE * pFile) { pRCache->pNextInFile = NULL; if( (pRCache->pPrevInFile = pFile->pLastRecord) != NULL) { pFile->pLastRecord->pNextInFile = pRCache; } else { pFile->pFirstRecord = pRCache; } pFile->pLastRecord = pRCache; pRCache->pFile = pFile; RCA_SET_LINKED_TO...
false
false
false
false
false
0
compute_first_stage_F (MODEL *pmod, const int *endolist, const int *reglist, const int *instlist, DATASET *dset, gretlopt opt) { MODEL mod1; int *list1 = NULL; int *flist = NULL; double F; int i, ev, vi; int err = 0; gretl_model_init(&mod1, dset); ev =...
false
false
false
true
false
1
init_reg_sets () { int i, j; /* First copy the register information from the initial int form into the regsets. */ for (i = 0; i < N_REG_CLASSES; i++) { CLEAR_HARD_REG_SET (reg_class_contents[i]); /* Note that we hard-code 32 here, not HOST_BITS_PER_INT. */ for (j = 0; j < FIRST_PS...
false
true
false
false
false
1
appendCallBackOutput(struct appendState *state, const struct blockCompositionSeq *seqIdx, bitInsertFunc biFunc, unsigned long start, unsigned long len, unsigned callBackDataOffsetBits, void *cbState) { BitOffset bitsWritten; gt_asse...
false
false
false
false
false
0
evaluate(string_ty *path_unres, string_ty *path, string_ty *path_res, struct stat *st) const { rpt_value::pointer vp = get_arg()->evaluate(path_unres, path, path_res, st); if (vp->is_an_error()) return vp; rpt_value::pointer svp = rpt_value::stringize(vp); rpt_value_string *svpp = dynamic_ca...
false
false
false
false
false
0
buildattribute3a(NCDAP3* drno, NCattribute* att, nc_type vartype, int varid, int ncid) { int i; NCerror ncstat = NC_NOERR; char* cname = cdflegalname3(att->name); unsigned int nvalues = nclistlength(att->values); /* If the type of the attribute is string, then we need*/ /* to convert to a singl...
false
true
false
false
false
1
promotable_binary_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) { return ((GET_CODE (op) == PLUS || GET_CODE (op) == MINUS || GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR || GET_CODE (op) == ASHIFT) || ((GET_CODE (op) == MULT) && ( #line 1184 "../../src/gcc/config/i386/predicates....
false
false
false
false
false
0
MakeCode(CompilationInfo* info) { // Precondition: code has been parsed. Postcondition: the code field in // the compilation info is set if compilation succeeded. ASSERT(info->function() != NULL); if (Rewriter::Rewrite(info) && Scope::Analyze(info)) { if (V8::UseCrankshaft()) return MakeCrankshaftCode(inf...
false
false
false
false
false
0
receivePixmap(const QPixmap& pixmap) { QPixmap pixmapUse = pixmap.size().isEmpty() ? dummyPixmap() : pixmap; const QSizeF pixmapSize = pixmapUse.size(); if (d->m_pixmapSize != pixmapSize) { prepareGeometryChange(); d->m_pixmapSize = pixmapUse.size(); d->updateTransform(); } d->setPixmap(pixmapUse); update(...
false
false
false
false
false
0
ofps_redo_voronoi( ofps *s ) { vtx *vx, *nvx; int i, j, k, e, di = s->di; /* Retry if we get a failure to add a point */ for (k = 0; k < NINSERTTRIES; k++) { /* (~9 should think about smoothing the pre-conditioning lookup */ /* if the number of tries is high. Add this to rspl.) */ /* Clear the voronoi n...
false
false
false
false
false
0
cashsmaller(PG_FUNCTION_ARGS) { Cash c1 = PG_GETARG_CASH(0); Cash c2 = PG_GETARG_CASH(1); Cash result; result = (c1 < c2) ? c1 : c2; PG_RETURN_CASH(result); }
false
false
false
false
false
0
send_player_cities(struct player *pplayer) { city_list_iterate(pplayer->cities, pcity) { city_refresh(pcity); send_city_info(pplayer, pcity); } city_list_iterate_end; }
false
false
false
false
false
0
_gtk_source_regex_fetch_named_pos (GtkSourceRegex *regex, const gchar *text, const gchar *name, gint *start_pos, /* character offsets */ gint *end_pos) /* character offsets */ { gint byte_start_pos, byte_end_pos; g_assert (regex->resolved); if (!g_match_info_...
false
false
false
false
false
0
ask_password_cb (GMountOperation *mount_operation, const gchar *message_to_show, const gchar *default_user, const gchar *default_domain, GAskPasswordFlags flags, GVfsRemoteVolumeM...
false
false
false
false
false
0
ParseLogHandlers(const char *handlers) { LogHandlerType handler_mask; register const char *p; register ssize_t i; size_t length; handler_mask=NoHandler; for (p=handlers; p != (char *) NULL; p=strchr(p,',')) { while ((*p != '\0') && ((isspace((int) ((unsigned char) *p)) != 0) || ...
false
false
false
false
false
0
acpi_thermal_get_trip_points(struct acpi_thermal *tz) { int i, valid, ret = acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT); if (ret) return ret; valid = tz->trips.critical.flags.valid | tz->trips.hot.flags.valid | tz->trips.passive.flags.valid; for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) valid |= tz->t...
false
false
false
false
false
0
page_flush (a2ps_job * job) { /* Everything that follows _must_ be dumped */ output_to_void (job->divertion, false); /* If the sheet has not been printed, flush it */ if (job->virtual != 0) page_end (job); }
false
false
false
false
false
0
initialize_infrastructure_cache(struct player *pplayer) { city_list_iterate(pplayer->cities, pcity) { struct tile *pcenter = city_tile(pcity); int radius_sq = city_map_radius_sq_get(pcity); int best = best_worker_tile_value(pcity); city_map_iterate(radius_sq, city_index, city_x, city_y) { activ...
false
false
false
false
false
0
ves_icall_System_ComObject_ReleaseInterfaces (MonoComObject* obj) { g_assert(obj); if (obj->itf_hash) { guint32 gchandle = 0; mono_cominterop_lock (); gchandle = GPOINTER_TO_UINT (g_hash_table_lookup (rcw_hash, obj->iunknown)); if (gchandle) { mono_gchandle_free (gchandle); g_hash_table_remove (rcw_hash...
false
false
false
false
false
0
WriteCattFile(const char *filename) { // Open file FILE *fp; if (!(fp = fopen(filename, "w"))) { RNFail("Unable to open file %s", filename); return 0; } // Write vertex header fprintf(fp, "%%CORNERS\n\n"); // Write vertices for (int i = 0; i < NVertices(); i++) { R3MeshVertex *vertex = Ver...
false
false
false
false
false
0
EndReplay( List &backup, Map *map ) { List &gam_units = Gam->GetMission()->GetUnits(); Unit *u; while ( !gam_units.IsEmpty() ) { u = static_cast<Unit *>( gam_units.RemHead() ); if ( !u->IsSheltered() ) map->SetUnit( NULL, u->Position() ); delete u; } while ( !backup.IsEmpty() ) { u = static_...
false
false
false
false
false
0
ask_pw_md5(char *prompt, char *pass_want, char *pw) { #define SALT_LEN 10 char buffer[2048]; char cipher[16]; char key[256]; char *challenge; pass_want[0]= 0; if (!pw || !*pw) return; if (seed == 1L) conv_randomize(); strncpy(key, pw, sizeof(key)); key[sizeof(key)-1] = 0; /* compute random salt */ ...
true
true
false
false
false
1
ram2out(void) { extern CELL *cell, *x_cell, *y_cell; extern CELL *map_x_out, *map_y_out; extern float *map_out; extern int cum_fd, x_fd, y_fd; extern int nrows, ncols; extern struct Cell_head window; double north, west; double G_row_to_northing(), G_col_to_easting(); int row, col; ...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__com__Array_GetAtPosition(struct __ecereNameSpace__ecere__com__Instance * this, uint64 pos, unsigned int create) { struct __ecereNameSpace__ecere__com__Array * __ecerePointer___ecereNameSpace__ecere__com__Array = (struct __ecereNameSpace__ecere__com__Array *)(this ? (((char *)this)...
false
false
false
true
false
1
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); JobList *_t = static_cast<JobList *>(_o); switch (_id) { case 0: _t->populateTable(); break; case 1: _t->treeWidgetName(...
false
false
false
false
false
0
isFloat(const gchar *t) { guint i; for(i=0;i<strlen(t);i++) if(!testascii(t[i]) ) return FALSE; if(t[0] =='e' || t[0] =='E' ) return FALSE; return TRUE; }
false
false
false
false
false
0
ocfs2_dentry_lock_put(struct ocfs2_super *osb, struct ocfs2_dentry_lock *dl) { int unlock = 0; BUG_ON(dl->dl_count == 0); spin_lock(&dentry_attach_lock); dl->dl_count--; unlock = !dl->dl_count; spin_unlock(&dentry_attach_lock); if (unlock) ocfs2_drop_dentry_lock(osb, dl); }
false
false
false
false
false
0
smallserver_init(const char *adr, int port, int family) { SOCaddr server; size_t server_size = sizeof(server); memset(&server, 0, sizeof(server)); SOCaddr_initany(server, server_size); if (gethost(adr, &server, server_size)) { // host name T_SOC soc = INVALID_SOCKET; if ((soc = (T_SOC) ...
false
false
false
false
false
0
restart(const char *mesg) { static int was_here = 0; /* redundant due to restarting flag below */ if (was_here++) abort(); server_die(mesg, 1); }
false
false
false
false
false
0
zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC) /* {{{ */ { znode value; if (Z_STRLEN(varname->u.constant) == sizeof("this") - 1 && memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this") - 1) == 0) { zend_error(E_COMPILE_ERROR, "Cannot use $this as lexical variable"); return; ...
false
false
false
false
false
0
git_attr_cache__init(git_repository *repo) { int ret; git_attr_cache *cache = git_repository_attr_cache(repo); git_config *cfg; if (cache->initialized) return 0; /* cache config settings for attributes and ignores */ if (git_repository_config__weakptr(&cfg, repo) < 0) return -1; ret = git_config_get_strin...
false
false
false
false
false
0
eucj2utf(ScmConvInfo *cinfo, const char *inptr, size_t inroom, char *outptr, size_t outroom, size_t *outchars) { unsigned char e0, e1, e2; unsigned int ucs; e0 = (unsigned char)inptr[0]; if (e0 < 0xa0) { if (e0 == 0x8e) { /* JIS X 0201 KANA */ INCH...
false
false
false
false
false
0
gfs_async_server_status(struct gfp_xdr *conn, gfp_xdr_xid_t xid, size_t size) { gfarm_error_t e; int save_errno = 0; double loadavg[3]; gfarm_int32_t bsize; gfarm_off_t blocks, bfree, bavail, files, ffree, favail; gfarm_off_t used = 0, avail = 0; /* just check that size == 0 */ e = gfs_async_server_get_request...
false
false
false
false
false
0
custom_list_append (CustomList * custom_list, chanlistrow * newrecord) { GtkTreeIter iter; GtkTreePath *path; gulong newsize; guint pos; if (custom_list->num_rows >= custom_list->num_alloc) { custom_list->num_alloc += 64; newsize = custom_list->num_alloc * sizeof (chanlistrow *); custom_list->rows = g_real...
false
false
false
false
false
0
attach() { assert(!attached()); if (m_render) { assert(m_render->style()); parentNode()->renderer()->addChild(m_render, nextRenderer()); } // FIXME: This handles the case of a new form element being created by // JavaScript and inserted inside a form. What it does not handle is ...
false
false
false
false
false
0
ipmi_lanp_main(struct ipmi_intf * intf, int argc, char ** argv) { int rc = 0; uint8_t chan = find_lan_channel(intf, 1); if (argc == 0 || (strncmp(argv[0], "help", 4) == 0)) { print_lan_usage(); return -1; } if (strncmp(argv[0], "printconf", 9) == 0 || strncmp(argv[0], "print", 5) == 0) { if (argc > 1...
false
false
false
false
false
0
gkr_session_negotiate (GkrOperation *op) { GkrSession *session = NULL; G_LOCK(session_globals); { if (the_session) session = gkr_session_ref (the_session); } G_UNLOCK(session_globals); /* If we have a session just call through to the next step. */ if (session) { gkr_callback_invoke_op_session (gkr_opera...
false
false
false
false
false
0
newmspec (void) { NODE *n = new_node(MSPEC); if (n != NULL) { n->flags = TMP_NODE; n->v.mspec = NULL; } return n; }
false
false
false
false
false
0
SelectAction(vtkAbstractWidget *w) { vtkButtonWidget *self = reinterpret_cast<vtkButtonWidget*>(w); int X = self->Interactor->GetEventPosition()[0]; int Y = self->Interactor->GetEventPosition()[1]; // The state must be hovering for anything to happen. MoveAction sets the // state. if ( self->WidgetState !...
false
false
false
false
false
0