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
get_max_crash_kernel_limit(uint64_t *start, uint64_t *end) { int i, idx = -1; unsigned long sz_max = 0, sz; if (!crash_reserved_mem_nr) return -1; for (i = crash_reserved_mem_nr - 1; i >= 0; i--) { sz = crash_reserved_mem[i].end - crash_reserved_mem[i].start +1; if (sz <= sz_max) continue; sz_max = sz;...
false
false
false
false
false
0
_pager_update_drop_position(Pager *p, Evas_Coord x, Evas_Coord y) { Pager_Desk *pd; p->dnd_x = x; p->dnd_y = y; pd = _pager_desk_at_coord(p, x, y); if (pd == p->active_drop_pd) return; if (pd) edje_object_signal_emit(pd->o_desk, "e,action,drag,in", "e"); if (p->active_drop_pd) edje_objec...
false
false
false
false
false
0
incrByU32(U64 * pu64, unsigned int u32) { uint32_t tmp; tmp = pu64->low; pu64->low = (uint32_t)(tmp + u32); if (pu64->low < tmp) pu64->high = (uint32_t)(pu64->high + 1); }
false
false
false
false
false
0
test_network_remote_local__shorthand_fetch_refspec1(void) { char *refspec_strings[] = { "master", "hard_tag", }; git_strarray array = { refspec_strings, 2, }; git_reference *ref; connect_to_local_repository(cl_fixture("testrepo.git")); git_remote_clear_refspecs(remote); cl_git_pass(git_remote_downloa...
false
false
false
false
false
0
test_correctness(int n) { int istride, ostride, howmany; fftw_plan validated_plan_forward, validated_plan_backward; WHEN_VERBOSE(1, printf("Testing correctness for n = %d...", n); fflush(stdout)); /* produce a *good* plan (validated by Ergun's test procedure) */ validated_plan_forward...
false
false
false
false
false
0
putString(const char *stringVal, const Uint32 stringLen) { errorFlag = EC_Normal; /* determine VM of the string */ unsigned long vm = DcmElement::determineVM(stringVal, stringLen); if (vm > 0) { const DcmEVR evr = getTag().getEVR(); Uint8 ...
false
false
false
false
false
0
s48_extract_af(s48_call_t call, s48_ref_t sch_af_val) { long af_val = s48_extract_long_2(call, sch_af_val); if (af_val > 100) /* unknown address family */ return af_val - 100; else switch (af_val) { case 0: return AF_INET; case 1: return AF_INET6; case 2: return AF_UNIX; ...
false
false
false
false
false
0
ungrab_time(void) { Time t = event_time(); if (grab_time == CurrentTime || !(t == CurrentTime || event_time_after(t, grab_time))) /* When the time moves backward on the server, then we can't use the grab time because that will be in the future. So instead we have to use Cur...
false
false
false
false
false
0
find_and_add_ghkm_phrase(const vector<pair<int,int> >& regions, int startR, int endR, const string& tag,int predicate_index){ /* * do this iteratively: * 1. Initialize the source side phrase, covering the all the regions * 2. Determine the minimal target side phrase, using the alignment information * 3. ...
false
false
false
false
false
0
RecordX86Relocation(MachObjectWriter *Writer, const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFix...
false
false
false
true
false
1
operator=(const char * position) { if (!sync ()) return; if (static_cast<unsigned>(position- m_utfbuf) > m_strbuf->byteLength ()) { m_utfptr = m_utfbuf + m_strbuf->byteLength (); } else { m_utfptr = position; } }
false
false
false
false
false
0
get_priority(char *path, unsigned int *priority) { char *p; if ((p = strrchr(path, (int) '.')) == NULL) return(-1); if (strnum(p + 1, STRNUM_UI, priority) == -1) return(-1); return(0); }
false
false
false
false
false
0
dc1394_MONO16_to_MONO8(uint8_t *restrict src, uint8_t *restrict dest, uint32_t width, uint32_t height, uint32_t bits) { register int i = ((width*height)<<1)-1; register int j = (width*height)-1; register int y; while (i >= 0) { y = src[i--]; dest[j--] = (y + (src[i--]<<8))>>(bits-8); ...
false
false
false
false
false
0
s_pack_into(PyObject *self, PyObject *args) { PyStructObject *soself; char *buffer; Py_ssize_t buffer_len, offset; /* Validate arguments. +1 is for the first arg as buffer. */ soself = (PyStructObject *)self; assert(PyStruct_Check(self)); assert(soself->s_codes != NULL); if (PyTuple_GE...
false
false
false
false
true
1
efs_readdir(struct file *file, struct dir_context *ctx) { struct inode *inode = file_inode(file); efs_block_t block; int slot; if (inode->i_size & (EFS_DIRBSIZE-1)) pr_warn("%s(): directory size not a multiple of EFS_DIRBSIZE\n", __func__); /* work out where this entry can be found */ block = ctx->pos >...
false
false
false
false
false
0
f_sec(int count, VALUE **vals) { VALUE result; VALUE tmp; NUMBER *err; /* initialize VALUEs */ result.v_subtype = V_NOSUBTYPE; tmp.v_subtype = V_NOSUBTYPE; err = conf->epsilon; if (count == 2) { if (vals[1]->v_type != V_NUM || qiszero(vals[1]->v_num)) return error_value(E_SEC1); err = vals[1]->v_num; ...
false
false
false
false
false
0
draw_vline (GtkStyle *style, GdkWindow *window, GtkStateType state_type, GdkRectangle *area, GtkWidget *widget, const gchar *detail, gint y1, gint y2, gint x) { BluecurveStyle *bluecurve_style = BLUECURVE_STYLE (style); gint thickness...
false
false
false
false
false
0
readyToRead(int fd) { fd_set readfds; struct timeval zeroTimeout = {0, 0}; /* Zero: will use to poll, not wait.*/ FD_ZERO(&readfds); FD_SET(fd, &readfds); select(fd + 1, &readfds, NULL, NULL, &zeroTimeout); return FD_ISSET(fd, &readfds); }
false
false
false
false
false
0
ftp_lite_get_response( struct ftp_lite_server *s, int accept_note, char *buffer ) { int c; char dash; int result; int response; int fields; int do_message = 0; while(1) { switch(s->authtype) { case PLAIN: result = ftp_lite_get_response_raw(s,buffer); break; case GLOBUS_GSS: /* Depending ...
false
false
false
false
false
0
textWidth(const char * const text, unsigned int size) const { if (text == 0 || m_fontstruct == 0) return 0; // check rotated font? if (m_rotfont != 0) return rotTextWidth(text, size); return XTextWidth(m_fontstruct, text, size); }
false
false
false
false
false
0
sd_wait_voltage_stable_2(struct realtek_pci_sdmmc *host) { struct rtsx_pcr *pcr = host->pcr; int err; u8 stat, mask, val; /* Wait 1.8V output of voltage regulator in card stable */ msleep(50); /* Toggle SD clock again */ err = rtsx_pci_write_register(pcr, SD_BUS_STAT, 0xFF, SD_CLK_TOGGLE_EN); if (err < 0) r...
false
false
false
false
false
0
free_NCList(void) { if(numfiles > 0) return; /* not empty */ if(nc_filelist != NULL) free(nc_filelist); nc_filelist = NULL; }
false
false
false
false
false
0
add_tunnel(String namein, String nameout) { Hookup hin(get_element(namein, TUNNEL_TYPE), 0); Hookup hout(get_element(nameout, TUNNEL_TYPE), 0); bool ok = true; if (_c->_elements[hin.idx] != TUNNEL_TYPE) { redeclaration_error(_errh, "element", namein, landmark(), _c->_element_landmarks[hin.idx]); ok =...
false
false
false
false
false
0
mmc_eject_media( const CdIo_t *p_cdio ) { int i_status = 0; i_status = mmc_prevent_allow_medium_removal(p_cdio, false, false, 0); if (0 != i_status) return i_status; return mmc_start_stop_unit(p_cdio, true, false, 0, 0); }
false
false
false
false
false
0
yytnamerr_ (const char *yystr) { if (*yystr == '"') { std::string yyr = ""; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp...
false
false
false
false
false
0
find_tree_node(const char *name, int modid) { struct tree *tp, *headtp; int count, *int_p; if (!name || !*name) return (NULL); headtp = tbuckets[NBUCKET(name_hash(name))]; for (tp = headtp; tp; tp = tp->next) { if (tp->label && !label_compare(tp->label, name)) { ...
false
false
false
false
false
0
_bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab) { bfd_size_type idx; for (idx = 1; idx < tab->size; ++idx) tab->array[idx]->refcount = 0; }
false
false
false
false
false
0
opt_fn(__isl_take isl_point *pnt, void *user) { struct isl_opt_data *data = (struct isl_opt_data *)user; isl_val *val; val = isl_qpolynomial_eval(isl_qpolynomial_copy(data->qp), pnt); if (data->first) { data->first = 0; data->opt = val; } else if (data->max) { data->opt = isl_val_max(data->opt, val); } els...
false
false
false
false
false
0
EmitSigned(int64_t Value) { DU.addSInt(DIE, dwarf::DW_FORM_sdata, Value); }
false
false
false
false
false
0
describe_signed_constant (gint64 value) { gchar *desc; if (value == G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MININT) desc = g_strdup ("G_MININT"); else if (value == G_MAXUINT) desc = g_strdup ("G_MAXUINT"); else if (value == G_MAXLONG) desc = g_strdup ("G_MAXLONG"); else ...
false
false
false
false
false
0
case_6_7_helper(struct connection_data *conn, int color) { struct heap_entry *data = conn->heap[0]; int pos = data->coming_from; int apos = data->target; int other = OTHER_COLOR(color); if (ladder_capturable(apos, other)) ENQUEUE(conn, pos, apos, data->distance, FP(0.6), apos, NO_MOVE); else { int ...
false
false
false
false
false
0
select_g_ba_get_dims(void) { uint32_t plugin_id; if (slurm_select_init(0) < 0) return NULL; if (working_cluster_rec) plugin_id = working_cluster_rec->plugin_id_select; else plugin_id = select_context_default; return (*(ops[plugin_id].ba_get_dims))(); }
false
false
false
false
false
0
abituguru3_update_device(struct device *dev) { int i; struct abituguru3_data *data = dev_get_drvdata(dev); mutex_lock(&data->update_lock); if (!data->valid || time_after(jiffies, data->last_updated + HZ)) { /* Clear data->valid while updating */ data->valid = 0; /* Read alarms */ if (abituguru3_read_increm...
false
false
false
false
false
0
parse_flav ( char c, enum FLAVOUR * flav ) { switch( c ) { case 'H': case 'P': case 'R': case 's': case 'U': case 'x': case 'X': if ( * flav == SILENT ) * flav = c; return 1; break; default: return 0; } }
false
false
false
false
false
0
file_write(ang_file *f, const char *buf, size_t n) { int fd = fileno(f->fh); #ifndef SET_UID while (n >= WRITE_BUF_SIZE) { if (write(fd, buf, WRITE_BUF_SIZE) != WRITE_BUF_SIZE) return FALSE; buf += WRITE_BUF_SIZE; n -= WRITE_BUF_SIZE; } #endif /* !SET_UID */ if (write(fd, buf, n) != (int)n) return ...
false
false
false
false
false
0
long_desc_cb(unsigned UNUSED n, const H5E_error2_t *err_desc, void *client_data) { char *real_desc = (char *)client_data; if(err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0) return(0); else return(-1); }
false
false
false
false
false
0
set_section_addresses(Symbol_table*, Layout*, uint64_t* dot_value, uint64_t*, uint64_t* load_address) { typedef std::list<Output_section::Input_section> Input_section_list; bool have_load_address = *load_address != *dot_value; uint64_t address = *...
false
false
false
false
false
0
ensure_polling (UDisksLinuxMDRaid *mdraid, gboolean polling_on) { if (polling_on) { if (mdraid->polling_timeout == 0) { mdraid->polling_timeout = g_timeout_add_seconds (1, on_polling_timout, ...
false
false
false
false
false
0
win_alloc_aucmd_win() { aucmd_win = win_alloc(NULL, TRUE); if (aucmd_win != NULL) { win_init_some(aucmd_win, curwin); RESET_BINDING(aucmd_win); new_frame(aucmd_win); } }
false
false
false
false
false
0
FindExtensionByName(const string& key) const { Symbol result = file()->tables_->FindNestedSymbolOfType(this, key, Symbol::FIELD); if (!result.IsNull() && result.field_descriptor->is_extension()) { return result.field_descriptor; } else { return NULL; } }
false
false
false
false
false
0
_bt_delitems_vacuum(Relation rel, Buffer buf, OffsetNumber *itemnos, int nitems, BlockNumber lastBlockVacuumed) { Page page = BufferGetPage(buf); BTPageOpaque opaque; /* No ereport(ERROR) until changes are logged */ START_CRIT_SECTION(); /* Fix the page */ if (nitems > 0) PageIndexMultiDelete(page,...
false
false
false
false
false
0
read(reg8 offset) { switch (offset) { case 0x19: return potx.readPOT(); case 0x1a: return poty.readPOT(); case 0x1b: return voice[2].wave.readOSC(); case 0x1c: return voice[2].envelope.readENV(); default: return bus_value; } }
false
false
false
false
false
0
usage(int err) /* print syntax & exit */ { FILE* o = stdout; if(err) { o = stderr; fprintf(o, "You made some mistake in program usage... let me briefly remind you:\n\n"); } print_title(o); fprintf(o,"\nusage: %s [option(s)] [file(s) | URL(s) | -]\n", prgName); fprintf(o,"supported options [defaults in brac...
false
false
false
false
false
0
eel_canvas_item_accessible_initialize (AtkObject *obj, gpointer data) { if (ATK_OBJECT_CLASS (accessible_item_parent_class)->initialize != NULL) ATK_OBJECT_CLASS (accessible_item_parent_class)->initialize (obj, data); g_object_set_data (G_OBJECT (obj), "atk-component-layer", GINT_TO_POINTER (ATK_LAYER_MDI)); ...
false
false
false
false
false
0
gm_world_log_allowed(GmWorld *world, GmLogType type) { GmOptions *options = gm_app_options(gm_app_instance()); if (!gm_options_get_int(options, "logging_enable")) { return FALSE; } if (gm_options_get_int(world->priv->options, "logging_override")) { options = world->priv->options; } switch (type) { c...
false
false
false
false
false
0
gupnp_context_set_default_language (GUPnPContext *context, const char *language) { g_return_if_fail (GUPNP_IS_CONTEXT (context)); g_return_if_fail (language != NULL); char *old_language = context->priv->default_language; if ((old_language != NULL)...
false
false
false
false
false
0
H1_norm_uh_d(const QUAD *quad, const DOF_REAL_D_VEC *u_h) { FUNCNAME("H1_norm_uh_d"); EVAL_TRAVERSE_DATA td[1] = {{0}}; int deg; if (!(td->uh_d = u_h)) { ERROR("no DOF vector u_h; returning 0.0\n"); return(0.0); } if (!quad) { deg = 2*td->uh_d->fe_space->bas_fcts->degree-2; quad = ...
false
false
false
false
false
0
Find_filename_match(T_Fileselector *list, char * fname) { short best_match; T_Fileselector_item * current_item; short item_number; byte matching_letters=0; byte counter; best_match=-1; item_number=0; for (current_item=list->First; current_item!=NULL; current_item=current_item->Next) { if ( (!C...
false
false
false
false
false
0
check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) { struct _mesa_prim prim; struct _mesa_index_buffer ib; GLuint min, max; /* Only the X Server needs to do this -- otherwise, accessing outside * array/BO bounds allows application termin...
false
false
false
false
false
0
cl_commlib_set_global_param(cl_global_settings_params_t parameter, cl_bool_t value) { pthread_mutex_lock(&cl_com_global_settings_mutex); switch(parameter) { case CL_COMMLIB_DELAYED_LISTEN: { cl_com_global_settings.delayed_listen = value; break; } } pthread_mutex_unlock...
false
false
false
false
false
0
chd_ph_config_destroy(cmph_config_t *mph) { chd_ph_config_data_t *data = (chd_ph_config_data_t *) mph->data; DEBUGP("Destroying algorithm dependent data\n"); if(data->occup_table) { free(data->occup_table); data->occup_table = NULL; } free(data); }
false
false
false
false
false
0
hpi_outstream_get_info_ex(u32 h_outstream, u16 *pw_state, u32 *pbuffer_size, u32 *pdata_to_play, u32 *psamples_played, u32 *pauxiliary_data_to_play) { struct hpi_message hm; struct hpi_response hr; hpi_init_message_response(&hm, &hr, HPI_OBJ_OSTREAM, HPI_OSTREAM_GET_INFO); if (hpi_handle_indexes(h_outstream, &h...
false
false
false
false
false
0
gl_merge_vcard_get_record (glMerge *merge) { glMergeVCard *merge_vcard; glMergeRecord *record; EContactField field_id; glMergeField *field; char *vcard; EContact *contact; merge_vcard = GL_MERGE_VCARD (merge); vcard = parse_next_vcard(merge_vcard->pr...
false
false
false
false
false
0
ois_read_into_buffer(SMSCenter *smsc, long wait_usec) { int ret; SAY(8, "ois_read_into_buffer"); if (smsc->socket == -1) { if ((smsc->ois_flags & OIS_FLAG_CLOSED) == 0) { debug("bb.sms.ois", 0, "attempting to read from a closed socket"); smsc->ois_flags |= OIS_FLAG_CLOSED; } return 0; } e...
false
false
false
false
false
0
simple_set_aux_byte(struct dvb_frontend *fe, u8 config, u8 aux) { struct tuner_simple_priv *priv = fe->tuner_priv; int rc; u8 buffer[2]; buffer[0] = (config & ~0x38) | 0x18; buffer[1] = aux; tuner_dbg("setting aux byte: 0x%02x 0x%02x\n", buffer[0], buffer[1]); rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer...
false
false
false
false
false
0
init() { int icompute = modify->find_compute(id_pe); if (icompute < 0) error->all(FLERR,"Potential energy ID for fix neb does not exist"); pe = modify->compute[icompute]; // turn off climbing mode, NEB command turns it on after init() rclimber = -1; // setup xprev and xnext arrays memory->destroy(...
false
false
false
false
false
0
gst_controller_get_control_source (GstController * self, const gchar * property_name) { GstControlledProperty *prop; GstControlSource *ret = NULL; g_return_val_if_fail (GST_IS_CONTROLLER (self), NULL); g_return_val_if_fail (property_name, NULL); g_mutex_lock (self->lock); if ((prop = gst_controller_fi...
false
false
false
false
false
0
__asinf (float x) { if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) && _LIB_VERSION != _IEEE_) { /* asin(|x|>1) */ feraiseexcept (FE_INVALID); return __kernel_standard_f (x, x, 102); } return __ieee754_asinf (x); }
false
false
false
false
false
0
DoTerminalPty(int master) { unsigned char term_buf[1024] = {0,0, }; ssize_t len=read(master, term_buf, sizeof(term_buf)); if(len == -1 && errno == EIO) { // this happens when the child is about to exit, we // give it time to actually exit, otherwise we run // into a race so we sleep for h...
false
false
false
false
false
0
intel_crt_set_dpms(struct intel_encoder *encoder, int mode) { struct drm_device *dev = encoder->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_crt *crt = intel_encoder_to_crt(encoder); struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); const struct drm_display_mode *adjusted...
false
false
false
false
false
0
print_whole_buff(void) { int trace; for (trace = 0; trace < buff_pntr; trace++) if (buff[trace] != '\0') myputchar(buff[trace]); fflush(stdout); }
false
false
false
false
false
0
fixrdataset(ns_client_t *client, dns_rdataset_t **rdataset) { if (*rdataset == NULL) *rdataset = query_newrdataset(client); else if (dns_rdataset_isassociated(*rdataset)) dns_rdataset_disassociate(*rdataset); }
false
false
false
false
false
0
ep0_queue(struct bdc_ep *ep, struct bdc_req *req) { struct bdc *bdc; int ret; bdc = ep->bdc; dev_dbg(bdc->dev, "%s()\n", __func__); req->usb_req.actual = 0; req->usb_req.status = -EINPROGRESS; req->epnum = ep->ep_num; if (bdc->delayed_status) { bdc->delayed_status = false; /* if status stage was delayed? ...
false
false
false
false
false
0
open_note(int chan, int pitch) /* When a note for a specific channel is turned on, we save the time when it was switched on. */ { int index; /*printf("%f %d\n",Mf_currtime/(float) division,pitch); */ index = 128 * chan + pitch; if (index < 0 || index > 2047) printf("illegal chan/pitch %d %d\n", chan...
false
false
false
false
false
0
DotSection() { IfTrace0((FontDebug), "DotSection\n"); InDotSection = !InDotSection; return(0); }
false
false
false
false
false
0
getMaterialDesc() { // Each material request a new object. // Sometimes the object is already created (see 'o' tag by example), but it is not initialized ! // So, we create a new object only if the current on is already initialized ! if (m_pModel->m_pCurrent != NULL && ( m_pModel->m_pCurrent->m_Meshes.size() > 1 ...
false
false
false
false
false
0
Copy () { HSlotComp* copy = new HSlotComp((SlotGraphic*) GetGraphic()->Copy()); copy->_mobility = _mobility; return copy; }
false
false
false
false
false
0
o_bus_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) { TOPLEVEL *toplevel = w_current->toplevel; OBJECT *new_obj; int color; GList *prev_conn_objects = NULL; g_assert( w_current->inside_action != 0 ); if (toplevel->override_bus_color == -1) { color = BUS_COLOR; } else { color = toplevel->over...
false
false
false
false
false
0
jdns_response_copy(const jdns_response_t *r) { jdns_response_t *c = jdns_response_new(); ARRAY_COPY(jdns_rr_t, r->answerRecords, r->answerCount, c->answerRecords, c->answerCount, jdns_rr_copy); ARRAY_COPY(jdns_rr_t, r->authorityRecords, r->authorityCount, c->authorityRecords, c->authorityCount, jdns_rr_copy); ARRAY...
false
false
false
false
false
0
gst_mpeg_descriptor_find_all (GstMPEGDescriptor * desc, gint tag) { GArray *all; guint8 length; guint8 *current; guint size; g_return_val_if_fail (desc != NULL, NULL); all = g_array_new (TRUE, TRUE, sizeof (guint8 *)); current = desc->data; length = desc->data_length; while (length > 0) { if (...
false
false
false
false
false
0
xgbe_config_rss(struct xgbe_prv_data *pdata) { int ret; if (!pdata->hw_feat.rss) return; if (pdata->netdev->features & NETIF_F_RXHASH) ret = xgbe_enable_rss(pdata); else ret = xgbe_disable_rss(pdata); if (ret) netdev_err(pdata->netdev, "error configuring RSS, RSS disabled\n"); }
false
false
false
false
false
0
timeout_getretry(p_timeout tm) { if (tm->block < 0.0 && tm->total < 0.0) { return -1; } else if (tm->block < 0.0) { double t = tm->total - timeout_gettime() + tm->start; return MAX(t, 0.0); } else if (tm->total < 0.0) { double t = tm->block - timeout_gettime() + tm->start; ...
false
false
false
false
false
0
backsql_delete_attr_f( void *v_at, void *v_bda ) { backsql_at_map_rec *at = (backsql_at_map_rec *)v_at; backsql_delete_attr_t *bda = (backsql_delete_attr_t *)v_bda; int rc; rc = backsql_modify_delete_all_values( bda->op, bda->rs, bda->dbh, bda->e_id, at ); if ( rc != LDAP_SUCCESS ) { return BACKSQL_AVL_ST...
false
false
false
false
false
0
hybrid_pref_new(const gchar *name) { HybridPref *pref; gchar *config_path; if (!(config_path = hybrid_config_get_path())) { hybrid_debug_error("pref", "get config path error."); return NULL; } pref = g_new0(HybridPref, 1); pref->filename = g_strdup_printf("%s/%s", config_path,...
false
false
false
false
false
0
data_cal_view_finalize (GObject *object) { EDataCalViewPrivate *priv; priv = E_DATA_CAL_VIEW_GET_PRIVATE (object); g_free (priv->object_path); reset_array (priv->adds); reset_array (priv->changes); reset_array (priv->removes); g_array_free (priv->adds, TRUE); g_array_free (priv->changes, TRUE); g_array_fre...
false
false
false
false
false
0
fixupResponseMimetype() { if (m_mimeType.isEmpty()) return; kDebug(7113) << "before fixup" << m_mimeType; // Convert some common mimetypes to standard mimetypes if (m_mimeType == QLatin1String("application/x-targz")) m_mimeType = QLatin1String("application/x-compressed-tar"); else i...
false
false
false
false
false
0
turnOnPower (LCDData *LCDData) { /// MPL the new way if (myTurnOnPowerOutputCB != NULL) { if (myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( LCDData->myNumber) == NULL || myRobot->getRobotParams()->getLCDMTXBoardPowerOutput ( LCDData->myNumber) [0] == '\0') { ArLog::log (ArLog::Norm...
false
false
false
false
false
0
rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) { int ret = 0; struct sta_info *psta = NULL; struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct sta_priv *pstapriv = &padapter->stapriv; DBG_88E("rtw_get_sta_wpaie, sta_...
false
false
false
false
false
0
get_mp3_info(mp3info *mp3) { int l; int bitrate,lastrate; int counter=0; struct stat filestat; off_t sample_pos; stat(mp3->filename,&filestat); mp3->datasize=filestat.st_size; get_id3(mp3); if(get_first_header(mp3,0L)) { mp3->offset=ftell(mp3->file); lastrate=15-mp...
false
false
false
false
false
0
ReadValue(XMLReadingMachine& reader, const pugi::xml_node& element) const { std::string text; reader.ReadTextNode(text, element); int number; sscanf(text.c_str(), " %d", &number); return new TreeBool(number ? true : false); }
false
false
false
false
false
0
RevertUniqueIndices(const FCDGeometryPolygonsInput& inPInput, FCDGeometryPolygonsInput& outPInput, const FCDGeometryIndexTranslationMap& translationMap) { FUFail(;) // NOT_TESTED size_t tmSize = translationMap.size(); uint32 largest = 0; for (FCDGeometryIndexTranslationMap::const_iterator it = translation...
false
false
false
false
false
0
ssh_gssapi_free(ssh_session session){ OM_uint32 min; if (session->gssapi == NULL) return; SAFE_FREE(session->gssapi->user); SAFE_FREE(session->gssapi->mech.elements); gss_release_cred(&min,&session->gssapi->server_creds); if (session->gssapi->client.creds != session->...
false
false
false
false
false
0
beam_get_collision(int objnum, int num, int *collision_objnum, mc_info **cinfo) { // sanity checks if((objnum < 0) || (objnum >= MAX_OBJECTS)){ Int3(); return 0; } if((Objects[objnum].instance < 0) || (Objects[objnum].instance >= MAX_BEAMS)){ Int3(); return 0; } if((Beams[Objects[objnum].instance].objnum ...
false
false
false
false
false
0
IntPtrTEvent(const char* name, intptr_t value) { if (FLAG_log) UncheckedIntPtrTEvent(name, value); }
false
false
false
false
false
0
ChangeController( TweenieEntry *entry ) { if ( gui_active ) { frame_type type = FRAME; if ( entry->GetPosition() == 0 ) type = LOCKED_KEY; else if ( entry->IsEditable() ) type = KEY; gui_active = false; bool isPreviewing = GetSelectedFramesForFX().IsPreviewing(); if ( isPrevi...
false
false
false
false
false
0
git_signature_now(git_signature **sig_out, const char *name, const char *email) { int error; time_t now; time_t offset; struct tm *utc_tm, *local_tm; git_signature *sig; #ifndef GIT_WIN32 struct tm _utc, _local; #endif *sig_out = NULL; time(&now); /** * On Win32, `gmtime_r` doesn't exist but * `gmtime`...
false
false
false
false
false
0
gf_isom_new_generic_subtitle_description(GF_ISOFile *movie, u32 trackNumber, char *content_encoding, char *xml_schema_loc, ...
false
false
false
false
false
0
nccf_add_history(int ncid, const char *history) { time_t now; char *hist_str; char timestamp[NCCF_MAX_TIMESTAMP_LEN + 1]; struct tm *timptr; int ret; if (!history) return NC_NOERR; /* Get the date and time. */ time(&now); if (!(timptr = localtime(&now))) return CF_ETIME; if (...
false
false
false
false
false
0
dib8000_reset_pll_common(struct dib8000_state *state, const struct dibx000_bandwidth_config *bw) { dprintk("ifreq: %d %x, inversion: %d", bw->ifreq, bw->ifreq, bw->ifreq >> 25); if (state->revision != 0x8090) { dib8000_write_word(state, 23, (u16) (((bw->internal * 1000) >> 16) & 0xffff)); dib8000_write_word(s...
false
false
false
false
false
0
_gcr_record_set_char (GcrRecord *record, guint column, gchar value) { g_return_if_fail (record != NULL); g_return_if_fail (column < record->n_columns); g_return_if_fail (value != 0); record_take_column (record, column, record_block_new (&value, 1)); }
false
false
false
false
false
0
complex_classic_div(PyObject *v, PyObject *w) { Py_complex quot; Py_complex a, b; TO_COMPLEX(v, a); TO_COMPLEX(w, b); if (Py_DivisionWarningFlag >= 2 && PyErr_Warn(PyExc_DeprecationWarning, "classic complex division") < 0) return NULL; PyFPE_START_PROTECT("com...
false
false
false
false
false
0
Compress_PKLIB( char * pbOutBuffer, int * pcbOutBuffer, char * pbInBuffer, int cbInBuffer, int * /* pCmpType */, int /* nCmpLevel */) { TDataInfo Info; // Data information char * work_buf = ALLOCMEM(char, CMP_BUFFER_SIZE); // Pklib's work buf...
false
false
false
false
false
0
is_name_unique(struct lib_context *lc, struct raid_set *rs) { char *bn; struct raid_set *rs1, *rs2; list_for_each_entry(rs1, LC_RS(lc), list) { if (rs1->type == t_group) { list_for_each_entry(rs2, &rs1->sets, list) { bn = get_rs_basename(rs2->name); if (!strcmp(bn, rs->name)) goto out_used; } ...
false
false
false
false
false
0
tools_make_date(const string & chemin, infinint access, infinint modif) { struct utimbuf temps; time_t tmp = 0; access.unstack(tmp); temps.actime = tmp; tmp = 0; modif.unstack(tmp); temps.modtime = tmp; if(utime(chemin.c_str() , &temps) < 0) Erange("to...
false
false
false
false
false
0
copy_signature( PKT_signature *d, PKT_signature *s ) { int n, i; if( !d ) d = xmalloc(sizeof *d); memcpy( d, s, sizeof *d ); n = pubkey_get_nsig( s->pubkey_algo ); if( !n ) d->data[0] = mpi_copy(s->data[0]); else { for(i=0; i < n; i++ ) d->data[i] = mpi_copy( s->data[i] ); } d->...
false
true
false
false
true
1
epr_str_to_data_type_id(const char* str) { assert(str != NULL); if (epr_equal_names(str, "UChar") || epr_equal_names(str, "uchar")) return e_tid_uchar; else if (epr_equal_names(str, "AChar") || epr_equal_names(str, "SChar") || epr_equal_names(str, "char")) return e_tid_char; else if (epr...
false
false
false
false
false
0
writeBounds(char *line, size_t lineLen, const char *logPrefix) const { if ((line == NULL) || (lineLen <= 0) || (logPrefix == NULL)) { ArLog::log(ArLog::Normal, "ArConfigArg::writeBounds() invalid input");...
false
false
false
false
false
0
egg_buffer_set_allocator (EggBuffer *buffer, EggBufferAllocator allocator) { unsigned char *buf = NULL; if (!allocator) allocator = DEFAULT_ALLOCATOR; if (buffer->allocator == allocator) return 1; if (buffer->allocated_len) { /* Reallocate memory block using new allocator */ buf = (allocator) (NULL, buffe...
false
true
false
false
false
1
cloog_loop_print_structure(FILE * file, CloogLoop * loop, int level) { int i, j, first=1 ; if (loop) { /* Go to the right level. */ for (i=0; i<level; i++) fprintf(file,"|\t") ; fprintf(file,"+-- CloogLoop\n") ; } /* For each loop. */ while (loop) { if (!first) { /* Go to the right ...
false
false
false
false
false
0
trackLocation( const Meta::TrackPtr &track ) const { KUrl path = track->playableUrl(); if( path.isEmpty() ) return track->uidUrl(); if( !m_relativePaths || m_url.isEmpty() || !path.isLocalFile() || !m_url.isLocalFile() ) return path.toEncoded(); QDir playlistDir( m_url.directory() ); ...
false
false
false
false
false
0