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
hdrl_join_mask_on_imagelist(cpl_imagelist * list, cpl_mask * new_mask, cpl_mask *** pold_mask) { cpl_ensure_code(list, CPL_ERROR_NULL_INPUT); cpl_ensure_code(new_mask, CPL_ERROR_NULL_INPUT); if (pold_mask) { *pold_mask = cpl_malloc(sizeof(*pold_mask) * ...
false
false
false
false
false
0
vsdestroynode(void * n /* IN: Node in TBBT-tree */) { VDATA *vs = NULL; intn i; if (n != NULL) { vs = ((vsinstance_t *) n)->vs; if (vs != NULL) { /* Free the dynamicly allocated VData fields */ for(i=0; i<vs->wlist.n; i++) ...
false
false
false
false
false
0
dhcp_failover_process_update_done (dhcp_failover_state_t *state, failover_message_t *msg) { struct timeval tv; log_info ("failover peer %s: peer update completed.", state -> name); state -> curUPD = 0; switch (state -> me.state) { case unknown_state: case partner_down: case normal...
false
false
false
false
false
0
FuncALL_RNAMES ( Obj self ) { Obj copy, s; UInt i; Char* name; copy = NEW_PLIST( T_PLIST+IMMUTABLE, CountRNam ); for ( i = 1; i <= CountRNam; i++ ) { name = NAME_RNAM( i ); C_NEW_STRING(s, strlen(name), name); ...
false
false
false
false
false
0
bsd_split_3 (char *s, size_t s_len, unsigned char **hex_digest, char **file_name, bool escaped_filename) { size_t i; if (s_len == 0) return false; /* Find end of filename. */ i = s_len - 1; while (i && s[i] != ')') i--; if (s[i] != ')') return false; *file_name = s; if (es...
false
false
false
false
false
0
asn_parse_double(u_char * data, size_t * datalength, u_char * type, double *doublep, size_t doublesize) { static const char *errpre = "parse double"; register u_char *bufp = data; u_long asn_length; long tmp; union { double doubl...
false
true
false
false
true
1
bttv_s_fbuf(struct file *file, void *f, const struct v4l2_framebuffer *fb) { struct bttv_fh *fh = f; struct bttv *btv = fh->btv; const struct bttv_format *fmt; int retval; if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RAWIO)) return -EPERM; /* check args */ fmt = format_by_fourcc(fb->fmt.pixelformat)...
false
false
false
false
false
0
F_mpz_div_2exp(F_mpz_t f, const F_mpz_t g, const ulong exp) { F_mpz d = *g; if (!COEFF_IS_MPZ(d)) // g is small { F_mpz_set_si(f, d>>exp); } else // g is large { __mpz_struct * mpz_ptr = _F_mpz_promote(f); // g is already large mpz_div_2exp(mpz_ptr, F_mpz_arr + COEFF_TO_OFF(d), exp); _F_mpz_demo...
false
false
false
false
false
0
check_all_layer_finished(Hetero_Stasche **sinfo_vec) { int i; Hetero_Stasche *sinfo; for (i = 1; i < get_max_mtg_id() + 1; i++) { sinfo = sinfo_vec[i]; if (sinfo == NULL || !sinfo->unified) { continue; } if (sinfo->scheduling != DONE || nu...
false
false
false
false
false
0
ResetFunctionAnalyser(void) { if(prototypes) DeleteStringList2(prototypes); prototypes=NULL; if(cur_func) { Function func=CurFile->functions; int delete_cur_func=1; while(func) { if(func==cur_func) delete_cur_func=0; func=func->next; } if(delete_cur_func) ...
false
false
false
false
false
0
gx_dc_pure_fill_rectangle(const gx_device_color * pdevc, int x, int y, int w, int h, gx_device * dev, gs_logical_operation_t lop, const gx_rop_source_t * source) { if (source == NULL && lop_no_S_is_T(lop)) return (*dev_proc(dev, fill_rectangle)) (dev, x, y, w, h, ...
false
false
false
false
false
0
ssb_pmu_init(struct ssb_chipcommon *cc) { u32 pmucap; if (!(cc->capabilities & SSB_CHIPCO_CAP_PMU)) return; pmucap = chipco_read32(cc, SSB_CHIPCO_PMU_CAP); cc->pmu.rev = (pmucap & SSB_CHIPCO_PMU_CAP_REVISION); ssb_dbg("Found rev %u PMU (capabilities 0x%08X)\n", cc->pmu.rev, pmucap); if (cc->pmu.rev == 1) ...
false
false
false
false
false
0
ShowAccountListHelper(QueryResult* result, uint32* limit, bool title, bool error) { if (!result) { if (error) SendSysMessage(LANG_ACCOUNT_LIST_EMPTY); return true; } ///- Display the list of account/characters online if (!m_session && title) ...
false
false
false
false
false
0
recvv (iovec *io_vec, const ACE_Time_Value *timeout) const { ACE_TRACE ("ACE_SSL_SOCK_Stream::recvv"); // From ACE_SOCK_IO::recvv(). #if defined (FIONREAD) ACE_Handle_Set handle_set; handle_set.reset (); handle_set.set_bit (this->get_handle ()); io_vec->iov_base = 0; // Chec...
false
false
false
false
false
0
CanGetValueAs( const wxSheetCoords& coords, const wxString& typeName ) { if ((typeName == wxSHEET_VALUE_NUMBER) || (typeName == wxSHEET_VALUE_CHOICEINT)) { const wxString val(GetValue(coords)); long lval = 0; return val.ToLong(&lval); } else if (...
false
false
false
false
false
0
class_name() { if (IsJSFunction() && IsJSFunctionProxy()) { return GetHeap()->function_class_symbol(); } if (map()->constructor()->IsJSFunction()) { JSFunction* constructor = JSFunction::cast(map()->constructor()); return String::cast(constructor->shared()->instance_class_name()); } // If the cons...
false
false
false
false
false
0
gst_avi_demux_find_next (GstAviDemux * avi, gfloat rate) { guint64 min_time, max_time; guint stream_num, i; max_time = 0; min_time = G_MAXUINT64; stream_num = -1; for (i = 0; i < avi->num_streams; i++) { guint64 position; GstAviStream *stream; stream = &avi->stream[i]; /* ignore streams ...
false
false
false
false
false
0
loadFromFile(const string& filename) { // open file FILE *f = fopen(filename.c_str(), "rb"); if (f == NULL) return -1; fcloser fc(f); // get file length fseek(f, 0, SEEK_END); size_t length = (size_t)ftell(f); fseek(f, 0, SEEK_SET); if (length < 4096) return -2; // read the header size_...
false
false
false
false
false
0
prep_cfg_vflist(void) { register int32 fi; __last_lbf = __last_inf; /* set open file/macro exp./include stack to empty */ for (fi = 0; fi < MAXFILNEST; fi++) __vinstk[fi] = NULL; __vin_top = -1; __lasttoktyp = UNDEF; __last_attr_prefix = FALSE; /* this builds the empty top of stack entry */ __push_vinfil(); ...
false
false
false
false
false
0
member_kind() { CHECK_NOT_DESTROYED; if( !pd_member ) throw DynamicAny::DynAny::InvalidValue(); return pd_member_kind; }
false
false
false
false
false
0
mymemcnt(const char *mem, int len, const char *pat, int pat_len) { register int offset = 0; int nfound = 0; while (len >= 0) { offset = mymemfind(mem, len, pat, pat_len); if (offset == -1) break; mem += offset + pat_len; len -= offset + pat_len; nfound++; } return nfound; }
false
false
false
false
false
0
mysql_get_oauth_key(const u08bits *kid, oauth_key_data_raw *key) { int ret = -1; char statement[TURN_LONG_STRING_SIZE]; snprintf(statement,sizeof(statement),"select ikm_key,timestamp,lifetime,hkdf_hash_func,as_rs_alg,as_rs_key,auth_alg,auth_key from oauth_key where kid='%s'",(const char*)kid); MYSQL * myc = get_m...
false
false
false
false
false
0
substitute ( const char* const in, const char* out, const int nmatch, const GMatchInfo* const minfo) { vString* result = vStringNew (); const char* p; for (p = out ; *p != '\0' ; p++) { if (*p == '\\' && isdigit ((int) *++p)) { const int dig = *p - '0'; int so, eo; if (0 < dig && dig < nmat...
false
false
false
false
false
0
dc_datetime_mktime (dc_datetime_t *dt) { if (dt == NULL) return -1; struct tm tm; tm.tm_year = dt->year - 1900; tm.tm_mon = dt->month - 1; tm.tm_mday = dt->day; tm.tm_hour = dt->hour; tm.tm_min = dt->minute; tm.tm_sec = dt->second; tm.tm_isdst = -1; return mktime (&tm); }
false
false
false
false
false
0
__getcwd (char *buf, size_t size) { char *path; char *result; #ifndef NO_ALLOCATION size_t alloc_size = size; if (size == 0) { if (buf != NULL) { __set_errno (EINVAL); return NULL; } alloc_size = MAX (PATH_MAX, __getpagesize ()); } if (buf == NULL) { path = malloc (all...
false
false
false
false
false
0
set_variable(const char *var, const char *value) { char comm[1024]; if (value == NULL || *value == '\0') { (void)loc_snprintf(comm, sizeof(comm), "unset %s\n", var); } else if (bourne_b) { (void)loc_snprintf(comm, sizeof(comm), "%s=%s\nexport %s\n", var, value, var); } else if (rcshell_b...
false
false
false
false
false
0
wb_view_sheet_focus (WorkbookView *wbv, Sheet *sheet) { if (wbv->current_sheet != sheet) { /* Make sure the sheet has been attached */ g_return_if_fail (sheet == NULL || sheet->index_in_wb >= 0); #if 0 g_print ("Focus %s\n", sheet ? sheet->name_quoted : "-"); #endif wbv->current_sheet = sheet; wbv->current...
false
false
false
false
false
0
GetImage() const { if (sampler == NULL) return NULL; const FCDEffectParameterSurface* surface = sampler->GetSurface(); if (surface == NULL) return NULL; return surface->GetImage(); }
false
false
false
false
false
0
fileExists(const char * name, const char * suffix) { struct stat statBuf; // Defined in <sys/stat.h> fileNameT fname; strCopy(fname, name); strAppend(fname, suffix); if(stat(fname, &statBuf) != 0) { return false; } return true; }
false
false
false
false
false
0
cvt_d(ajint code, VALIST ap, int (*put) (int c, void *cl), void *cl, const ajuint *flags, ajint width, ajint precision) { long val = 0; #if defined(HAVE64) ajlong hval = 0; #endif /* HAVE64 */ ajulong m = 0; char buf[43]; char *p = buf + sizeof buf; (void) c...
false
false
false
false
false
0
fromMimeData( const QMimeData *mimeData, QDomDocument& doc ) { KBookmark::List bookmarks; QByteArray payload = mimeData->data( "application/x-xbel" ); if ( !payload.isEmpty() ) { doc.setContent( payload ); QDomElement elem = doc.documentElement(); const QDomNodeList children = elem.c...
false
false
false
false
false
0
be_busy_poll(struct napi_struct *napi) { struct be_eq_obj *eqo = container_of(napi, struct be_eq_obj, napi); struct be_adapter *adapter = eqo->adapter; struct be_rx_obj *rxo; int i, work = 0; if (!be_lock_busy_poll(eqo)) return LL_FLUSH_BUSY; for_all_rx_queues_on_eq(adapter, eqo, rxo, i) { work = be_process...
false
false
false
false
false
0
unpack_sha1_rest(z_stream *stream, void *buffer, unsigned long size, const unsigned char *sha1) { int bytes = strlen(buffer) + 1; unsigned char *buf = xmalloc(1+size); unsigned long n; int status = Z_OK; n = stream->total_out - bytes; if (n > size) n = size; memcpy(buf, (char *) buffer + bytes, n); bytes = n...
false
false
false
false
true
1
CamFLoad(Camera *proto, IOBFILE *inf, char *fname) { Pool *p; Camera *cam = NULL; p = PoolStreamTemp(fname, inf, NULL, 0, &CamOps); if(p == NULL) return NULL; if(proto != NULL) OOGLError(1, "Note: CamFLoad(cam, ...) can't handle cam != NULL"); (void) CamStreamIn(p, NULL, &cam); PoolDelete...
false
false
false
false
false
0
flickr_photoset_set_n_photos (FlickrPhotoset *self, const char *value) { if (value != NULL) self->n_photos = atoi (value); else self->n_photos = 0; }
false
false
false
false
true
1
gwy_container_gis_boolean(GwyContainer *container, GQuark key, gboolean *value) { GValue *p; if ((p = gwy_container_gis_value_of_type(container, key, G_TYPE_BOOLEAN))) { *value = !!g_value_get_boolean(p); return TRUE; } return FALSE; }
false
false
false
false
false
0
apds990x_lux_to_threshold(struct apds990x_chip *chip, u32 lux) { u32 thres; u32 cpl; u32 ir; if (lux == 0) return 0; else if (lux == APDS_RANGE) return APDS_RANGE; /* * Reported LUX value is a combination of the IR and CLEAR channel * values. However, interrupt threshold is only for clear channel. * T...
false
false
false
false
false
0
aoe_ktstart(struct ktstate *k) { struct task_struct *task; init_completion(&k->rendez); task = kthread_run(kthread, k, "%s", k->name); if (task == NULL || IS_ERR(task)) return -ENOMEM; k->task = task; wait_for_completion(&k->rendez); /* allow kthread to start */ init_completion(&k->rendez); /* for waiting for...
false
false
false
false
false
0
vt_ctrl_ED(struct cpssp *cpssp, unsigned int mode) { switch (mode) { case 0: /* Erase from cursor (incl.) to end of screen */ vt_erase_region(cpssp, cpssp->ts.row, cpssp->ts.col, MAX_ROWS-1, MAX_COLS); break; case 1: /* Erase from beginning of screen to cursor */ vt_erase_region(cpssp, 0, 0, cpssp->ts.row, cps...
false
false
false
false
false
0
multi_common_render_text() { int i, fh, line_count; fh = gr_get_font_height(); line_count = 0; gr_set_color_fast(&Color_text_normal); for ( i = Multi_common_top_text_line; i < Multi_common_num_text_lines; i++ ) { if ( line_count >= Multi_common_text_max_display[gr_screen.res] ){ break; } gr_string(Mul...
false
false
false
false
false
0
mono_test_marshal_variant_out_bool_true_unmanaged(VarRefFunc func) { VARIANT vt; VariantInit (&vt); func (VT_BOOL, &vt); if (vt.vt == VT_BOOL && vt.boolVal == VARIANT_TRUE) return 0; return 1; }
false
false
false
false
false
0
internal_endpwent (ent_t *ent) { if (nss_endpwent) nss_endpwent (); if (ent->stream != NULL) { fclose (ent->stream); ent->stream = NULL; } if (ent->netgroup) __internal_endnetgrent (&ent->netgrdata); ent->first = ent->netgroup = false; if (ent->blacklist.data != NULL) { ...
false
false
false
false
false
0
MOD_EXP_CTIME_COPY_TO_PREBUF(const BIGNUM *b, int top, unsigned char *buf, int idx, int width) { size_t i, j; if (top > b->top) top = b->top; /* this works because 'buf' is explicitly zeroed */ for (i = 0, j=idx; i < top * sizeof b->d[0]; i++, j+=width) { buf[j] = ((unsigned char*)b->d)[i]; } return 1; ...
false
false
false
false
false
0
add_email_attachment(FILE *p, struct ast_vm_user *vmu, char *format, char *attach, char *greeting_attachment, char *mailbox, char *bound, char *filename, int last, int msgnum) { char tmpdir[256], newtmp[256]; char fname[256]; char tmpcmd[256]; int tmpfd = -1; int soxstatus = 0; /* Eww. We want formats to tell us...
true
true
false
false
true
1
map_nodes() { assert(is_device()); assert(0 <= min_nodes()); //assert(min_nodes() <= net_nodes()); assert(net_nodes() <= max_nodes()); //assert(ext_nodes() + int_nodes() == matrix_nodes()); for (int ii = 0; ii < ext_nodes()+int_nodes(); ++ii) { _n[ii].map(); } if (subckt()) { subckt()->map_nod...
false
false
false
false
false
0
wake_queued_writers(struct super_block *s) { struct reiserfs_journal *journal = SB_JOURNAL(s); if (test_and_clear_bit(J_WRITERS_QUEUED, &journal->j_state)) wake_up(&journal->j_join_wait); }
false
false
false
false
false
0
last_dtu_entry_table(Dtu_entry_table *entry_head) { Dtu_entry_table *dpt; if (entry_head == NULL) { return NULL; } for (dpt = entry_head; dpt->next != NULL; dpt = dpt->next); return dpt; }
false
false
false
false
false
0
selectMovementGenerator(Creature* creature) { MovementGeneratorRegistry& mv_registry(MovementGeneratorRepository::Instance()); MANGOS_ASSERT(creature->GetCreatureInfo() != NULL); MovementGeneratorCreator const* mv_factory = mv_registry.GetRegistryItem( creature->GetOwnerG...
false
false
false
false
false
0
ClassPartInitialize(WidgetClass gclass) { CloseShellWidgetClass class, super; class = (CloseShellWidgetClass)gclass; super = (CloseShellWidgetClass)class->core_class.superclass; if (class->close_shell_class.close_window == XtInheritCloseWindow) class->close_shell_class.close_window = super->clos...
false
false
false
false
false
0
decryptPassword(const wxString& cipher, const wxString& context) { wxString mpw = MasterPassword::getMasterPassword(); if (mpw.IsEmpty()) return wxEmptyString; Isaac isc(mpw+context); return isc.deCipher(cipher); }
false
false
false
false
false
0
add_did_cache_entry(struct afp_volume * volume, unsigned int new_did, char * path) { struct did_cache_entry * new, *old_base; #ifdef DID_CACHE_DISABLE return 0; #endif if ((new=malloc(sizeof(* new)))==NULL) return -1; memset(new,0,sizeof(*new)); new->did=new_did; memcpy(new->dirname,path,AFP_MAX_PATH); ...
false
true
false
false
false
1
Perl_find_lexical_cv(pTHX_ PADOFFSET off) { PADNAME *name = PAD_COMPNAME(off); CV *compcv = PL_compcv; while (PadnameOUTER(name)) { assert(PARENT_PAD_INDEX(name)); compcv = CvOUTSIDE(PL_compcv); name = PadlistNAMESARRAY(CvPADLIST(compcv)) [off = PARENT_PAD_INDEX(name)]; } assert(!PadnameIsOUR(n...
false
false
false
false
false
0
effective_offset(offs_t offset) { int shift = activecpu_address_shift(); if (shift < 0) return offset >> -shift; else return offset << shift; }
false
false
false
false
false
0
gw_encode_file_base64 ( gchar *src, gchar *dst) { FILE *f, *g; unsigned char buff[3]; int i = 0; gint result = -1; #ifdef GW_DEBUG_TOOLS_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); #endif if ( src != NULL && dst != NULL ) { if ( !(f = fopen ( src, "r"))) { ...
true
true
false
false
true
1
stonith_fence_get_devices_cb(GList * devices, void *user_data) { async_command_t *cmd = user_data; stonith_device_t *device = NULL; crm_info("Found %d matching devices for '%s'", g_list_length(devices), cmd->victim); if (g_list_length(devices) > 0) { /* Order based on priority */ devic...
false
false
false
false
false
0
first_dim_aux(rfftwnd_mpi_plan p, int n_fields, fftw_real *local_data) { int local_ny = p->p_transpose->local_ny; int nx = p->p_fft_x->n; fftw_complex *work_1d = p->work ? p->work : p->p_fft->work; n_fields *= p->p_fft->n_after[0]; /* dimensions after y no longer need be considere...
false
false
false
false
false
0
executeImprima(list<ExprValue>& args) { ios_base::fmtflags old = cout.flags(ios_base::fixed); int oldp = cout.precision(2); stringstream s; for(list<ExprValue>::iterator it = args.begin(); it != args.end(); ++it) { ExprValue ss = (*it); switch((*it).type) { case TIPO_INTEIRO: cout << (int...
false
false
false
false
false
0
ivtv_convert_ivtv_vbi(struct ivtv *itv, u8 *p) { u32 linemask[2]; int i, l, id2; int line = 0; if (!memcmp(p, "itv0", 4)) { memcpy(linemask, p + 4, 8); p += 12; } else if (!memcmp(p, "ITV0", 4)) { linemask[0] = 0xffffffff; linemask[1] = 0xf; p += 4; } else { /* unknown VBI data, convert to empty VBI ...
false
false
false
false
false
0
find_peer ( const char *ip ) { peer *p; p = g_hash_table_lookup( peer_tab, ip ); if (p == NULL) { p = peer_new( nocat_conf, ip ); g_hash_table_insert( peer_tab, (gpointer) p->ip, p ); } return p; }
false
false
false
false
false
0
nearly_runnable_resource_share() { double x = 0; for (unsigned int i=0; i<projects.size(); i++) { PROJECT* p = projects[i]; if (p->non_cpu_intensive) continue; if (p->nearly_runnable()) { x += p->resource_share; } } return x; }
false
false
false
false
false
0
smk_find_entry(const char *string) { unsigned int hash; struct hlist_head *head; struct smack_known *skp; hash = full_name_hash(string, strlen(string)); head = &smack_known_hash[hash & (SMACK_HASH_SLOTS - 1)]; hlist_for_each_entry_rcu(skp, head, smk_hashed) if (strcmp(skp->smk_known, string) == 0) return s...
false
false
false
false
false
0
_backlight_omap_panel_getBrightness (BacklightOmapPanel* self) { gint result = 0; gint value = 0; const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gint _tmp5_ = 0; gint _tmp6_ = 0; gint _tmp7_ = 0; g_return_val_if_fail (self != NULL, 0); _tm...
false
false
false
false
false
0
lcp_send_proto_rej(struct ppp_t *ppp, uint16_t proto) { struct ppp_lcp_t *lcp = container_of(ppp_find_layer_data(ppp, &lcp_layer), typeof(*lcp), ld); struct rej_msg_t { struct lcp_hdr_t hdr; uint16_t proto; } __attribute__((packed)) msg = { .hdr.proto = htons(PPP_LCP), .hdr.code = PROTOREJ, .hdr.id = ++lc...
false
false
false
false
false
0
agent_ok_input(GtkButton *button, gpointer user_data) { const char *name, *passphrase, *wpspin; GtkToggleButton *toggle; gboolean wps = FALSE; GtkEntry *entry; name = passphrase = wpspin = NULL; entry = (GtkEntry *)gtk_builder_get_object(cui_builder, "hidden_entry"); if (gtk_entry_get_text_length(entry)...
false
false
false
false
false
0
finger_present(unsigned char *img, size_t len, int sum_threshold) { int i, sum; sum = 0; for (i = 0; i < len; i++) { if (img[i] < 160) { sum++; } } fp_dbg("finger_present: sum is %d\n", sum); return sum < sum_threshold ? 0 : 1; }
false
false
false
false
false
0
xen_unregister_watchers(struct xenvif *vif) { if (vif->credit_watch.node) { unregister_xenbus_watch(&vif->credit_watch); kfree(vif->credit_watch.node); vif->credit_watch.node = NULL; } }
false
false
false
false
false
0
ThreadAction () { while (!ShouldStop () && midi) { bzero(_buffer, MIDI_BUF_SIZE); int bytes_read = midi->read(_buffer, MIDI_BUF_SIZE); if (bytes_read == -1) { cout << "error reading from midi device" << endl; break; } if (bytes_read > 0 && _handler) _handler->HandleMidiData(_buffer, bytes_read); ...
false
false
false
false
false
0
lpfc_dump_static_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, uint16_t offset) { MAILBOX_t *mb; struct lpfc_dmabuf *mp; mb = &pmb->u.mb; /* Setup to dump vport info region */ memset(pmb, 0, sizeof(LPFC_MBOXQ_t)); mb->mbxCommand = MBX_DUMP_MEMORY; mb->un.varDmp.type = DMP_NV_PARAMS; mb->un.varDmp.entry_in...
false
false
false
false
false
0
stroke(const Color* color, const Brush* b) { CanvasRep* c = rep(); PathRenderInfo* p = &CanvasRep::path_; int n = p->cur_point_ - p->point_; if (n < 2) { return; } c->flush(); c->color(color); c->brush(b); XDisplay* dpy = c->display_->rep()->display_; XDrawable d = c->drawbuffer...
false
false
false
false
false
0
direct_thread_is_canceled( DirectThread *thread ) { D_MAGIC_ASSERT( thread, DirectThread ); return thread->canceled; }
false
false
false
false
false
0
clear() { if( _theCells != 0 ) { for( uint i = 0; i < _height; i++ ) { for( uint j = 0; j < _width; j++ ) { delete _theCells[i][j]; } delete [] _theCells[i]; } delete [] _theCells; } _theCells = 0; _width = 0; _height = 0; if(_path) { delete _path; _path = 0; } }
false
false
false
false
false
0
get_input(int prompt_position) { struct view *view; int i, key, cursor_y, cursor_x; if (prompt_position) input_mode = TRUE; while (TRUE) { bool loading = FALSE; foreach_view (view, i) { update_view(view); if (view_is_displayed(view) && view->has_scrolled && use_scroll_redrawwin) redrawwin(...
false
false
false
false
false
0
xml_element_free (xml_element *elem) { xmlrpc_mem_block *children; int size, i; xml_element **contents; XMLRPC_ASSERT_ELEM_OK(elem); free(elem->_name); elem->_name = XMLRPC_BAD_POINTER; xmlrpc_mem_block_clean(&elem->_cdata); /* Deallocate all of our children recursively. */ childr...
false
false
false
true
true
1
find_member(const char *name) { struct category *cat; struct member *mem; AST_LIST_TRAVERSE(&categories, cat, list) { AST_LIST_TRAVERSE(&cat->members, mem, list) { if (mem->is_separator) { continue; } if (!strcasecmp(name, mem->name)) { return mem; } } } return NULL; }
false
false
false
false
false
0
SQLBulkOperations_Internal ( SQLHSTMT statementHandle, SQLSMALLINT Operation) { STMT (stmt, statementHandle); HPROC hproc; RETCODE retcode; switch (Operation) { case SQL_ADD: case SQL_UPDATE_BY_BOOKMARK: case SQL_DELETE_BY_BOOKMARK: case SQL_FETCH_BY_BOOKMARK: break; de...
false
false
false
false
false
0
lastIndexOf (void *value_, unsigned int startPos_) const { if (_len > 0) { unsigned int i; i = (startPos_ < _len) ? startPos_ : _len -1; for (; i; --i) if (_pOperations->isElementEqual (_pElements, i, value_)) return i; if (_pOperations->isElementEqual (_pElements, i, val...
false
false
false
false
false
0
dvb_dmxdev_filter_stop(struct dmxdev_filter *dmxdevfilter) { struct dmxdev_feed *feed; struct dmx_demux *demux; if (dmxdevfilter->state < DMXDEV_STATE_GO) return 0; switch (dmxdevfilter->type) { case DMXDEV_TYPE_SEC: if (!dmxdevfilter->feed.sec) break; dvb_dmxdev_feed_stop(dmxdevfilter); if (dmxdevfil...
false
false
false
false
false
0
main(int argc, char **argv) { int ret = 0, ch; const char *log_fname = NULL; const char *cookie_fname = NULL; argv0 = *argv; memset(&global_cfg, 0, sizeof global_cfg); global_cfg.verbosity = OUT_INFO; setbuf(stdout, NULL); signal(SIGPIPE, sigh); signal(SIGWINCH, term_winch); global_cfg.prog_dot = !isatt...
false
false
false
false
true
1
CheckModified() /* called on exit */ { struct s *SDesc; struct cc *Cx = Context; char *TypeIn; while (Cx) { if (Cx->ccModified) { sprintf(TypeOut,"Cell %s has been modified. Save it? (y) ", Cx->ccMaster); ShowPrompt(TypeOut); TypeIn = FBEdit(...
false
false
false
false
false
0
ET_Get_File_Description_From_Extension (const gchar *extension) { guint i; if (!extension) // Unknown file return (ET_File_Description*) &ETFileDescription[ET_FILE_DESCRIPTION_SIZE]; for (i=0; i<ET_FILE_DESCRIPTION_SIZE; i++) // Use of '<' instead of '<=' to avoid to test for Unknown file ...
false
false
false
false
false
0
draw_string (SushiFontWidget *self, cairo_t *cr, GtkBorder padding, const gchar *text, gint *pos_y) { cairo_font_extents_t font_extents; cairo_text_extents_t extents; GtkTextDirection text_dir; gint pos_x; text_dir = gtk_widget_get_direction (GTK_WIDGET (self)); cairo...
false
false
false
false
false
0
cs_diag_clearmsg(CS_CONTEXT *context, CS_INT type) { struct cs_diag_msg *curptr, *freeptr; tdsdump_log(TDS_DBG_FUNC, "cs_diag_clearmsg(%p, %d)\n", context, type); curptr = context->msgstore; context->msgstore = NULL; while (curptr != NULL ) { freeptr = curptr; curptr = freeptr->next; free(fr...
false
false
false
false
false
0
carregaColorsPersonalitzatsPeces(){ for(int i=0;i<conjuntJoc->arrayPeces.size();i++){ QString color=configuracioJoc->configArxiu->value(QString("%1/%2") .arg(configuracioJoc->tipusTangram) .arg(i),"").toString(); if ( !color.isEmpty()){ conjun...
false
false
false
false
false
0
setDiscontiguosAttribute(collIterate *source, const UnicodeString &buffer) { /* okay confusing part here. to ensure that the skipped characters are considered later, we need to place it in the appropriate position in the normalization buffer and reassign the pos pointer. simple case if pos reside in str...
false
false
false
false
false
0
L6() {register object *base=vs_base; register object *sup=base+VM6; VC6 vs_check; {object V10; object V11; V10=(base[0]); V11=(base[1]); vs_top=sup; goto TTL; TTL:; {register object x= CMPcar((V10)),V12= ((object)VV[17]); while(V12!=Cnil) if(eql(x,V12->c.c_car)){ goto T4; }else V12=V12->c.c_cdr; goto T3;}...
false
false
false
false
false
0
cuddZddUnion( DdManager * zdd, DdNode * P, DdNode * Q) { int p_top, q_top; DdNode *empty = DD_ZERO(zdd), *t, *e, *res; DdManager *table = zdd; statLine(zdd); if (P == empty) return(Q); if (Q == empty) return(P); if (P == Q) return(P); /* Check cache */ res = cuddCacheLook...
false
false
false
false
false
0
update_phi_components (basic_block bb) { gimple_stmt_iterator gsi; for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) { gimple phi = gsi_stmt (gsi); if (is_complex_reg (gimple_phi_result (phi))) { tree lr, li; gimple pr = NULL, pi = NULL; unsigned int i, n; lr = get_c...
false
false
false
false
false
0
dbgprintf(struct InternalInstruction* insn, const char* format, ...) { char buffer[256]; va_list ap; if (!insn->dlog) return; va_start(ap, format); (void)vsnprintf(buffer, sizeof(buffer), format, ap); va_end(ap); insn->dlog(insn->dlogArg, buffer); retu...
false
false
false
false
false
0
EnvUngetcRouter( void *theEnv, int ch, char *logicalName) { struct router *currentPtr; /*===================================================*/ /* If the "fast load" option is being used, then the */ /* logical name is actually a pointer to a file and */ /* ungetc can be called directly to bypas...
false
false
false
false
false
0
GammaBuilder_addLVAR(CTX ctx, kflag_t flag, ktype_t type, ksymbol_t fn, int ucnt) { kindex_t idx = DP(ctx->gma)->gsize; knh_gamma2_t *gf = DP(ctx->gma)->gf; kTerm *tkIDX = new_TermTYPED(ctx, TT_LVAR, type, idx - DP(ctx->gma)->fvarsize); if(!(idx < DP(ctx->gma)->gcapacity)) { gf = GammaBuilder_expand(ctx, ctx->gma...
false
false
false
false
false
0
Parg(const char *argname) { int l; if (vb2.buf[vb2.used++] != ' ') Psyntax("not a space before argument"); l= strlen(argname); if (memcmp(vb2.buf+vb2.used,argname,l)) Psyntax("argument name wrong"); vb2.used+= l; if (vb2.buf[vb2.used++] != '=') Psyntax("not = after argument name"); }
false
false
false
false
false
0
PR_NetAddrToString( const PRNetAddr *addr, char *string, PRUint32 size) { if (!_pr_initialized) _PR_ImplicitInitialization(); #if !defined(_PR_HAVE_GETADDRINFO) return pr_NetAddrToStringFB(addr, string, size); #else #if defined(_PR_INET6_PROBE) if (!_pr_ipv6_is_present()) return pr_NetAddrToStr...
false
false
false
false
false
0
discharge2anyreg (FuncState *fs, expdesc *e) { if (e->k != VNONRELOC) { luaK_reserveregs(fs, 1); discharge2reg(fs, e, fs->freereg-1); } }
false
false
false
false
false
0
get_base_name(char *qrname) { const char *hintqr_symbol = ".hint.mq"; const char *qr_symbol = ".mq"; if (is_end_with(qrname, hintqr_symbol)) return copy_substring(qrname, 0, strlen(qrname) - strlen(hintqr_symbol)); if (is_end_with(qrname, qr_symbol)) return copy_substring(qrname, ...
false
false
false
false
false
0
LPConeView(LPCone lpcone){ smatx* A=lpcone->A; int i,j,jj,info; const int *row=A->col,*nnz=A->nnz; int n=A->ncol,m=A->nrow; const double *an=A->an; double cc; DSDPVec C=lpcone->C; DSDPFunctionBegin; printf("LPCone Constraint Matrix\n"); printf("Number y variables 1 through %d\n",m); for (i=0; i<...
false
false
false
false
false
0
iTCO_wdt_remove(struct platform_device *dev) { if (iTCO_wdt_private.tco_res || iTCO_wdt_private.smi_res) iTCO_wdt_cleanup(); return 0; }
false
false
false
false
false
0
str_new(klass, ptr, len) VALUE klass; const char *ptr; long len; { VALUE str; if (len < 0) { rb_raise(rb_eArgError, "negative string size (or size too big)"); } str = str_alloc(klass); RSTRING(str)->len = len; RSTRING(str)->aux.capa = len; RSTRING(str)->ptr = ALLOC_N(char,len+...
false
false
false
false
false
0
xmlrpc_value_set_type(XMLRPCValue *val, int v_type) { if (val == NULL) return -1; switch(v_type) { case xr_scalar: case xr_array: case xr_struct: val->v_type = v_type; break; default: error(0, "XMLRPC: value type not supported."); ...
false
false
false
false
false
0
GC_exclude_static_roots(void *b, void *e) { DCL_LOCK_STATE; /* Adjust the upper boundary for safety (round down) */ e = (void *)((word)e & ~(sizeof(word) - 1)); if (b == e) return; /* nothing to exclude? */ LOCK(); GC_exclude_static_roots_inner(b, e); UNLOCK(); }
false
false
false
false
false
0
ConnectScatterField(Pointer p) { struct arg_scatter *arg = (struct arg_scatter *)p; Object ino, newino=NULL; Field base; Array missing; ino = arg->ino; newino = DXApplyTransform(ino,NULL); switch (DXGetObjectClass(newino)) { case CLASS_FIELD: base = arg->base; missing = arg->missing; ...
false
false
false
false
false
0