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
conf_set_general_default_umodes(void *data) { char *pm; int what = MODE_ADD, flag; ConfigFileEntry.default_umodes = 0; for (pm = (char *) data; *pm; pm++) { switch (*pm) { case '+': what = MODE_ADD; break; case '-': what = MODE_DEL; break; /* don't allow +o */ case 'o': case 'S': case...
false
false
false
false
false
0
exec_conf(void) { int pipefd[2], stat, size; sigset_t sset, osset; sigemptyset(&sset); sigaddset(&sset, SIGINT); sigprocmask(SIG_BLOCK, &sset, &osset); signal(SIGINT, SIG_DFL); #ifdef SIGWINCH { struct sigaction sa; sa.sa_handler = winch_handler; sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; s...
false
false
false
false
false
0
Delete() { SendObjectDeSpawnAnim(GetObjectGuid()); SetGoState(GO_STATE_READY); SetUInt32Value(GAMEOBJECT_FLAGS, GetGOInfo()->flags); if (uint16 poolid = sPoolMgr.IsPartOfAPool<GameObject>(GetGUIDLow())) { sPoolMgr.UpdatePool<GameObject>(*GetMap()->GetPersistentState(), poolid, GetGUIDLow()); }...
false
false
false
false
false
0
prepare_to_space (char *to_space_bitmap, size_t space_bitmap_size) { SgenFragment **previous, *frag; memset (to_space_bitmap, 0, space_bitmap_size); memset (age_alloc_buffers, 0, sizeof (age_alloc_buffers)); previous = &collector_allocator.alloc_head; for (frag = *previous; frag; frag = *previous) { char *sta...
false
false
false
false
false
0
mergesort_lp_file(char *REL_str, char *NEW_str, char *TMP_str, FILE *COMB) { FILE *NEW = flint_fopen(NEW_str, "r"); #if defined(WINCE) || defined(macintosh) char * tmp_dir = NULL; #else char * tmp_dir = getenv("TMPDIR"); #endif if (tmp_dir == NULL) tmp_dir = "./"; char * TMP_name = get_filename(t...
false
false
false
false
true
1
mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev) { int ret; int device_id; device_initialize(&dev->dev); dev->dev.bus = &mcb_bus_type; dev->dev.parent = bus->dev.parent; dev->dev.release = mcb_release_dev; device_id = dev->id; dev_set_name(&dev->dev, "mcb%d-16z%03d-%d:%d:%d", bus->bus_nr, de...
false
false
false
false
false
0
Java_ncsa_hdf_hdf5lib_H5_H5Pget_1btree_1ratios (JNIEnv *env, jclass clss, jint plist_id, jdoubleArray left, jdoubleArray middle, jdoubleArray right) { herr_t status; jdouble *leftP; jdouble *middleP; jdouble *rightP; jboolean isCopy; if (left == NULL) { h5nullArgument(env, "H5Pget_b...
false
false
false
false
false
0
gen_mjpeghdr_to_package(struct go7007 *go, __le16 *code, int space) { u8 *buf; u16 mem = 0x3e00; unsigned int addr = 0x19; int size = 0, i, off = 0, chunk; buf = kzalloc(4096, GFP_KERNEL); if (buf == NULL) return -ENOMEM; for (i = 1; i < 32; ++i) { mjpeg_frame_header(go, buf + size, i); size += 80; } c...
false
false
false
false
false
0
QtUtilInit (void) { CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_STACK_OVERFLOW )) CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_STACK_UNDERFLOW )) CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_INVALID_CUSTOMEVENT)) CHK (TOOL_ERROR_REGISTER_CODE (ERROR_QTUTIL_DIALOG_UNEXPECTED_EVENT ...
false
false
false
false
false
0
_setString8(const std::string& value) { if (_t != t_string8) { _releaseValue(); new (_String8Ptr()) std::string(value); _t = t_string8; } else { _String8().assign(value); } _category = Value; }
false
false
false
false
false
0
mrand48_r (buffer, result) struct drand48_data *buffer; long int *result; { /* Be generous for the arguments, detect some errors. */ if (buffer == NULL) return -1; return __jrand48_r (buffer->__x, buffer, result); }
false
false
false
false
false
0
pc87427_request_regions(struct platform_device *pdev, int count) { struct resource *res; int i; for (i = 0; i < count; i++) { res = platform_get_resource(pdev, IORESOURCE_IO, i); if (!res) { dev_err(&pdev->dev, "Missing resource #%d\n", i); return -ENOENT; } if (!devm_request_region(&pdev->d...
false
false
false
false
false
0
cr_statement_parse_from_buf (const guchar * a_buf, enum CREncoding a_encoding) { CRStatement *result = NULL; /* *The strategy of this function is "brute force". *It tries to parse all the types of CRStatement it knows about. *I could do this a smarter way but I don't have the...
false
false
false
false
false
0
m68k_op_lsr_16_r(void) { uint* r_dst = &DY; uint shift = DX & 0x3f; uint src = MASK_OUT_ABOVE_16(*r_dst); uint res = src >> shift; if(shift != 0) { USE_CYCLES(shift<<CYC_SHIFT); if(shift <= 16) { *r_dst = MASK_OUT_BELOW_16(*r_dst) | res; FLAG_C = FLAG_X = (src >> (shift - 1))<<8; FLAG_N = NFLAG_C...
false
false
false
false
false
0
brasero_task_sleep (BraseroTask *self, guint sec) { BraseroTaskPrivate *priv; priv = BRASERO_TASK_PRIVATE (self); BRASERO_BURN_LOG ("wait loop"); priv->loop = g_main_loop_new (NULL, FALSE); priv->clock_id = g_timeout_add_seconds (sec, brasero_task_wakeup, ...
false
false
false
false
false
0
rom1394_get_bus_options(raw1394handle_t handle, nodeid_t node, rom1394_bus_options* bus_options) { quadlet_t quadlet; octlet_t offset; NODECHECK(handle, node); offset = CSR_REGISTER_BASE + CSR_CONFIG_ROM + ROM1394_BUS_OPTIONS; QUADREADERR (handle, node, offset, &quadlet); quadlet = htonl (quadlet); bus_option...
false
false
false
false
false
0
pci_dev_hp_attrs_are_visible(struct kobject *kobj, struct attribute *a, int n) { struct device *dev = container_of(kobj, struct device, kobj); struct pci_dev *pdev = to_pci_dev(dev); if (pdev->is_virtfn) return 0; return a->mode; }
false
false
false
false
false
0
name_owner_changed_cb ( TpDBusDaemon *bus, const gchar *name, const gchar *new_owner, gpointer user_data) { TpDebugClient *self = TP_DEBUG_CLIENT (user_data); if (tp_str_empty (new_owner)) { GError *error = g_error_new (TP_DBUS_ERRORS, TP_DBUS_ERROR_NAME_OWNER_LOST, "%...
false
false
false
false
false
0
Info_RemoveKey (char *s, const char *key) { char *start; char pkey[MAX_INFO_KEY]; char value[MAX_INFO_VALUE]; char *o; if (strchr (key, '\\')) { Com_Printf ("Info_RemoveKey: Tried to remove illegal key '%s'\n", key); return; } while (1) { start = s; if (*s == '\\') s++; o = pkey; while (*s != ...
false
false
false
false
false
0
SetFlags(GenericContainer *gen,unsigned newFlags) { unsigned result; if (gen == NULL) { iError.RaiseError("iGeneric.SetFlags",CONTAINER_ERROR_BADARG); return 0; } result = gen->vTable->GetFlags(gen); gen->vTable->SetFlags(gen,newFlags); return result; }
false
false
false
false
false
0
areTypesIsomorphic(Type *DstTy, Type *SrcTy) { // Two types with differing kinds are clearly not isomorphic. if (DstTy->getTypeID() != SrcTy->getTypeID()) return false; // If we have an entry in the MappedTypes table, then we have our answer. Type *&Entry = MappedTypes[SrcTy]; if (Entry) return Entry...
false
false
false
false
false
0
Clear(void) { if(META_DEBUG) { METAIO_STREAM::cout << "MetaContour: Clear" << METAIO_STREAM::endl; } MetaObject::Clear(); m_InterpolationType = MET_NO_INTERPOLATION; m_NControlPoints = 0; m_NInterpolatedPoints = 0; // Delete the list of control points. ControlPointListType::iterator it = m_Co...
false
false
false
false
false
0
compare_serv(struct servent *serv, char *spec) { char field[100], **aliases; spec = get_field(spec, ':', field); if (!spec || strcmp(serv->s_name, field) != 0) return -1; spec = get_field(spec, ':', field); if (!spec || strcmp(serv->s_proto, field) != 0) return -1; spec = get_field(spec, ':', field...
false
false
false
false
false
0
waitFor( fd_set& rmaskret, fd_set& wmaskret, fd_set& emaskret, timeval* howlong ) { int nfound = 0; #if defined(SA_NOCLDSTOP) // POSIX static struct sigaction sa, osa; #elif defined(SV_INTERRUPT) // BSD-style static struct sigvec sv, osv; #else // System V-style void (*osig)(); #endif if ...
false
false
false
false
false
0
bfa_fcs_fabric_sm_deleting(struct bfa_fcs_fabric_s *fabric, enum bfa_fcs_fabric_event event) { bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); bfa_trc(fabric->fcs, event); switch (event) { case BFA_FCS_FABRIC_SM_DELCOMP: bfa_sm_set_state(fabric, bfa_fcs_fabric_sm_uninit); bfa_wc_down(&fabric->fcs->wc)...
false
false
false
false
false
0
dsp_e_h(GWindow gw, GEvent *event) { if ( event->type==et_close ) { PD *di = GDrawGetUserData(gw); if ( di->done!=NULL ) *(di->done) = true; GDrawDestroyWindow(di->gw); } else if ( event->type==et_destroy ) { PD *di = GDrawGetUserData(gw); TextInfoDataFree(di->scriptlangs); free(di); if ( di==printw...
false
false
false
false
false
0
pool_message(struct dm_target *ti, unsigned argc, char **argv) { int r = -EINVAL; struct pool_c *pt = ti->private; struct pool *pool = pt->pool; if (get_pool_mode(pool) >= PM_READ_ONLY) { DMERR("%s: unable to service pool target messages in READ_ONLY or FAIL mode", dm_device_name(pool->pool_md)); retur...
false
false
false
false
false
0
explain_buffer_errno_wait4_system_call(explain_string_buffer_t *sb, int errnum, int pid, int *status, int options, struct rusage *rusage) { (void)errnum; explain_string_buffer_puts(sb, "wait4(pid = "); explain_buffer_pid_t(sb, pid); if (pid == 0) { explain_string_buffer_puts(sb, " = proc...
false
false
false
false
false
0
free_value (CutTestDataPrivate *priv) { if (priv->value) { if (priv->destroy_function) priv->destroy_function(priv->value); priv->value = NULL; } }
false
false
false
false
false
0
set_drag_dest_row (NautilusTreeViewDragDest *dest, GtkTreePath *path) { if (path) { set_widget_highlight (dest, FALSE); gtk_tree_view_set_drag_dest_row (dest->details->tree_view, path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE); } else { set_widget_highlight (dest, TRUE); gtk_tree_view_set_drag_dest_r...
false
false
false
false
false
0
setLogpage(int32_t pno, /* page number of log */ int32_t *eor, /* log header eor to return */ int32_t *pmax, /* log header page number to return */ int32_t buf) { /* logp[] index number for page */ int rc; int32_t diff1, diff2; /* check that header and trailer are the same *...
false
false
false
false
false
0
teardown (Test *test, gconstpointer unused) { g_object_unref (test->store); test->store = NULL; g_object_unref (test->transaction); test->transaction = NULL; if (test->object != NULL) g_object_unref (test->object); test->object = NULL; mock_module_leave_and_finalize (); test->module = NULL; }
false
false
false
false
false
0
H5HF_man_iblock_unprotect(H5HF_indirect_t *iblock, hid_t dxpl_id, unsigned cache_flags, hbool_t did_protect) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* * Check arguments. */ HDassert(iblock); /* Check if we previously protected this indirect ...
false
false
false
false
false
0
mq_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno) { QUOTA_STACK_DESTROY (frame, this); return 0; }
false
false
false
false
false
0
fs_codec_remove_optional_parameter (FsCodec *codec, FsCodecParameter *param) { g_return_if_fail (codec); if (!param) return; fs_codec_parameter_free (param); codec->optional_params = g_list_remove (codec->optional_params, param); }
false
false
false
false
false
0
ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE keylen) { VALUE str; int len = NUM2INT(keylen); StringValue(pass); StringValue(salt); str = rb_str_new(0, len); if (PKCS5_PBKDF2_HMAC_SHA1(RSTRING_PTR(pass), RSTRING_LENINT(pass), (const unsigned char ...
false
false
false
false
false
0
load_dialog_cb(GtkDialog *dialog, gint response, gpointer user_data) { PlaylistWindow *playlist_window = (PlaylistWindow *) user_data; if ((response == GTK_RESPONSE_ACCEPT) && playlist_window) playlist_window->LoadPlaylist(); dialog_cancel_response(GTK_WIDGET(dialog), NULL); }
false
false
false
false
false
0
get_geometry_type_from_gauss_input_file(gchar *NomFichier) { gchar *t; FILE *fd; guint taille=BSIZE; gboolean OK=TRUE; gint i; FilePosTypeGeom j; gint k; gchar *t1; gchar *t2; gchar *t3 = NULL; j.geomtyp=GEOM_IS_OTHER; j.numline=0; j.units=1; t=g_malloc(taille); fd = FOpen(NomFichier, "rb"); if(fd!=N...
false
true
false
false
true
1
cson_output_filename( cson_value const * src, char const * dest, cson_output_opt const * fmt ) { if( !src || !dest ) return cson_rc.ArgError; else { FILE * f = fopen(dest,"wb"); if( !f ) return cson_rc.IOError; else { int const rc = cson_output_FILE( src, f, fmt )...
false
false
false
false
false
0
brw_draw_prims( struct gl_context *ctx, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, GLboolean index_bounds_valid, GLuint min_index, GLuint max_index, struct gl_transform_feedback_object *unused_tfb_object, struct gl_buffer...
false
false
false
false
false
0
button_release_event(GtkWidget *widget UNUSED, GdkEventButton *event, gpointer data UNUSED) { int x, y; int_u vim_modifiers; gui.event_time = event->time; /* Remove any motion "machine gun" timers used for automatic further extension of allocation areas if outside of the applicati...
false
false
false
false
false
0
ena_disable_io_intr_sync(struct ena_adapter *adapter) { int i; if (!netif_running(adapter->netdev)) return; for (i = ENA_IO_IRQ_FIRST_IDX; i < adapter->msix_vecs; i++) synchronize_irq(adapter->irq_tbl[i].vector); }
false
false
false
false
false
0
paint_text ( Image_buffer8 *win, // Buffer to paint in. const char *text, // What to draw, 0-delimited. int xoff, int yoff // Upper-left corner of where to start. ) { int x = xoff; int chr; yoff += get_text_baseline(); if (font_shapes) while ((chr = *text++) != 0) { Shape_frame *shape = font_shapes...
false
false
false
false
false
0
setStrips(const Value* pSize, const byte* pData, uint32_t sizeData, uint32_t baseOffset) { if (!pValue() || !pSize) { #ifndef SUPPRESS_WARNINGS EXV_WARNING << "Directory " << groupNa...
false
false
false
false
false
0
irq_ts_save(void) { /* * If in process context and not atomic, we can take a spurious DNA fault. * Otherwise, doing clts() in process context requires disabling preemption * or some heavy lifting like kernel_fpu_begin() */ if (!in_atomic()) return 0; if (read_cr0() & X86_CR0_TS) { clts(); return 1; }...
false
false
false
false
false
0
_enable_mono_map (HpOption UNUSEDARG this, HpOptSet optset, HpData data, const HpDeviceInfo UNUSEDARG *info) { HpOption cgam = hp_optset_get(optset, CUSTOM_GAMMA); return (cgam && hp_option_getint(cgam, data) && ( sanei_hp_optset_scanmode(optset, data) != HP_SCANMODE_COLOR || ! hp_opt...
false
false
false
false
false
0
setButtons(ButtonCodes buttonMask) { KPageDialog::setButtons(buttonMask); // Set Auto-Default mode ( KDE Bug #211187 ) if (buttonMask & KDialog::Ok) { button(KDialog::Ok)->setAutoDefault(true); } if (buttonMask & KDialog::Apply) { button(KDialog::Apply)->setAutoDefault(true); } ...
false
false
false
false
false
0
bfa_dport_is_sending_req(struct bfa_dport_s *dport) { if (bfa_sm_cmp_state(dport, bfa_dport_sm_enabling) || bfa_sm_cmp_state(dport, bfa_dport_sm_enabling_qwait) || bfa_sm_cmp_state(dport, bfa_dport_sm_disabling) || bfa_sm_cmp_state(dport, bfa_dport_sm_disabling_qwait) || bfa_sm_cmp_state(dport, bfa...
false
false
false
false
false
0
ProcessAICHAnswer(const byte* packet, uint32 size) { if (m_fAICHRequested == FALSE){ throw wxString(wxT("Received unrequested AICH Packet")); } m_fAICHRequested = FALSE; CMemFile data(packet, size); if (size <= 16){ CAICHHashSet::ClientAICHRequestFailed(this); return; } CMD4Hash hash = data.ReadHash(); ...
false
false
false
false
false
0
generate_aiff(const char *filename, unsigned sample_rate, unsigned channels, unsigned bps, unsigned samples) { const unsigned bytes_per_sample = (bps+7)/8; const unsigned true_size = channels * bytes_per_sample * samples; const unsigned padded_size = (true_size + 1) & (~1u); const unsigned shift = (bps%8)? 8 - (bps...
false
false
false
false
false
0
DisconnectRfmBranch(RfmBranch branch) { if (branch == NULL) { return; } if (branch->fork_prev) { branch->fork_prev->fork_next = branch->fork_next; } else { if (branch->fork_block) { branch->fork_block->fork_list = branch->fork_next; } } if (branch->fo...
false
false
false
false
false
0
_nc_keypad(SCREEN *sp, bool flag) { int rc = ERR; if (sp != 0) { #ifdef USE_PTHREADS /* * We might have this situation in a multithreaded application that * has wgetch() reading in more than one thread. putp() and below * may use SP explicitly. */ if (_nc_use_pthreads && sp != SP) { SCREEN *sav...
false
false
false
false
false
0
q_addmsg(struct share_msgq *qq, struct chanset_t *chan, char *s) { struct share_msgq *q; int cnt; if (!qq) { q = nmalloc(sizeof *q); q->chan = chan; q->next = NULL; q->msg = nmalloc(strlen(s) + 1); strcpy(q->msg, s); return q; } cnt = 0; for (q = ...
false
false
false
false
false
0
getMatchingLine (int start, int direction) { int i = start; do { // Find SearchString at any place in string for line i for(int j = 0; BList[i][j]; j++) if (BList[i][j] == SearchString[0] && strnicmp(SearchString, BList[i]+j, SearchLen) == 0) { return i; }...
false
false
false
false
false
0
move_sgl(struct c2_data_addr * dst, struct ib_sge *src, int count, u32 * p_len, u8 * actual_count) { u32 tot = 0; /* running total */ u8 acount = 0; /* running total non-0 len sge's */ while (count > 0) { /* * If the addition of this SGE causes the * total SGL length to exceed 2^32-1, then * fail-n-b...
false
false
false
false
false
0
_PyFile_SanitizeMode(char *mode) { char *upos; size_t len = strlen(mode); if (!len) { PyErr_SetString(PyExc_ValueError, "empty mode string"); return -1; } upos = strchr(mode, 'U'); if (upos) { memmove(upos, upos+1, len-(upos-mode)); /* incl null char */ if (mod...
true
true
false
false
true
1
MIDI_GetVolume ( void ) { int volume; if ( _MIDI_Funcs == NULL ) { return( MIDI_NullMidiModule ); } SoundDriver_MIDI_Lock(); if ( _MIDI_Funcs->GetVolume ) { volume = _MIDI_Funcs->GetVolume(); } else { volume = _MIDI_TotalVolume; } ...
false
false
false
false
false
0
e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info) { s32 ret_val; u16 phy_data; phy_info->cable_length = e1000_cable_length_undefined; phy_info->extended_10bt_distance = e1000_10bt_ext_dist_enable_undefined; phy_info->cable_polarity = e1000_rev_polarity_undefined; phy_info->downshift = e100...
false
false
false
false
false
0
frob_ava(tentry *entry, int mode, char *ad, char *data, int n) { tattribute *a; switch (mode) { case FROB_RDN_CHECK: a = entry_find_attribute(entry, ad, 0); if (!a) return -1; if (attribute_find_value(a, data, n) == -1) return -1; break; case FROB_RDN_CHECK_NONE: a = entry_find_attribute(entry, ad, 0); ...
false
false
false
false
false
0
bottom(PDA p){R p->n>0?p->c[0]:0;}
false
false
false
false
false
0
toplevel_update_title_bar(toplevel_t * top) { char *log_path = seaudit_get_log_path(top->s); apol_policy_path_t *policy_path = seaudit_get_policy_path(top->s); char *policy_type_str = "Policy"; const char *primary_path; char *s; if (log_path == NULL) { log_path = "No Log"; } if (policy_path == NULL) { prim...
false
false
false
false
false
0
ario_shell_coverselect_response_cb (GtkDialog *dialog, int response_id, ArioShellCoverselect *shell_coverselect) { ARIO_LOG_FUNCTION_START; if (response_id == GTK_RESPONSE_OK) { /* Save cover */ ario_...
false
false
false
false
false
0
max_undo_depth_changed_cb (GSettings *settings, const gchar *key, gpointer user_data) { const GList *docn; g_settings_get (settings, key, "u", &max_undo_depth); docn = hex_document_get_list (); while (docn) { hex_document_set_max_undo...
false
false
false
false
false
0
pxa2xx_spi_clear_rx_thre(const struct driver_data *drv_data, u32 *sccr1_reg) { u32 mask; switch (drv_data->ssp_type) { case QUARK_X1000_SSP: mask = QUARK_X1000_SSCR1_RFT; break; default: mask = SSCR1_RFT; break; } *sccr1_reg &= ~mask; }
false
false
false
false
false
0
folderview_set_target_folder_color(gint color_op) { gint firstone = 1; GList *list; FolderView *folderview; for (list = folderview_list; list != NULL; list = list->next) { folderview = (FolderView *)list->data; gtkut_convert_int_to_gdk_color(color_op, &folderview->color_op); if (firstone) { bold_tgtfold_...
false
false
false
false
false
0
brasero_data_project_resort_tree (BraseroDataProject *self, BraseroFileNode *parent) { BraseroFileNode *iter; for (iter = BRASERO_FILE_NODE_CHILDREN (parent); iter; iter = iter->next) { if (iter->is_file) continue; brasero_data_project_reorder_children (self, iter); brasero_data_project_resort_tree (...
false
false
false
false
false
0
find_splits(int nx, int ny, int *splitx, int *splity) { int lasta,i,isleft = false; float ux,uy,ux2,uy2,angle,r; lasta = 999; *splity = -1; *splitx = nx-1; for (i = 0; i<ny; i++) { touser(nx-1,i,0,&ux,&uy); touser(0,i,0,&ux2,&uy2); fxy_polar(ux2-ux,uy2-uy,&r,&angle); if (angle<90) isleft = true; if (an...
false
false
false
false
false
0
compile_disable(char*label, struct symb_s symb) { if (label) compile_codelabel(label); /* Fill in the basics of the %disable in the instruction. */ vvp_code_t code = codespace_allocate(); code->opcode = of_DISABLE; compile_vpi_lookup(&code->handle, symb.text); }
false
false
false
false
false
0
zxsig_data(struct zx_ctx* c, int len, const char* data, char** sig, EVP_PKEY* priv_key, const char* lk) { RSA* rsa; DSA* dsa; char sha1[20]; /* 160 bits */ SHA1((unsigned char*)data, len, (unsigned char*)sha1); DD("%s: data(%.*s)", lk, len, data); DD("%s: data above %d", lk, hexdump("data: ", data, data...
true
true
false
false
false
1
check_global_searchpath( const char *path, int position, const char *file, git_buf *temp) { char out[GIT_PATH_MAX]; /* build and set new path */ if (position < 0) cl_git_pass(git_buf_join(temp, GIT_PATH_LIST_SEPARATOR, path, "$PATH")); else if (position > 0) cl_git_pass(git_buf_join(temp, GIT_PATH_LIST_SEPARA...
true
true
false
false
false
1
gd_stack_add (GtkContainer *container, GtkWidget *child) { GdStack *stack = GD_STACK (container); GdStackPrivate *priv = stack->priv; GdStackChildInfo *child_info; g_return_if_fail (child != NULL); child_info = g_slice_new (GdStackChildInfo); child_info->widget = child; child_info->name = NULL; ...
false
false
false
false
false
0
PoolFPrint(Pool *p, FILE *f, const char *format, ...) { va_list alist; if (p) { fprintf(f, "%*s", p->level*2, ""); } va_start(alist, format); vfprintf(f, format, alist); va_end(alist); }
false
false
false
false
true
1
cli_bcapi_ilog2(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b) { double f; UNUSEDPARAM(ctx); if (!b) return 0x7fffffff; /* log(a/b) is -32..32, so 2^26*32=2^31 covers the entire range of int32 */ f = (1<<26)*log((double)a / b) / log(2); return (int32_t)myround(f); }
false
false
false
false
false
0
gt_sainseq_new_from_plainseq(const GtUchar *plainseq, unsigned long len) { const GtUchar *cptr; GtSainseq *sainseq = gt_malloc(sizeof *sainseq); sainseq->seqtype = GT_SAIN_PLAINSEQ; sainseq->seq.plainseq = plainseq; sainseq->totallength = len; sainseq->numofch...
false
false
false
false
false
0
mouseReleaseEvent(QMouseEvent * e) { e->setAccepted(false); QGraphicsView::mouseReleaseEvent(e); if (e->isAccepted()) return; QMouseEvent fixedEvent (QEvent::MouseButtonRelease, viewportToViewport(e->pos()), e->button(), e->buttons(), e->modifiers()); handleMouseReleaseEvent(&fixedEvent); e->accept(); }
false
false
false
false
false
0
bltrimws (bstring b) { int i, len; if (b == NULL || b->data == NULL || b->mlen < b->slen || b->slen < 0 || b->mlen <= 0) return BSTR_ERR; for (len = b->slen, i = 0; i < len; i++) { if (!wspace (b->data[i])) { return bdelete (b, 0, i); } } b->data[0] = (unsigned char) '\0'; b->slen = 0; ...
false
false
false
false
false
0
levent_ctl_event(struct bufferevent *bev, short events, void *ptr) { struct lldpd_one_client *client = ptr; if (events & BEV_EVENT_ERROR) { log_warnx("event", "an error occurred with client: %s", evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR())); levent_ctl_free_client(client); } else if (events & BEV_...
false
false
false
false
false
0
_colors_save(Evas_Object *obj) { Eina_List *elist; Elm_Color_Item *item; ELM_COLORSELECTOR_DATA_GET(obj, sd); _elm_config_colors_free(sd->palette_name); EINA_LIST_FOREACH (sd->items, elist, item) _elm_config_color_set(sd->palette_name, item->color->r, item->color->g, ite...
false
false
false
false
false
0
exec_file ARGS2((fd,name), FILE *fd, /* file, if already opened, like stdin */ char *name) /* file name, if not already opened */ { int old_read_depth = read_depth; push_commandfd(fd,name); do /* main event loop of program */ { char response[200]; temp_free_all(); /* stray memory blocks */ free_dis...
false
false
false
false
false
0
dirName() const { // Find last slash. This separates the file name from the path. std::string::size_type separatorPos = path().find_last_of( Directory::sep() ); // If there is no separator, the file is relative to the current directory. So an empty path is returned. if (separatorPos == std::string::npo...
false
false
false
false
false
0
netsys_get_nonblock(value fd) { #ifdef _WIN32 invalid_argument("Netsys_posix.get_nonblcok not avaiable"); #else int r; r = fcntl(Int_val(fd), F_GETFL, 0); if (r == -1) uerror("fcntl", Nothing); return Val_bool((r & O_NONBLOCK) != 0); #endif }
false
false
false
false
false
0
garcon_menu_node_tree_set_merge_file_filename (GNode *tree, const gchar *filename) { g_return_if_fail (garcon_menu_node_tree_get_node_type (tree) == GARCON_MENU_NODE_TYPE_MERGE_FILE); garcon_menu_node_set_merge_file_filename (tree->data, filename); }
false
false
false
false
false
0
interpolate_1d(const ColumnVector& data, const float index) { float interpval; int low_bound = (int)floor(index); int high_bound = (int)ceil(index); if (in_bounds(data, index)) interpval = data(low_bound) + (index - low_bound)*(data(high_bound) - data(low_bound)); else interpval = ex...
false
false
false
false
false
0
ValueSort(const CStatTreeItemBase* a, const CStatTreeItemBase* b) { if (a->m_id < 0x00000100 || a->m_id > 0x7fffffff || b->m_id < 0x00000100 || b->m_id > 0x7fffffff) { return a->m_id > b->m_id; } else { // ADUNANZA BEGIN // Back #if 0 return ((CStatTreeItemCounter*)a)->GetValue() > ((CStatTreeItemCounter*)b)->Ge...
false
false
false
false
false
0
getCharWidthFromCache (UT_UCSChar c) const { // the way GR_CharWidthsCache is implemented will cause problems // fro any graphics plugin that wants to use the cache -- we will // need to instantiate the cache into a static member of // GR_Graphics so that the plugin could get to it without calling // the static ge...
false
false
false
false
false
0
ReadConfig( string file ) { ifstream input( file.c_str() ); if ( !input ) { cerr << "Could not open config file: " << file << endl; return false; } string::size_type Position; string line, key, val; while ( input ) { getline( input, line ); //Strip whi...
false
false
false
false
false
0
radeonfb_bl_init(struct radeonfb_info *rinfo) { struct backlight_properties props; struct backlight_device *bd; struct radeon_bl_privdata *pdata; char name[12]; if (rinfo->mon1_type != MT_LCD) return; #ifdef CONFIG_PMAC_BACKLIGHT if (!pmac_has_backlight_type("ati") && !pmac_has_backlight_type("mnca")) ...
false
false
false
false
false
0
move_is_check(int move, board_t * board) { undo_t undo[1]; bool check; int me, opp, king; int from, to, piece; ASSERT(move_is_ok(move)); ASSERT(board!=NULL); // slow test for complex moves if (MOVE_IS_SPECIAL(move)) { move_do(board,move,undo); check = IS_IN_CHECK(board,board->tu...
false
false
false
false
false
0
pmsg_split(pmsg_t *mb, int offset) { int slen; /* Split length */ const char *start; g_assert(offset >= 0); g_assert(offset < pmsg_size(mb)); pmsg_check_consistency(mb); start = mb->m_rptr + offset; slen = mb->m_wptr - start; g_assert(slen > 0); mb->m_wptr -= slen; /* Logically removed */ return p...
false
false
false
false
false
0
dialog_delete_callback (GtkWidget *widget, GdkEvent *event, gpointer data) { StpuiBasicCallback cancel_callback; GtkWidget *cancel_widget; cancel_callback = (StpuiBasicCallback) g_object_get_data (G_OBJECT (widget), "dialog_cancel_callback"); cancel_widget = (GtkWidget*) g_object_...
false
false
false
false
false
0
ParseAOCDSpecificChargingUnits(struct Aoc *chanp, u_char *p, u_char *end, int dummy) { int recordedUnits; int typeOfChargingInfo; int billingId; INIT; XSEQUENCE_1(ParseRecordedUnitsList, ASN1_TAG_SEQUENCE, 1, &recordedUnits); XSEQUENCE_1(ParseTypeOfChargingInfo, ASN1_TAG_ENUM, 2, &typeOfChargingInfo); XSEQUENCE...
false
false
false
false
true
1
zfile_scache_save(int id, z_stream *s, int calccrc, int iseof) { int res; if(id == 0 || iseof) { res = inflateEnd(s); if(res != Z_OK) { av_log(AVLOG_ERROR, "ZFILE: inflateEnd: %s (%i)", s->msg == NULL ? "" : s->msg, res); } return; } if(sc...
false
false
false
false
false
0
depop_seq_power_stage(struct snd_soc_codec *codec, int enable) { unsigned int soft_vol, hp_zc; /* depop control by register */ snd_soc_update_bits(codec, RT5631_DEPOP_FUN_CTRL_2, RT5631_EN_ONE_BIT_DEPOP, RT5631_EN_ONE_BIT_DEPOP); /* keep soft volume and zero crossing setting */ soft_vol = snd_soc_read(codec, R...
false
false
false
false
false
0
ins_compl_key2dir(c) int c; { if (c == Ctrl_P || c == Ctrl_L || (pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP))) return BACKWARD; return FORWARD; }
false
false
false
false
false
0
of10_flow_removed_print(const u_char *cp, const u_char *ep) { /* match */ if (ep == (cp = of10_match_print("\n\t ", cp, ep))) return ep; /* end of snapshot */ /* cookie */ TCHECK2(*cp, 8); printf("\n\t cookie 0x%016" PRIx64, EXTRACT_64BITS(cp)); cp += 8; /* priority */ TCHECK2(*cp, 2); if (EXTRACT_16BITS(cp)...
false
false
false
false
false
0
createWindow() { if (isRunning()) { sendMessage(m_files.join(QLatin1String("\n"))); return false; } #ifndef Q_OS_MAC setAttribute(Qt::AA_DontShowIconsInMenus, !QSettings().value("Window/MenuIcons", false).toBool()); #endif m_window = new Window(m_files); setActivationWindow(m_window); connect(this, SIGNAL(me...
false
false
false
false
false
0
ast_framehook_list_destroy(struct ast_channel *chan) { struct ast_framehook *framehook; if (!ast_channel_framehooks(chan)) { return 0; } AST_LIST_TRAVERSE_SAFE_BEGIN(&ast_channel_framehooks(chan)->list, framehook, list) { AST_LIST_REMOVE_CURRENT(list); framehook_detach_and_destroy(framehook); } AST_LIST_TR...
false
false
false
false
false
0
filterCompressedObjects(std::map<int, int> const& object_stream_data) { if (object_stream_data.empty()) { return; } // Transform object_to_obj_users and obj_user_to_objects so that // they refer only to uncompressed objects. If something is a // user of a compressed object, then it is really ...
false
false
false
false
false
0
atk_role_register (const gchar *name) { if (!role_names) initialize_role_names (); g_ptr_array_add (role_names, g_strdup (name)); return role_names->len - 1; }
false
false
false
false
false
0
method_encode_signature (MonoDynamicImage *assembly, MonoMethodSignature *sig) { SigBuffer buf; int i; guint32 nparams = sig->param_count; guint32 idx; if (!assembly->save) return 0; sigbuffer_init (&buf, 32); /* * FIXME: vararg, explicit_this, differenc call_conv values... */ idx = sig->call_conventio...
false
false
false
false
false
0