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
gl_truncate_display(GetLine *gl) { /* * Keep a record of the current terminal cursor position. */ int term_curpos = gl->term_curpos; /* * First clear from the cursor to the end of the current input line. */ if(gl_print_control_sequence(gl, 1, gl->clear_eol)) return 1; /* * If there is more than one line di...
false
false
false
false
false
0
writeAllocateCode(Output& out, const ParamDeclList& params, const TypePtr& ret, const StringList& metaData, int typeCtx) { for(ParamDeclList::const_iterator p = params.begin(); p != params.end(); ++p) { writeParamAllocateCode(out, (*p)->type(), fixKwd((*p)->name()), (*p)->getMe...
false
false
false
false
false
0
zend_user_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC) { zend_class_entry * ce = Z_OBJCE_P(object); zval *retval; int result; zend_call_method_with_0_params(&object, ce, &ce->serialize_func, "serialize", &retval); if (!retval || EG(exception)) { resu...
false
false
false
false
false
0
proc_evict_inode(struct inode *inode) { struct proc_dir_entry *de; struct ctl_table_header *head; truncate_inode_pages_final(&inode->i_data); clear_inode(inode); /* Stop tracking associated processes */ put_pid(PROC_I(inode)->pid); /* Let go of any associated proc directory entry */ de = PDE(inode); if (de)...
false
false
false
false
false
0
mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, void *buf, int count, ompi_datatype_t *datatype, MPI_Request * request) { int ret = OMPI_SUCCESS; mca_sharedfp_base_modul...
false
false
false
false
false
0
prepare_ip6ip (packetinfo *pi) { packetinfo pipi; memset(&pipi, 0, sizeof(packetinfo)); config.pr_s.ip6ip_recv++; pipi.pheader = pi->pheader; pipi.packet = (pi->packet + pi->eth_hlen + IP6_HEADER_LEN); pipi.end_ptr = pi->end_ptr; if (pi->ip6->next == IP_PROTO_IP4) { prepare_ip4(&pipi...
false
false
false
false
false
0
AbsV(TVector x, TVector y) { if (!y) { dw_Error(NULL_ERR); return (TVector)NULL; } if (!x) { if (!(x=CreateVector(DimV(y)))) return (TVector)NULL; } else if (DimV(x) != DimV(y)) { dw_Error(SIZE_ERR); return (TVector)NULL; } bAbs(pElementV(x...
false
false
false
false
false
0
flush_echoes(struct tty_struct *tty) { struct n_tty_data *ldata = tty->disc_data; if ((!L_ECHO(tty) && !L_ECHONL(tty)) || ldata->echo_commit == ldata->echo_head) return; mutex_lock(&ldata->output_lock); ldata->echo_commit = ldata->echo_head; __process_echoes(tty); mutex_unlock(&ldata->output_lock); }
false
false
false
false
false
0
snd_tlv_convert_to_dB(unsigned int *tlv, long rangemin, long rangemax, long volume, long *db_gain) { switch (tlv[0]) { case SND_CTL_TLVT_DB_RANGE: { unsigned int pos, len; len = int_index(tlv[1]); if (len > MAX_TLV_RANGE_SIZE) return -EINVAL; pos = 2; while (pos + 4 <= len) { rangemin = (int)tlv[...
false
false
false
false
false
0
lremCommand(redisClient *c) { robj *subject, *obj; obj = c->argv[3] = tryObjectEncoding(c->argv[3]); int toremove = atoi(c->argv[2]->ptr); int removed = 0; listTypeEntry entry; subject = lookupKeyWriteOrReply(c,c->argv[1],shared.czero); if (subject == NULL || checkType(c,subject,REDIS_LIST)...
false
false
false
false
true
1
xaccTransGetVoidStatus(const Transaction *trans) { g_return_val_if_fail(trans, FALSE); return (kvp_frame_get_slot(trans->inst.kvp_data, void_reason_str) != NULL); }
false
false
false
false
false
0
supbtime_drawsprites(struct mame_bitmap *bitmap,const struct rectangle *cliprect) { int offs; for (offs = 0;offs < 0x400;offs += 4) { int x,y,sprite,colour,multi,fx,fy,inc,flash,mult; sprite = spriteram16[offs+1] & 0x3fff; if (!sprite) continue; y = spriteram16[offs]; flash=y&0x1000; if (...
false
false
false
false
false
0
cr_utils_dup_glist_of_string (GList * a_list_of_strings) { GList *cur = NULL, *result = NULL; g_return_val_if_fail (a_list_of_strings, NULL); for (cur = a_list_of_strings; cur; cur = cur->next) { GString *str = NULL; str = g_string_new_len (((GS...
false
false
false
false
false
0
iconsel_gt48_toggled(GtkToggleButton *chk, icon_selection_t *iconsel) { g_assert((chk != NULL) && (iconsel != NULL)); g_assert(iconsel->apwal->iconsel_pref); TRACE("%s", ""); iconsel->apwal->iconsel_pref->select_gt48 = gtk_toggle_button_get_active(chk); TRACE("bool:%d", iconse...
false
false
false
false
false
0
rdma_supported(const struct cxgb4_lld_info *infop) { return infop->vr->stag.size > 0 && infop->vr->pbl.size > 0 && infop->vr->rq.size > 0 && infop->vr->qp.size > 0 && infop->vr->cq.size > 0; }
false
false
false
false
false
0
IFN_Right_Character(FORM *form) { int amount = myWCWIDTH(form->w, form->currow, form->curcol); int oldcol = form->curcol; T((T_CALLED("IFN_Right_Character(%p)"), form)); if ((form->curcol += amount) >= form->current->dcols) { #if GROW_IF_NAVIGATE FIELD *field = form->current; if (Single_Line_F...
false
false
false
false
false
0
function_stat_show(struct seq_file *m, void *v) { struct ftrace_profile *rec = v; char str[KSYM_SYMBOL_LEN]; int ret = 0; #ifdef CONFIG_FUNCTION_GRAPH_TRACER static struct trace_seq s; unsigned long long avg; unsigned long long stddev; #endif mutex_lock(&ftrace_profile_lock); /* we raced with function_profile_...
false
false
false
false
false
0
gth_image_get_pixbuf_animation (GthImage *image) { GdkPixbufAnimation *result = NULL; switch (image->priv->format) { case GTH_IMAGE_FORMAT_CAIRO_SURFACE: if (image->priv->data.surface != NULL) { GdkPixbuf *pixbuf; pixbuf = _gdk_pixbuf_new_from_cairo_surface (image->priv->data.surface); result = gdk_pixb...
false
false
false
false
false
0
preparetitle(char *title) { char *cut; cut=strchr(title, '\r'); if (!cut) cut=strchr(title, '\n'); if (cut) { *cut = 0; log_event(CPDEBUG, "removing trailing newlines from title", title); } if (conf.decodehexstrings) { log_event(CPSTATUS, "***Experimental Option: DecodeHexStrings", NULL);...
false
false
false
false
false
0
SetUseAtomForStereo( S_CHAR *bAtomUsedForStereo, sp_ATOM *at, int num_atoms ) { int i, k; memset( bAtomUsedForStereo, 0, sizeof( bAtomUsedForStereo[0] )*num_atoms ); for ( i = 0; i < num_atoms; i ++ ) { if ( at[i].parity ) { for ( k = 0; k < MAX_NUM_STEREO_BONDS && at[i].stereo_bond_neig...
false
false
false
false
false
0
add_one_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data) { struct object *object = parse_object(sha1); struct rev_info *revs = (struct rev_info *)cb_data; if (!object) die("bad object ref: %s:%s", path, sha1_to_hex(sha1)); add_pending_object(revs, object, ""); return 0; }
false
false
false
false
false
0
make_offset_code_tree(HUFF_TREE *huff_tree, HUFF_ELEMENT *element, uint *offset) { uint *prev_offset; prev_offset= offset; /* 'a.leaf.null' takes the same place as 'a.nod.left'. If this is null, then there is no left child and, hence no right child either. This is a property of a binary tree. ...
false
false
false
false
false
0
match_one(const char *match, const char *name, int namelen) { int matchlen; /* If the match was just the prefix, we matched */ if (!*match) return MATCHED_RECURSIVELY; for (;;) { unsigned char c1 = *match; unsigned char c2 = *name; if (isspecial(c1)) break; if (c1 != c2) return 0; match++; nam...
false
false
false
false
false
0
DtsGetFirmwareFiles(DTS_LIB_CONTEXT *Ctx) { int fwfile_len; char fwfile[MAX_PATH + 1]; char fwfilepath[MAX_PATH + 1]; #ifndef __APPLE__ const char fwdir[] = "/lib/firmware/"; #else const char fwdir[] = "/usr/lib/"; #endif if(Ctx->DevId == BC_PCI_DEVID_FLEA) { fwfile_len = strlen(FWBINFILE_70015); ...
true
true
false
false
false
1
arithmetic_op_16(byte opcode, Register reg, Register rm_reg) { EnsureSpace ensure_space(this); ASSERT((opcode & 0xC6) == 2); if (rm_reg.low_bits() == 4) { // Forces SIB byte. // Swap reg and rm_reg and change opcode operand order. emit(0x66); emit_optional_rex_32(rm_reg, reg); emit(opcode ^ 0x02)...
false
false
false
false
false
0
CPLSetConfigOption( const char *pszKey, const char *pszValue ) { #ifdef DEBUG_CONFIG_OPTIONS CPLAccessConfigOption(pszKey, FALSE); #endif CPLMutexHolderD( &hConfigMutex ); papszConfigOptions = (volatile char **) CSLSetNameValue( (char **) papszConfigOptions, pszKey, pszValue ); }
false
false
false
false
false
0
destroyAdvancedTexture( const String& sTextureName, const String& groupName ) { TextureSystemList::iterator i; for( i = mTextureSystems.begin(); i != mTextureSystems.end(); ++i ) { //Broadcast to every registered System... Only the true one will destroy texture ...
false
false
false
false
false
0
hybrid_module_init() { GDir *dir; const gchar *name; gchar *abs_path; HybridModule *module; hybrid_debug_info("module", "initialize module"); if ((dir = g_dir_open(MODULE_DIR, 0, NULL)) == NULL) { hybrid_debug_error("module", "open modules directory: %s", MODULE_DIR); ...
false
false
false
false
false
0
set_usym_parent (UnmanagedSymbol** cachedus, int count) { int i; for (i = 0; i < count; ++i) { UnmanagedSymbol *ubin = lookup_unmanaged_binary (cachedus [i]->addr); if (ubin == cachedus [i]) continue; cachedus [i]->parent = ubin; } }
false
false
false
false
false
0
client_init_key (FSP_LOCK *lock, unsigned long server_addr, unsigned short server_port) { mode_t omask; key_t lock_key; int fd; union semun su; struct sembuf sem; make_key_string(lock,server_addr,server_port); omask = umask(0); fd = open(lock->key_string,O_RDWR|O_CRE...
false
false
false
false
true
1
lpuart_dma_tx(struct lpuart_port *sport, unsigned long count) { struct circ_buf *xmit = &sport->port.state->xmit; dma_addr_t tx_bus_addr; dma_sync_single_for_device(sport->port.dev, sport->dma_tx_buf_bus, UART_XMIT_SIZE, DMA_TO_DEVICE); sport->dma_tx_bytes = count & ~(sport->txfifo_size - 1); tx_bus_addr = sp...
false
false
false
false
false
0
yuv422pto422(int * out,unsigned char *pic,int width) { int j, k; unsigned char *pic0, *pic1; int *outy, *outu, *outv; int outy1 = 0; int outy2 = 8; int outu1 = 0; int outv1 = 0; pic0 = pic; pic1 = pic + width; outy = out; outu = out + 64 * 4; outv = out + 64 * 5; ...
false
false
false
false
false
0
display_conn_info(struct connectdata *conn, PRFileDesc *sock) { SSLChannelInfo channel; SSLCipherSuiteInfo suite; CERTCertificate *cert; CERTCertificate *cert2; CERTCertificate *cert3; PRTime now; int i; if(SSL_GetChannelInfo(sock, &channel, sizeof channel) == SECSuccess && channel.length == sizeo...
false
false
false
false
false
0
draw_square( FL_OBJECT * ob FL_UNUSED_ARG, int Id FL_UNUSED_ARG, FL_POINT * p, int n, int w, int h ) { int w2 = w / 2, h2 = h / 2; FL_POINT *ps = p + n; if ( flx->win == None ) return; f...
false
false
false
false
false
0
__part_search(dbp, part, key, part_idp) DB *dbp; DB_PARTITION *part; DBT *key; u_int32_t *part_idp; { db_indx_t base, indx, limit; int cmp; int (*func) __P((DB *, const DBT *, const DBT *, size_t *)); size_t pos, pos_h, pos_l; DB_ASSERT(dbp->env, part->nparts != 0); COMPQUIET(cmp, 0); COMPQUIET(indx, 0); ...
false
false
false
false
false
0
acpi_rs_dump_resource_list(struct acpi_resource *resource_list) { u32 count = 0; u32 type; ACPI_FUNCTION_ENTRY(); /* Check if debug output enabled */ if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) { return; } /* Walk list and dump all resource descriptors (END_TAG terminates) */ do { acpi_o...
false
false
false
false
false
0
mouseMoveEvent( QMouseEvent *me ) { if ( me->buttons() == Qt::NoButton ) setCursor( onRing( rect(), me->pos() ) ? Qt::PointingHandCursor : Qt::ArrowCursor ); else if ( m_isClick ) me->accept(); else QDial::mouseMoveEvent( me ); }
false
false
false
false
false
0
fixup_bpf_calls(struct verifier_env *env) { struct bpf_prog *prog = env->prog; struct bpf_insn *insn = prog->insnsi; const struct bpf_func_proto *fn; const int insn_cnt = prog->len; struct bpf_insn insn_buf[16]; struct bpf_prog *new_prog; struct bpf_map *map_ptr; int i, cnt, delta = 0; for (i = 0; i < insn_cn...
false
false
false
false
false
0
dataHandlerLoadSchemaCbk(const char *data, int nLen) { if (bStopParsing) return; nDataHandlerCounter ++; if (nDataHandlerCounter >= BUFSIZ) { CPLError(CE_Failure, CPLE_AppDefined, "File probably corrupted (million laugh pattern)"); XML_StopParser(oSchemaParser, XML_FALSE); bStop...
false
false
false
false
false
0
get_assoc(char *name) { assoc_t *a; for (a = assoc; a; a = a->next) if (!egg_strcasecmp(a->name, name)) return a->channel; return -1; }
false
false
false
false
false
0
ladish_studio_jack_conf_parameter_destroy( struct jack_conf_parameter * parameter_ptr) { #if 0 log_info("jack_conf_parameter destroy"); switch (parameter_ptr->parameter.type) { case jack_boolean: log_info("%s value is %s (boolean)", parameter_ptr->name, parameter_ptr->parameter.value.boolean ? "true" : "...
false
false
false
false
false
0
uncore_change_context(struct intel_uncore_type **uncores, int old_cpu, int new_cpu) { struct intel_uncore_type *type; struct intel_uncore_pmu *pmu; struct intel_uncore_box *box; int i, j; for (i = 0; uncores[i]; i++) { type = uncores[i]; for (j = 0; j < type->num_boxes; j++) { pmu = &type->pmus[j]; if (...
false
false
false
false
false
0
ComputeCallField(int argc, Code::Kind kind, Code::ExtraICState extra_ic_state, String* name, Object* object, JSObje...
false
false
false
false
false
0
operator>>(std::istream& in, Occurrence& o) { in >> o.m_sampleRate; size_t n; in >> n; o.m_values.resize(n); for(size_t i = 0; i < n; ++i) in >> o.m_values[i]; o.m_shift = Occurrence::calculateShiftValue(o.m_sampleRate); return in; }
false
false
false
false
false
0
walk_programmers(LISTID programmers, walk_programmers_cb cb, void *cookie) { LNODEID ln1; LNODEID ln2; PROGRAMMER * p; for (ln1 = lfirst(programmers); ln1; ln1 = lnext(ln1)) { p = ldata(ln1); for (ln2=lfirst(p->id); ln2; ln2=lnext(ln2)) { cb(ldata(ln2), p->desc, p->config_file, p->lineno, cookie)...
false
false
false
false
false
0
writeLine(char *obuffer) { int ew,rem,ec,tol=0; fd_set wfd; struct timeval tv; FD_ZERO(&wfd); FD_SET(pout,&wfd); tv.tv_sec=2; tv.tv_usec=0; if (select(pout+1,0,&wfd,0,&tv)<=0) { global.debug("PipeConnection","writeLine","write would block"); close(); return; } // cerr << "writing [" ...
false
false
false
false
false
0
single_note_tuning_change(int key, float midipitch) { unsigned char kk,xx,yy,zz; int number,intfraction; float fraction; eputc(0); /* varinum delta_t (time to next event) */ eputc(0xf0); /* sysex initiation */ eputc(11); /* 11 bytes included in sysex */ eputc(127); /* universal sysex command (0x7f) */ eputc(0); /*...
false
false
false
false
false
0
sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len) /* interrupt packet length */ { int ret = -EINVAL; if (len == 1 && data[0] == 1) { input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1); input_sync(gspca_dev->input_dev); input_report_key(gspca_dev->input_dev, ...
false
false
false
false
false
0
vlv_initial_pps_pipe(struct drm_i915_private *dev_priv, enum port port, vlv_pipe_check pipe_check) { enum pipe pipe; for (pipe = PIPE_A; pipe <= PIPE_B; pipe++) { u32 port_sel = I915_READ(VLV_PIPE_PP_ON_DELAYS(pipe)) & PANEL_PORT_SELECT_MASK; if (port_sel != PANEL_PORT_SELECT_VLV(port)) cont...
false
false
false
false
false
0
Call(uc16 from, DispatchTable::Entry entry) { if (!entry.out_set()->Get(kInBase)) return; ZoneList<CharacterRange>** target = entry.out_set()->Get(kInOverlay) ? included_ : excluded_; if (*target == NULL) *target = new ZoneList<CharacterRange>(2); (*target)->Add(CharacterRange(entry.from(), entry.to()))...
false
false
false
false
false
0
rhine_ack_events(struct rhine_private *rp, u32 mask) { void __iomem *ioaddr = rp->base; if (rp->quirks & rqStatusWBRace) iowrite8(mask >> 16, ioaddr + IntrStatus2); iowrite16(mask, ioaddr + IntrStatus); mmiowb(); }
false
false
false
false
false
0
GetDocument () const { Object const *object = this; while (object && (object->m_Type != DocumentType)) object = object->m_Parent; return const_cast <Document *> (reinterpret_cast <Document const *> (object)); }
false
false
false
false
false
0
fm_search_job_match_file_type(FmVfsSearchEnumerator* priv, GFileInfo* info) { gboolean ret; if(priv->mime_types) { const char* file_type = g_file_info_get_content_type(info); char** pmime_type; ret = FALSE; for(pmime_type = priv->mime_types; *pmime_type; ++pmime_type) ...
false
false
false
false
false
0
sinfo_parse_cpl_input_wave ( cpl_parameterlist* cpl_cfg, cpl_frameset* sof, cpl_frameset** raw ) { int status=0; wave_config * cfg= sinfo_wave_cfg_create(); /* * Perform sanity checks, fill up the structure with what was * found in the ini file */ parse_section_findlines ( cf...
false
false
false
false
false
0
montlayer(int layer) { int i,j; char found; if ( overwritecolorcount == 0 ){ for (i=0;i<plasma.blockcount;i++ ) { found = false; j=0; do { if (mblocks[layer]->mempointer[i] <= mblocks[layer]->tileval[j] ) { if ( mblocks[layer]->color[j] != ctranspa...
false
false
false
false
false
0
mock_secret_C_CreateObject (CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phObject) { GArray *template = NULL; CK_OBJECT_CLASS klass; CK_ATTRIBUTE_PTR attr; gchar *text; CK_RV rv; g_return_val_if_fail (phObject, CKR_ARGUMENTS_BAD); if...
false
false
false
false
false
0
fields_context_update(struct fields_context *self, char byte) { self->length--; if (self->length != 0) return; self->length = fields_charlen(byte); switch (byte) { case FIELDS_CR: fields_position_return(&self->position); break; case FIELDS_LF: if (self->last !...
false
false
false
false
false
0
start1(const char *lockfile, int fd) { int lockfd, maxfd; #if HAVE_SETPGRP #if SETPGRP_VOID setpgrp(); #else setpgrp(0, 0); #endif #endif #ifdef TIOCNOTTY { int fd=open("/dev/tty", O_RDWR); if (fd >= 0) { ioctl(fd, TIOCNOTTY, 0); close(fd); } } #endif /* Attempt to obtain a lock */ loc...
false
false
false
false
true
1
ves_icall_System_GC_register_ephemeron_array (MonoObject *array) { #ifdef HAVE_SGEN_GC if (!mono_gc_ephemeron_array_add (array)) mono_raise_exception (mono_object_domain (array)->out_of_memory_ex); #endif }
false
false
false
false
false
0
immerse_update_detail_pixbuf(ImmerseControls *controls) { GwyDataField *dfield; GwyGradient *gradient; GdkPixbuf *pixbuf; const guchar *name; gchar *key; GQuark quark; gint w, h, xres, yres; gwy_object_unref(controls->detail); if (!controls->args->detail.data) return; q...
false
false
false
false
false
0
modelHasEquation(const char* equation_name) { int index = 0; while (true) { Parameter* eq = getParameter(index++, ECIF_EQUATION); if (eq==NULL) break; if ( eq->hasFieldValueBySifName(equation_name, "True") ) { return true; } } return false; }
false
false
false
false
false
0
ms_admin(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { if (hunt_server(client_p, source_p, ":%s ADMIN :%s", 1, parc, parv) != HUNTED_ISME) return; if (IsClient(source_p)) do_admin(source_p); }
false
false
false
false
false
0
init_usm_post_config(int majorid, int minorid, void *serverarg, void *clientarg) { size_t salt_integer_len = sizeof(salt_integer); if (sc_random((u_char *) & salt_integer, &salt_integer_len) != SNMPERR_SUCCESS) { DEBUGMSGTL(("usm", "sc_random() failed: using time()...
false
false
false
false
false
0
SHAEncode64(unsigned char *output, php_hash_uint64 *input, unsigned int len) { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 8) { output[j] = (unsigned char) ((input[i] >> 56) & 0xff); output[j + 1] = (unsigned char) ((input[i] >> 48) & 0xff); output[j + 2] = (unsigned char) ((input[i] >> 40) & 0xff...
false
false
false
false
false
0
varsToStringList() { QStringList list; for(VarList::Iterator it = begin(); it != end(); ++it) list.append((*it).key()); return list; }
false
false
false
false
false
0
lookup_as_function (x, code) rtx x; enum rtx_code code; { struct table_elt *p = lookup (x, safe_hash (x, VOIDmode) & HASH_MASK, GET_MODE (x)); /* If we are looking for a CONST_INT, the mode doesn't really matter, as long as we are narrowing. So if we looked in vain for a mode narrower than...
false
false
false
false
false
0
populateWithCurrentPatientData() { if (patient()->uuid().isEmpty()) return false; d->_data.insert(Patient_FullName, patient()->data(Core::IPatient::FullName)); d->_data.insert(Patient_FullAddress, patient()->data(Core::IPatient::FullAddress)); d->_data.insert(Patient_DateOfBirth, patient()->data...
false
false
false
false
false
0
range_list_name_try (GString *names, char const *sheet, GSList const *ranges) { GSList const *l; char const *n = range_as_string (ranges->data); gboolean truncated; if (sheet == NULL) g_string_assign (names, n); else g_string_printf (names, "%s!%s", sheet, n); gnm_cmd_trunc_descriptor (names, &truncated); ...
false
false
false
false
false
0
RunHeapCleanups() { if (!heap_cleanups_) return; for (int i = 0; i < heap_cleanups_->size(); i++) { void (*f)(void) = (*heap_cleanups_)[i]; f(); } delete heap_cleanups_; heap_cleanups_ = NULL; }
false
false
false
false
false
0
cmp_time(time_t file1, time_t file2) { if (file2 > file1) { /* The final comparison makes sure that modify_window doesn't overflow a * time_t, which would mean that file2 must be in the equality window. */ if (!modify_window || (file2 > file1 + modify_window && file1 + modify_window > file1)) return -1; } e...
false
false
false
false
false
0
hciops_set_powered(int index, gboolean powered) { struct dev_info *dev = &devs[index]; int err; DBG("hci%d powered %d", index, powered); if (powered == FALSE) return hciops_power_off(index); if (ioctl(dev->sk, HCIDEVUP, index) == 0) return 0; if (errno == EALREADY) return 0; err = -errno; error("Can'...
false
false
false
false
false
0
grl_operation_options_finalize (GrlOperationOptions *self) { g_hash_table_unref (self->priv->data); g_hash_table_unref (self->priv->key_filter); g_hash_table_unref (self->priv->key_range_filter); g_clear_object (&self->priv->caps); G_OBJECT_CLASS (grl_operation_options_parent_class)->finalize ((GObject *) sel...
false
false
false
false
false
0
movingSpherePassesThroughFixedBox( const Sphere& sphere, const Vector3& velocity, const Box& box, double timeLimit) { // If they intersect originally, they definitely pass through each other. if (fixedSolidSphereIntersectsFixedSolidBox(sphere, bo...
false
false
false
false
false
0
get_def_blocks_for (common_info_p info) { struct def_blocks_d *db_p = &info->def_blocks; if (!db_p->def_blocks) { db_p->def_blocks = BITMAP_ALLOC (&update_ssa_obstack); db_p->phi_blocks = BITMAP_ALLOC (&update_ssa_obstack); db_p->livein_blocks = BITMAP_ALLOC (&update_ssa_obstack); } ret...
false
false
false
false
false
0
gst_bin_set_context (GstElement * element, GstContext * context) { GstBin *bin; GstIterator *children; g_return_if_fail (GST_IS_BIN (element)); bin = GST_BIN (element); gst_bin_update_context (bin, context); children = gst_bin_iterate_elements (bin); while (gst_iterator_foreach (children, set_context,...
false
false
false
false
false
0
gftp_set_directory (gftp_request * request, const char *directory) { g_return_val_if_fail (request != NULL, GFTP_EFATAL); g_return_val_if_fail (directory != NULL, GFTP_EFATAL); if (request->datafd <= 0 && !request->always_connected) { if (directory != request->directory) { if (reques...
false
false
false
false
false
0
choose_mech(const gss_buffer_t input, gss_OID mech_oid) { OM_uint32 status; /* * First try to parse the gssapi token header and see if it's a * correct header, use that in the first hand. */ status = parse_header(input, mech_oid); if (status == GSS_S_COMPLETE) return GSS_S_COMPLETE; /* * Lets guess...
false
false
false
false
false
0
eraseInferior( pid_t tid ) { _do_lock_tbl(); dmtcp::vector< pid_t >::iterator iter = _inferiorVector.begin(); while ( iter != _inferiorVector.end() ) { if ( *iter == tid ) { _inferiorVector.erase( iter ); break; } else ++iter; } _do_unlock_tbl(); return; }
false
false
false
false
false
0
sdp_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SDPBox *ptr = (GF_SDPBox *)s; if (ptr == NULL) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; //don't write the NULL char!!! gf_bs_write_data(bs, ptr->sdpText, strlen(ptr->sdpText)); return GF_OK; }
false
false
false
false
false
0
grok_reference_init (tree decl, tree type, tree init, int flags) { if (init == NULL_TREE) { if ((DECL_LANG_SPECIFIC (decl) == 0 || DECL_IN_AGGR_P (decl) == 0) && ! DECL_THIS_EXTERN (decl)) error ("%qD declared as reference but not initialized", decl); return NULL_TREE; } if (TREE_CODE (...
false
false
false
false
false
0
__zd_usb_disable_rx(struct zd_usb *usb) { int i; unsigned long flags; struct urb **urbs; unsigned int count; struct zd_usb_rx *rx = &usb->rx; spin_lock_irqsave(&rx->lock, flags); urbs = rx->urbs; count = rx->urbs_count; spin_unlock_irqrestore(&rx->lock, flags); if (!urbs) return; for (i = 0; i < count; i...
false
false
false
false
false
0
main_clean(int argc, char *argv[]) { mag_t *g; int c; magopt_t *opt; opt = mag_init_opt(); while ((c = getopt(argc, argv, "ON:d:CFAl:e:i:o:R:n:w:r:S")) >= 0) { switch (c) { case 'F': opt->flag |= MOG_F_NO_AMEND; break; case 'C': opt->flag |= MOG_F_CLEAN; break; case 'A': opt->flag |= MOG_F_AGGRESSIVE; brea...
false
true
false
false
true
1
plc_rx(plc_state_t *s, int16_t amp[], int len) { int i; int pitch_overlap; float old_step; float new_step; float old_weight; float new_weight; float gain; if (s->missing_samples) { /* Although we have a real signal, we need to smooth it to fit well with the sy...
false
false
false
false
false
0
e_format_number (gint number) { GList *iterator, *list = NULL; struct lconv *locality; gint char_length = 0; gint group_count = 0; gchar *grouping; gint last_count = 3; gint divider; gchar *value; gchar *value_iterator; locality = localeconv (); grouping = locality->grouping; while (number) { gchar *grou...
false
false
false
false
false
0
gt_SRLSaveToStream(struct seqRangeList *rangeList, FILE *fp) { size_t numRanges; gt_assert(rangeList && fp); numRanges = rangeList->numRanges; gt_xfwrite(&(rangeList->numRanges), sizeof (rangeList->numRanges), 1, fp); gt_xfwrite(rangeList->ranges, sizeof (struct seqRange), numRanges, fp); return 1; }
false
true
false
false
false
1
print(const char *fmt,...) { va_list args; int Wrote = 0; va_start(args,fmt); if(Buf == NULL) { if(!bFixedBuffer) { if((Buf = (char *) malloc(INITIAL_BUFFER_LEN)) != NULL) { BufSize = INITIAL_BUFFER_LEN; } } } if(Count < BufSize) { for( ; ; ) { ...
false
false
false
true
false
1
get_timezone_list (GList *tzs, const char *top_path, const char *subpath) { GDir *dir; char *fullpath; const char *name; if (subpath == NULL) fullpath = g_strdup (top_path); else fullpath = g_build_filename (top_path, subpath, NULL); dir = g_dir_open (fullpath, 0, NULL); if (dir == NULL) { g_war...
false
false
false
false
false
0
e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, ETreePath path, gboolean expanded) { ETreePath children; g_return_if_fail (E_IS_TREE_TABLE_ADAPTER (etta)); e_tree_table_adapter_node_set_expanded...
false
false
false
false
false
0
mono_metadata_free_marshal_spec (MonoMarshalSpec *spec) { if (spec->native == MONO_NATIVE_CUSTOM) { g_free (spec->data.custom_data.custom_name); g_free (spec->data.custom_data.cookie); } g_free (spec); }
false
false
false
false
false
0
preset_rename_cb(RawFileControls *controls) { GwyRawFilePreset *preset; GwyInventory *inventory; GtkTreeModel *model; GtkTreeSelection *tselect; GtkTreeIter iter; const gchar *newname, *oldname; gchar *oldfilename, *newfilename; tselect = gtk_tree_view_get_selection(GTK_TREE_VIEW(contro...
false
false
false
false
false
0
cat_max_get(int field) { int i; G_debug(2, "cat_max_get() field = %d", field); for (i = 0; i < nMaxFieldCat; i++) { if (MaxFieldCat[i][0] == field) { return (MaxFieldCat[i][1]); } } return 0; }
false
false
false
false
false
0
DXUnloadObjFile(char *fname, char *envvar) { char *foundname = NULL; struct loadtable *lp = NULL; if (!findfile(fname, &foundname, envvar)) return ERROR; if (((lp = get_tp_entry(foundname)) != NULL) && (lp->loadstate == L_UNLOADED)) { DXDebug("L", "`%s' found but already unloaded", foundname);...
false
false
false
false
false
0
redraw_group(const struct widget *pBeginGroupWidgetList, const struct widget *pEndGroupWidgetList, int add_to_update) { Uint16 count = 0; struct widget *pTmpWidget = (struct widget *) pEndGroupWidgetList; while (pTmpWidget) { if ((get_wflags(pTmpWidget) & WF_HIDDEN) != WF_HIDDEN) { ...
false
false
false
false
false
0
ceph_mdsc_lease_send_msg(struct ceph_mds_session *session, struct inode *inode, struct dentry *dentry, char action, u32 seq) { struct ceph_msg *msg; struct ceph_mds_lease *lease; int len = sizeof(*lease) + sizeof(u32); int dnamelen = 0; dout("lease_send_msg inode %p dentry %p %s to mds%...
false
false
false
false
false
0
inflate_gzip(byte *p, unsigned int max) { static int done = NO; static int initialized = NO; static z_stream z; int err, size, inflated = 0, old; if (done == YES) return 0; if (initialized == NO) { byte flag = 0; uInt len; byte *q, *r; initialized = YES; z.zalloc = (alloc_func)0; z.zfree = (free_fu...
false
false
false
false
false
0
ProcessXMP() { if ( this->processedXMP ) return; this->processedXMP = true; // Make sure only called once. if ( ! this->onXMP.empty() ) { // Look for the XMP packet. this->ExtractLiveXML(); if ( ! this->xmpPacket.empty() ) { FillPacketInfo ( this->xmpPacket, &this->packetInfo ); this->xmpObj.ParseFromBu...
false
false
false
false
false
0
cpu_group_set_state(cpu_group_t *group,u_int state) { cpu_gen_t *cpu; for(cpu=group->cpu_list;cpu;cpu=cpu->next) cpu->state = state; }
false
false
false
false
false
0
split_on_bdry(apr_bucket_brigade *out, apr_bucket_brigade *in, const apr_strmatch_pattern *pattern, const char *bdry) { apr_bucket *e = APR_BRIGADE_FIRST(in); apr_size_t blen = strlen(bdry), off = 0; while...
false
false
false
false
false
0
elf64_ia64_object_p (bfd *abfd) { asection *sec; asection *group, *unwi, *unw; flagword flags; const char *name; char *unwi_name, *unw_name; bfd_size_type amt; if (abfd->flags & DYNAMIC) return TRUE; /* Flags for fake group section. */ flags = (SEC_LINKER_CREATED | SEC_GROUP | SEC_LINK_ONCE ...
false
false
false
false
false
0
buffer_allocate (ptr, len, file, line) struct buffer **ptr; unsigned len; const char *file; int line; { struct buffer *bp; /* XXXSK: should check for bad ptr values, otherwise we leak memory if they are wrong */ bp = dmalloc (len + sizeof *bp, file, line); if (!bp) return 0; /* XXXSK: both of these ini...
false
false
false
false
false
0