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
add_tree_node(Token *node, Token *left, Token *right) #else /* K&R style */ add_tree_node(node,left,right) Token *node,*left,*right; #endif /* HAVE_STDC */ { Token *new_node, *new_left, *new_right; new_node=new_token(); *new_node = *node; /* Make a permanent copy of root */ /* Add the children. If chi...
false
false
false
false
false
0
str_downcase(string_ty * s) { static stracc sa; char *cp1; sa_open(&sa); for (cp1 = s->str_text; *cp1; ++cp1) { int c; c = (unsigned char)*cp1; if (isupper(c)) c = tolower(c); sa_char(&sa, c); } return sa_close(&sa); }
false
false
false
false
true
1
moveJob(int JobListPos, int updown) { if (JobListPos >= this->jobqueue->size()) { qWarning().nospace() << Q_FUNC_INFO << " - JobListPos [" << JobListPos << "]" << " is greater than the jobqueue->size() " << "[" << this->jobqueue->size() << "]"; return; //abort } int newPos = JobListPo...
false
false
false
false
false
0
gt_firstcodes_tab_delete(GtFirstcodesspacelog *fcsl,GtFirstcodestab *fct) { gt_firstcodes_samples_delete(fcsl,fct); gt_str_delete(fct->outfilenameleftborder); fct->outfilenameleftborder = NULL; #ifdef _LP64 GT_FREEARRAY(&fct->bitchangepoints,GtUlong); #endif }
false
false
false
false
false
0
fmpz_poly_byte_unpack(fmpz_poly_t poly_m, const mp_limb_t* array, const unsigned long bundle, const unsigned long coeff_bytes) { const unsigned long limbs_per_coeff = (coeff_bytes>>FLINT_LG_BYTES_PER_LIMB); const unsigned long extra_bytes_per_coeff = coeff_bytes ...
false
false
false
false
false
0
create_node_manager_caches(void) { nat_entry_slab = f2fs_kmem_cache_create("nat_entry", sizeof(struct nat_entry)); if (!nat_entry_slab) goto fail; free_nid_slab = f2fs_kmem_cache_create("free_nid", sizeof(struct free_nid)); if (!free_nid_slab) goto destroy_nat_entry; nat_entry_set_slab = f2fs_kmem_cach...
false
false
false
false
false
0
GetPredefinedCommands(std::list<cmCommand*>& #if defined(CMAKE_BUILD_WITH_CMAKE) commands #endif ) { #if defined(CMAKE_BUILD_WITH_CMAKE) commands.push_back(new cmAuxSourceDirectoryCommand); commands.push_back(new cmBuildNameCommand); commands.push_back(new cmElseIfCommand); commands.push_back(new cmEndWhile...
false
false
false
false
false
0
_chanop(Channel *c, int op, void *p, int canblock) { Alt a[2]; a[0].c = c; a[0].op = op; a[0].v = p; a[1].op = canblock ? CHANEND : CHANNOBLK; if(chanalt(a) < 0) return -1; return 1; }
false
false
false
false
false
0
gkr_operation_handle_errors (GkrOperation *op, DBusMessage *reply) { DBusError derr = DBUS_ERROR_INIT; GnomeKeyringResult res; gboolean was_keyring; gboolean no_such_object; gboolean unknown_method; g_assert (op); g_assert (reply); was_keyring = op->was_keyring; op->was_keyring = FALSE; if (dbus_set_error_...
false
false
false
false
false
0
sumChildrenLength(GraphView const *gv) { vector<StochasticNode const *> const &children = gv->stochasticChildren(); unsigned int N = 0; for (unsigned int i = 0; i < children.size(); ++i) { N += children[i]->length(); } return N; }
false
false
false
false
false
0
insertedIntoDocument() { HTMLElementImpl::insertedIntoDocument(); assert(!m_cachedScript); if (m_createdByParser) return; DOMString url = getAttribute(ATTR_SRC).string(); if (!url.isEmpty()) { loadFromUrl(url); return; } // If there's an empty script node, we shou...
false
false
false
false
false
0
afr_mark_sources (xlator_t *this, int32_t *sources, int32_t **pending_matrix, struct iatt *bufs, afr_self_heal_type type, int32_t *success_children, int32_t *subvol_status) { /* stores the 'characters' (innocent, fool, wise) of the nodes */ afr_node_character *charact...
false
false
false
false
false
0
gimple_gen_edge_profiler (int edgeno, edge e) { tree ref, one; gimple stmt1, stmt2, stmt3; /* We share one temporary variable declaration per function. This gets re-set in tree_profiling. */ if (gcov_type_tmp_var == NULL_TREE) gcov_type_tmp_var = create_tmp_reg (gcov_type_node, "PROF_edge_counter");...
false
false
false
false
false
0
eci_last_string_list_item_r(eci_handle_t ptr, int n) { struct eci_internal* eci_rep = (struct eci_internal*)ptr; struct eci_los_list* i; int count = 0; eci_impl_check_handle(eci_rep); for(i = eci_rep->parser_repp->last_los_repp; i != NULL; i = i->next_repp) { if (count++ == n) { ret...
false
false
false
false
false
0
displaySlice(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, GBool printing, Catalog *catalog, GBool (*abortCheckCbk)(void *data), void *abortCheckCbkData, GBool (*annotDisplayDecideCbk)(Annot *an...
false
false
false
false
false
0
loopback_enable(MGSLPC_INFO *info) { unsigned char val; /* CCR1:02..00 CM[2..0] Clock Mode = 111 (clock mode 7) */ val = read_reg(info, CHA + CCR1) | (BIT2 | BIT1 | BIT0); write_reg(info, CHA + CCR1, val); /* CCR2:04 SSEL Clock source select, 1=submode b */ val = read_reg(info, CHA + CCR2) | (BIT4 | BIT5); wr...
false
false
false
false
false
0
ins_compl_set_original_text(str) char_u *str; { char_u *p; /* Replace the original text entry. */ if (compl_first_match->cp_flags & ORIGINAL_TEXT) /* safety check */ { p = vim_strsave(str); if (p != NULL) { vim_free(compl_first_match->cp_str); compl_first_match->cp_str = p; } } }
false
false
false
false
false
0
save_gain_values(lame_internal_flags * gfc) { SessionConfig_t const *const cfg = &gfc->cfg; RpgStateVar_t const *const rsv = &gfc->sv_rpg; RpgResult_t *const rov = &gfc->ov_rpg; /* save the ReplayGain value */ if (cfg->findReplayGain) { FLOAT const RadioGain = (FLOAT) GetTitleGain(rsv->rgdat...
false
false
false
false
false
0
asyncQueueIsFull(void) { int nexthead; int boundary; /* * The queue is full if creating a new head page would create a page that * logically precedes the current global tail pointer, ie, the head * pointer would wrap around compared to the tail. We cannot create such * a head page for fear of confusing ...
false
false
false
false
false
0
ttusb_dec_setup_urbs(struct ttusb_dec *dec) { int i, j, buffer_offset = 0; dprintk("%s\n", __func__); for (i = 0; i < ISO_BUF_COUNT; i++) { int frame_offset = 0; struct urb *urb = dec->iso_urb[i]; urb->dev = dec->udev; urb->context = dec; urb->complete = ttusb_dec_process_urb; urb->pipe = dec->in_pipe...
false
false
false
false
false
0
brcms_ops_stop(struct ieee80211_hw *hw) { struct brcms_info *wl = hw->priv; int status; ieee80211_stop_queues(hw); if (wl->wlc == NULL) return; spin_lock_bh(&wl->lock); status = brcms_c_chipmatch(wl->wlc->hw->d11core); spin_unlock_bh(&wl->lock); if (!status) { brcms_err(wl->wlc->hw->d11core, "wl: br...
false
false
false
false
false
0
store_next_rr(struct queue_ent *qe, struct callattempt *outgoing) { struct callattempt *best = find_best(outgoing); if (best) { /* Ring just the best channel */ ast_debug(1, "Next is '%s' with metric %d\n", best->interface, best->metric); qe->parent->rrpos = best->metric % 1000; } else { /* Just increment r...
false
false
false
false
false
0
GetMaxRatingDifference() const { // this is for stupid people who can't use brain and set max rating difference to 0 uint32 diff = sWorld.getConfig(CONFIG_UINT32_ARENA_MAX_RATING_DIFFERENCE); if (diff == 0) diff = 5000; return diff; }
false
false
false
false
false
0
vmd_probe(AVProbeData *p) { /* check if the first 2 bytes of the file contain the appropriate size * of a VMD header chunk */ if (AV_RL16(&p->buf[0]) != VMD_HEADER_SIZE - 2) return 0; /* only return half certainty since this check is a bit sketchy */ return AVPROBE_SCORE_MAX / 2; }
false
false
false
false
false
0
__talloc_strlendup_append(char *s, size_t slen, const char *a, size_t alen) { char *ret; ret = talloc_realloc(NULL, s, char, slen + alen + 1); if (unlikely(!ret)) return NULL; /* append the string and the trailing \0 */ memcpy(&ret[slen], a, alen); ret[slen+alen] = 0; _talloc_set_name_const(ret, re...
false
false
false
false
false
0
readit(struct testcase *test, struct tftphdr **dpp, int convert /* if true, convert to ascii */) { struct bf *b; bfs[current].counter = BF_FREE; /* free old one */ current = !current; /* "incr" current */ b = &bfs[current]; /* look at new buffer */ if (b->counter =...
false
false
false
false
false
0
Decompress( CByteArray * src, CByteArray * dst ) { bool res = false; int i; unsigned int outlen = src->Size(); if ( (!src) || (!dst) || (src->Size() == 0) ) { return res; } while ( true ) { if ( outlen < (50 * 1024 * 1024) ) { outlen *= 10; } else { outlen += (50 * 1024 * 1024); } // ...
false
false
false
false
false
0
Hamming(float *wave, int framesize, MFCCWork *w) { int i; #ifdef MFCC_SINCOS_TABLE for(i = 1; i <= framesize; i++) wave[i] *= w->costbl_hamming[i-1]; #else float a; a = 2 * PI / (framesize - 1); for(i = 1; i <= framesize; i++) wave[i] *= 0.54 - 0.46 * cos(a * (i - 1)); #endif }
false
false
false
false
false
0
gt_block_get_range_ptr(const GtBlock *block) { gt_assert(block); return (GtRange*) &(block->range); }
false
false
false
false
false
0
gnm_cell_get_entered_text (GnmCell const *cell) { GnmValue const *v; Sheet *sheet; g_return_val_if_fail (cell != NULL, NULL); sheet = cell->base.sheet; if (gnm_cell_has_expr (cell)) { GnmParsePos pp; GnmConventionsOut out; out.accum = g_string_new ("="); out.pp = parse_pos_init_cell (&pp, cell); out....
false
false
false
false
false
0
octeon_mdiobus_probe(struct platform_device *pdev) { struct cavium_mdiobus *bus; struct resource *res_mem; resource_size_t mdio_phys; resource_size_t regsize; union cvmx_smix_en smi_en; int err = -ENOENT; bus = devm_kzalloc(&pdev->dev, sizeof(*bus), GFP_KERNEL); if (!bus) return -ENOMEM; res_mem = platform...
false
false
false
false
false
0
add_insn (insn) rtx insn; { PREV_INSN (insn) = last_insn; NEXT_INSN (insn) = 0; if (NULL != last_insn) NEXT_INSN (last_insn) = insn; if (NULL == first_insn) first_insn = insn; last_insn = insn; }
false
false
false
false
false
0
gst_rtp_jpeg_depay_reset (GstRtpJPEGDepay * depay) { gint i; depay->width = 0; depay->height = 0; depay->media_width = 0; depay->media_height = 0; depay->frate_num = 0; depay->frate_denom = 1; depay->discont = TRUE; for (i = 0; i < 255; i++) { g_free (depay->qtables[i]); depay->qtables[i] = ...
false
false
false
false
false
0
auto_baud(char *buf, unsigned size_buf, struct termios *tp) { int speed; int vmin; unsigned iflag; char *bp; int nread; /* * This works only if the modem produces its status code AFTER raising * the DCD line, and if the computer is fast enough to set the proper * baud rate before the message has gone by. W...
false
false
false
false
false
0
MPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int /* recvcount */, MPI_Datatype /* recvtype */, MPI_Comm /* comm */) { int n = 0; if (sendtype == MPI_INT) n = sendcount*sizeof(int); else if (sendtype == MPI_FLOAT) n = sendcount*sizeof(float); else if (sendtype =...
false
false
false
false
false
0
catch_spy(int spyPlace, int spyPlacePara) { int nationRecno, totalPop; if( spyPlace == SPY_TOWN ) { Town* townPtr = town_array[spyPlacePara]; nationRecno = townPtr->nation_recno; totalPop = townPtr->population; } else if( spyPlace == SPY_FIRM ) { Firm* firmPtr = firm_array[spyPlacePara]; nationRec...
false
false
false
false
false
0
ky_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 Caiman Islands. */ { register int day; ptr_cc_id ...
false
false
false
false
false
0
PyFFLayer_NLTransform(PyFF_Layer *self, PyObject *args) { char *xexpr, *yexpr; SplineSet *ss; if ( !PyArg_ParseTuple(args,"ss", &xexpr, &yexpr ) ) return( NULL ); ss = SSFromLayer(self); if ( ss==NULL ) Py_RETURN( self ); if ( !SSNLTrans(ss,xexpr,yexpr) ) { PyErr_Format(PyExc_TypeError, "Unp...
false
false
false
false
false
0
acpi_processor_get_throttling(struct acpi_processor *pr) { cpumask_var_t saved_mask; int ret; if (!pr) return -EINVAL; if (!pr->flags.throttling) return -ENODEV; if (!alloc_cpumask_var(&saved_mask, GFP_KERNEL)) return -ENOMEM; /* * Migrate task to the cpu pointed by pr. */ cpumask_copy(saved_mask, ...
false
false
false
false
false
0
d_new_by_frags(VALUE klass, VALUE hash, VALUE sg) { VALUE jd; if (!c_valid_start_p(NUM2DBL(sg))) { sg = INT2FIX(DEFAULT_SG); rb_warning("invalid start is ignored"); } if (NIL_P(hash)) rb_raise(rb_eArgError, "invalid date"); if (NIL_P(ref_hash("jd")) && NIL_P(ref_hash("yday")) && !NIL_P(ref_h...
false
false
false
false
false
0
_master_send_finish(const struct fds *master) { struct comm_finfo ci = {-1, -1, -1, -1, -1, -1, 0}; if (write(master->w, &ci, sizeof(ci)) < 0) { perror("write"); return -1; } return 0; }
false
false
false
false
false
0
new_omp_context (enum omp_region_type region_type) { struct gimplify_omp_ctx *c; c = XCNEW (struct gimplify_omp_ctx); c->outer_context = gimplify_omp_ctxp; c->variables = splay_tree_new (splay_tree_compare_decl_uid, 0, 0); c->privatized_types = pointer_set_create (); c->location = input_location; c->regi...
false
false
false
false
false
0
scope_callback(Widget w, XtPointer client_data, XtPointer call_data) { SearchScope scope = (SearchScope)client_data; if (global.busy || scope == search_scope) return; set_scope_toggle(search_scope, False); search_scope = scope; set_scope_toggle(search_scope, True); }
false
false
false
false
false
0
inf_text_gtk_buffer_buffer_create_iter(InfTextBuffer* buffer) { InfTextGtkBufferPrivate* priv; InfTextBufferIter* iter; priv = INF_TEXT_GTK_BUFFER_PRIVATE(buffer); if(gtk_text_buffer_get_char_count(priv->buffer) == 0) { return NULL; } else { iter = g_slice_new(InfTextBufferIter); gtk_text_...
false
false
false
false
false
0
ProcessMessages() { uint size = GetGroup().Count(); QByteArray cleartext(_expected_bulk_size, 0); // Check user commits QVector<int> bad_users; CheckCommits(_user_commits, _user_message_digests, bad_users); if(bad_users.count()) { AddBadMembers(bad_users); FoundBadMembers(); ...
false
false
false
false
false
0
connect_cb_new(struct gateway *gw, gateway_stream_cb_t func, void *user_data) { struct connect_cb *cb; static unsigned int free_cb_id = 1; if (!func) return 0; cb = g_new(struct connect_cb, 1); cb->cb = func; cb->cb_data = user_data; cb->id = free_cb_id++; gw->callbacks = g_slist_append(gw->call...
false
false
false
false
false
0
dlm_device_deregister(struct dlm_ls *ls) { /* The device is not registered. This happens when the lockspace was never used from userspace, or when device_create_lockspace() calls dlm_release_lockspace() after the register fails. */ if (!ls->ls_device.name) return 0; misc_deregister(&ls->ls_device); kfre...
false
false
false
false
false
0
network_write_chunkqueue(server *srv, connection *con, chunkqueue *cq) { int ret = -1; off_t written = 0; #ifdef TCP_CORK int corked = 0; #endif server_socket *srv_socket = con->srv_socket; if (con->conf.global_kbytes_per_second && *(con->conf.global_bytes_per_second_cnt_ptr) > con->conf.global_kbytes_per_se...
false
false
false
false
false
0
_gcr_record_get_date (GcrRecord *record, guint column) { const gchar *raw; gulong result; gchar *end = NULL; struct tm tm; g_return_val_if_fail (record, NULL); raw = _gcr_record_get_raw (record, column); if (raw == NULL) return NULL; /* Try to parse as a number */ result = strtoul (r...
false
false
false
false
false
0
WriteBits( const unsigned char* inByteArray, BitSize_t numberOfBitsToWrite, const bool rightAlignedBits ) { // if (numberOfBitsToWrite<=0) // return; AddBitsAndReallocate( numberOfBitsToWrite ); const BitSize_t numberOfBitsUsedMod8 = numberOfBitsUsed & 7; // If currently aligned and numberOfBits is a mu...
false
false
false
false
false
0
pkix_CacheCert_Add( PKIX_CertStore *store, PKIX_ComCertSelParams *certSelParams, PKIX_List* certs, void *plContext) { PKIX_List *cachedKeys = NULL; PKIX_List *cachedValues = NULL; PKIX_PL_Date *cacheValidUntilDate = NULL; PKIX_PL_X500Name *subject = NULL; ...
false
false
false
false
false
0
regprocout(PG_FUNCTION_ARGS) { RegProcedure proid = PG_GETARG_OID(0); char *result; HeapTuple proctup; if (proid == InvalidOid) { result = pstrdup("-"); PG_RETURN_CSTRING(result); } proctup = SearchSysCache1(PROCOID, ObjectIdGetDatum(proid)); if (HeapTupleIsValid(proctup)) { Form_pg_proc procform =...
false
false
false
false
false
0
_format_comment (pstdout_state_t pstate, char *in, char *out, unsigned int outsize) { char *inbuf = NULL; char *tokbuf; char *tok; int linelen = 0; int totalwritten = 0; int rv = -1; assert (in); assert (out); assert (outsize); if (!(inbuf = strdu...
false
true
true
false
false
1
ferode_1_39(l_uint32 *datad, l_int32 w, l_int32 h, l_int32 wpld, l_uint32 *datas, l_int32 wpls) { l_int32 i; register l_int32 j, pwpls; register l_uint32 *sptr, *dptr; l_int32 wpls2, wpls3, wpls4; l_int32 w...
false
false
false
false
false
0
unuse() { if (_refcount.dec_and_test()) delete this; }
false
false
false
false
false
0
flimage_add_text_struct( FL_IMAGE * im, const FLIMAGE_TEXT * txt ) { FLIMAGE_TEXT *text; if ( ! txt || ! im || ! txt->str ) return -1; if ( txt->len <= 0 ) { flimage_error( im, "AddTextStruct: bad text length (%d)", txt->len ); return -1; ...
false
true
false
false
false
1
lgdt330x_attach(const struct lgdt330x_config* config, struct i2c_adapter* i2c) { struct lgdt330x_state* state = NULL; u8 buf[1]; /* Allocate memory for the internal state */ state = kzalloc(sizeof(struct lgdt330x_state), GFP_KERNEL); if (state == NULL) goto error; /* Setup the state */ state->config...
false
false
false
false
false
0
LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval) { PGPROC *proc = MyProc; int extraWaits = 0; bool result = false; #ifdef LWLOCK_STATS lwlock_stats *lwstats; lwstats = get_lwlock_stats_entry(lock); #endif PRINT_LWDEBUG("LWLockWaitForVar", lock, LW_WAIT_UNTIL_FREE); /* * Lo...
false
false
false
false
false
0
prop(const QString & p) { if (m_modelPart == NULL) return ""; return m_modelPart->localProp(p).toString(); }
false
false
false
false
false
0
fxPan(float pan, float vol, Uint8 *buf, int len) { int i; float left_vol = - vol * ( -1.0f + pan ) / 2.0f; float right_vol = vol * ( 1.0f + pan ) / 2.0f; for(i = 0; i < len; i += 4) { *(Sint16*) (buf + i) = // *= left_vol (Sint16) (left_vol * *(Sint16*) (buf + i) ); *(Sint16*) (buf + i + 2) = /...
false
false
false
false
false
0
common_neighbors(vtx_data * graph, int v, int u, int *v_vector) { /* count number of common neighbors of 'v' and 'u' */ int neighbor; int num_shared_neighbors = 0; int j; for (j = 1; j < graph[u].nedges; j++) { neighbor = graph[u].edges[j]; if (v_vector[neighbor] > 0) { /* a shared neighobr *...
false
false
false
false
false
0
increment(void) { if (MSView::model()!=0) { if ((unsigned)value() <= UINT_MAX - (unsigned)incrementValue()) // prevent overflow { if (maximumValue().isSet()==MSTrue) { unsigned anUnsigned=value(); anUnsigned+=(unsigned)incrementValue(); if (anUnsigned<=maxim...
false
false
false
false
false
0
_group_toggled_cb (GtkCellRendererToggle *celltoggle, gchar *path_string, GtkTreeView *treeview) { GtkTreeModel *model = NULL; GtkTreePath *path; GtkTreeIter iter; gboolean active = FALSE; g_return_if_fail (GTK_IS_TREE_VIEW (treeview)); model = gtk_tree_view_get_model...
false
false
false
false
false
0
clear_sources(struct sources_element sources) { struct stack_element *p, *tail; int act, i; for (act = sources.root; act != NIL; act = sources.list[act]) { for (p = sources.configs[act]; p != NULL; tail = p, p = p -> next) ; free_stack_elemen...
false
false
false
false
true
1
openssl_locking_callback(int mode, int type, char * /*file*/, int /*line*/) { if (mode & CRYPTO_LOCK) { pOpenSSLMutexes[type].lock(); } else { pOpenSSLMutexes[type].unlock(); } }
false
false
false
false
false
0
l1sp_rdsexp(g) l1sp_ctx *g; { L1SP_PROT2_DECL(g); l1sp *la, *r; int ch; g->l1_ch=readc(g); la=r=g->l1_nil; l1sp_prot2(g, la, r); for(;;) { switch(ch=next(g, &la)) { case -1: l1sp_unprot2(g); return l1sp_nreverse(g->l1_nil, r); case '(': r=l1sp_cons(g, form(g, &la), r); ...
false
false
false
false
false
0
drawPoint(int x, int y, unsigned long color, double intensity, Display *dpy, Window window, GC fgc, struct field *f) { unsigned long c; while ( x >= f->width ) x -= f->width; while ( x < 0 ) x += f->width; while ( y >= f->height ) y -= f->height; while ( y < 0 ) y += f->height; ...
false
false
false
false
false
0
print_usage(char *progname, struct enh_options *eo, char *userparams) { int i; fprintf(stderr,"Usage: %s ", progname); for (i=0; i<length; i++){ fprintf(stderr,"[-"); if (eo[i].shorto ) fprintf(stderr,"%c",eo[i].shorto); else fprintf(stderr,"-%s",eo[i].longo); if ( eo[i].has_arg ){ if( eo[i].type ...
false
false
false
false
false
0
ectr_subcell_weak_ref (GalA11yECellTree *a11y, GalA11yECell *subcell_a11y) { ECellView *subcell_view = subcell_a11y ? subcell_a11y->cell_view : NULL; if (subcell_a11y && subcell_view && subcell_view->kill_view_cb_data) subcell_view->kill_view_cb_data = g_list_remove (subcell_view->kill_vie...
false
false
false
false
false
0
isMaybeZeroSizedType(const Type *Ty) { if (Ty->isOpaqueTy()) return true; // Can't say. if (const StructType *STy = dyn_cast<StructType>(Ty)) { // If all of elements have zero size, this does too. for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) if (!isMaybeZeroSizedType(STy->getElementT...
false
false
false
false
false
0
findMonitor (Object *obj) { monitorCacheLock.lock() ; Monitor *mon = NULL ; MonitorMap::iterator m = monitorCache.find (obj) ; if (m != monitorCache.end()) { mon = (*m).second ; } else { if (!monitorFreeList.empty()) { MonitorFreeList::iterator f = monitorFreeList.begin()...
false
false
false
false
false
0
IsNonPolarHydrogen() { if (!IsHydrogen()) return(false); OBAtom *atom; OBBond *bond; OBBondIterator i; for (bond = BeginBond(i);bond;bond = NextBond(i)) { atom = bond->GetNbrAtom(this); if (atom->GetAtomicNum() == 6) return(true); } return(false); ...
false
false
false
false
false
0
notify(AV_View * pView, const AV_ChangeMask mask) { // Handle AV_Listener events on the view. UT_DEBUG_ONLY_ARG(pView); UT_ASSERT(pView==m_pView); FV_View * pVView = static_cast<FV_View *>(m_pView); if(pVView->getDocument() == NULL) { return false; } // If the caret has moved to a different page or any of ...
false
false
false
false
false
0
self_promoting_args_p (parms) tree parms; { tree t; for (t = parms; t; t = TREE_CHAIN (t)) { tree type = TREE_VALUE (t); if (TREE_CHAIN (t) == 0 && type != void_type_node) return 0; if (type == 0) return 0; if (TYPE_MAIN_VARIANT (type) == float_type_node) return 0; if (...
false
false
false
false
false
0
main(int argc, char **argv) { l_int32 i, n, rsize, fact1, fact2, extra; l_int32 size, lastsize; l_int32 dwasize[256]; l_int32 ropsize[256]; PIX *pixs, *pixt1, *pixt2, *pixt3, *pixt4, *pixt5, *pixt6; pixs = pixRead("feyn.tif"); #if TEST_SYMMETRIC /* This works properly if there's an add...
false
false
false
false
false
0
vbo_exec_do_EvalCoord1f(struct vbo_exec_context *exec, GLfloat u) { GLuint attr; for (attr = 1; attr <= VBO_ATTRIB_TEX7; attr++) { struct gl_1d_map *map = exec->eval.map1[attr].map; if (map) { GLfloat uu = (u - map->u1) * map->du; GLfloat data[4]; ASSIGN_4V(data, 0, 0, 0, 1); _math_horner_b...
false
false
false
false
false
0
Module_free(Module** m) { assert(m != NULL); if (m == NULL) { return; } assert((*m) != NULL); if ((*m) == NULL) { return; } Module_releaseModule(*m); if ((*m)->fileName) { free((*m)->fileName); (*m)->fileName = NULL; } free((*m)); (*m) = NULL; }
false
false
false
false
false
0
FromString(const string& str) { Prefilter* m = new Prefilter(Prefilter::ATOM); m->atom_ = str; return m; }
false
false
false
false
false
0
unity_internal_scope_tracker_push_wrapper_data_free (gpointer _data) { UnityInternalScopeTrackerPushWrapperData* _data_; _data_ = _data; _g_object_unref0 (_data_->parent_channel); _g_free0 (_data_->search_string); _g_free0 (_data_->master_scope_id); _g_free0 (_data_->scope_id); _g_object_unref0 (_data_->results_...
false
false
false
false
false
0
dsr_change(MGSLPC_INFO *info) { get_signals(info); if ((info->dsr_chkcount)++ >= IO_PIN_SHUTDOWN_LIMIT) port_irq_disable(info, PVR_DSR); info->icount.dsr++; if (info->serial_signals & SerialSignal_DSR) info->input_signal_events.dsr_up++; else info->input_signal_events.dsr_down++; wake_up_interruptible(&info...
false
false
false
false
false
0
write_header() { char header[IGO8_HEADER_SIZE] = {'\0'}; igo8_id_block tmp_id_block; p_igo8_id_block id_block = (p_igo8_id_block)header; gbuint32 current_position = 0; const char* title = "Title"; const char* description = "Description"; // These values seem to be constant for me, but I have no idea what...
true
true
false
false
true
1
use_skill(skill,degree) int skill; int degree; { boolean advance_before; if (skill != P_NONE && !P_RESTRICTED(skill)) { advance_before = can_advance(skill, FALSE); P_ADVANCE(skill)+=degree; if (!advance_before && can_advance(skill, FALSE)) give_may_advance_msg(skill); } }
false
false
false
false
false
0
updateDDIntern() { #if HOT_ALIGN int xkreuz; neuDraw() = DrawDing(mName, mAccIndex, subbereich_default, 0, mHoehe/2, AlignRight, NULL, NULL, &xkreuz); xkreuz += L_datensep; #else neuDraw() = DrawDing(mName, mAccIndex, subbereich_default, 0, mHoehe/2, AlignRight); int xkreuz = x+L_datensep; #...
false
false
false
false
false
0
send_scan_param (pixma_t * s) { iclass_t *mf = (iclass_t *) s->subdriver; uint8_t *data; data = pixma_newcmd (&mf->cb, cmd_scan_param, 0x2e, 0); pixma_set_be16 (s->param->xdpi | 0x1000, data + 0x04); pixma_set_be16 (s->param->ydpi | 0x1000, data + 0x06); pixma_set_be32 (s->param->x, data + 0x08); pixma_s...
false
false
false
false
false
0
visu_plane_class_getVisibility(VisuPlane **listOfVisuPlanes, float point[3]) { int i; float pScal; gboolean visibility; visibility = (plane_hidingMode == VISU_PLANE_HIDE_UNION) || !listOfVisuPlanes[0]; for (i = 0; listOfVisuPlanes[i]; i++) { pScal = listOfVisuPlanes[i]->nVect[0] * point[0] + list...
false
false
false
false
false
0
isl_schedule_node_foreach_ancestor_top_down( __isl_keep isl_schedule_node *node, int (*fn)(__isl_keep isl_schedule_node *node, void *user), void *user) { int i, n; if (!node) return -1; n = isl_schedule_node_get_tree_depth(node); for (i = 0; i < n; ++i) { isl_schedule_node *ancestor; int r; ancestor = ...
false
false
false
false
false
0
gnapplet_sms_message_read_nv(gn_data *data, struct gn_statemachine *state) { REQUEST_DEF; if (!data->raw_sms) return GN_ERR_INTERNALERROR; pkt_put_uint16(&pkt, GNAPPLET_MSG_SMS_MESSAGE_READ_REQ); pkt_put_uint16(&pkt, data->raw_sms->memory_type); pkt_put_uint32(&pkt, data->raw_sms->number); SEND_MESSAGE_BLOCK(G...
false
false
false
false
false
0
P_Widget_Subclassp (Object w, Object c) { Check_Widget (w); Check_Type (c, T_Class); return XtIsSubclass (WIDGET(w)->widget, CLASS(c)->wclass) ? True : False; }
false
false
false
false
false
0
psum1(char *fn, uint32_t val, off_t len) { (void)printf("%lu %jd", (u_long)val, (intmax_t)(len + 1023) / 1024); if (fn != NULL) (void)printf(" %s", fn); (void)printf("\n"); }
false
false
false
false
false
0
dm_stat_for_entry(struct dm_stat *s, size_t entry, unsigned long bi_rw, sector_t len, struct dm_stats_aux *stats_aux, bool end, unsigned long duration_jiffies) { unsigned long idx = bi_rw & REQ_WRITE; struct dm_stat_shared *shared = &s->stat_shared[entry]; struct dm_stat_percpu *p; /* ...
false
false
false
false
false
0
date_object_new_timezone_ex(zend_class_entry *class_type, php_timezone_obj **ptr TSRMLS_DC) { php_timezone_obj *intern; zend_object_value retval; zval *tmp; intern = emalloc(sizeof(php_timezone_obj)); memset(intern, 0, sizeof(php_timezone_obj)); if (ptr) { *ptr = intern; } zend_object_std_init(&intern->std,...
false
false
false
false
false
0
next_att(const char *buf) { while (!isspace(*buf) && !isnull(*buf)) buf++; if (isnull(*buf) || isnull(*(buf + 1))) return NULL; else while (isspace(*(buf + 1)) && !isnull(*(buf + 1))) buf++; buf++; return (char *)buf; }
false
false
false
false
false
0
HandleSequence(EventHandler& eventHandler) { // split based on start token switch(m_scanner.peek().type) { case Token::BLOCK_SEQ_START: HandleBlockSequence(eventHandler); break; case Token::FLOW_SEQ_START: HandleFlowSequence(eventHandler); break; default: break; } }
false
false
false
false
false
0
gee_hazard_pointer_context_free (GeeHazardPointerContext* self) { gint size = 0; GeeArrayList* _tmp0_ = NULL; gint _tmp1_ = 0; gint _tmp2_ = 0; gboolean clean_parent = FALSE; gint _tmp3_ = 0; GeeHazardPointerContext* _tmp18_ = NULL; gboolean _tmp19_ = FALSE; _tmp0_ = self->_to_free; _tmp1_ = gee_abstract_coll...
false
false
false
false
false
0
ldns_dnssec_zone_deep_free(ldns_dnssec_zone *zone) { if (zone) { if (zone->names) { /* destroy all name structures within the tree */ ldns_traverse_postorder(zone->names, ldns_dnssec_name_node_deep_free, NULL); LDNS_FREE(zone->names); } LDNS_FREE(zone); } }
false
false
false
false
false
0
xasprintf(char ** s, const char * template, ...) { va_list a; va_start(a, template); int result = vasprintf(s, template, a); va_end(a); if (result < 0) { fatal("out of memory"); } return result; }
false
false
false
false
false
0
requestAssociation(DUL_NETWORKKEY ** network, DUL_ASSOCIATIONKEY ** association, DUL_ASSOCIATESERVICEPARAMETERS * params, char **SOPClasses, int classCount) { CONDITION cond; while (classCount-- > 0) { cond = SRV_RequestServiceClass(*SOPClasses++, DUL_SC_ROLE_DEFAULT, params); if (cond != SR...
false
false
false
false
false
0
init(const fr_args & args) { if (args.root_dir != NULL) this_dir = args.root_dir; else this_dir = "/var/tmp"; const char * path = this_dir.c_str(); (void) FT_IO_NS ff_mkdir(path); this_dir += "/fstransform"; path = this_dir.c_str(); (void) FT_IO_NS ff_mkdir(path); ...
false
false
false
false
true
1
setLineSpace(icp, value, len, order, nest, op) IMIC *icp; char *value; int len; int order; int nest; int op; { IMPSAttributes *ap; int line_space; TRACE(("imlib:setLineSpace()\n")); CHECK_ICATTR_SIZE(2, IMBadSomething); if ((ap = getPSPtr(icp, nest)) == NULL) { unnestedError(icp); return -1; ...
false
false
false
false
false
0
rwl_readtrylock(brwlock_t *rwl) { int stat, stat2; if (rwl->valid != RWLOCK_VALID) { return EINVAL; } if ((stat = pthread_mutex_lock(&rwl->mutex)) != 0) { return stat; } if (rwl->w_active) { stat = EBUSY; } else { rwl->r_active++; /* we are running */ } ...
false
false
false
false
false
0