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
workq_init(workq_t *wq, int threads, void (*engine)(void *arg)) { int status; status = pthread_attr_init(&wq->attr); if ( status != 0 ) return(status); status = pthread_attr_setdetachstate(&wq->attr, PTHREAD_CREATE_DETACHED); if ( status != 0 ) { pthread_attr_destroy(&wq->attr); return(status); }...
false
false
false
false
false
0
createOrDie(const std::vector<std::string> &Paths) { std::string Error; if (auto SCL = create(Paths, Error)) return SCL; report_fatal_error(Error); }
false
false
false
false
false
0
ftpListDir(FtpStateData * ftpState) { if (ftpState->flags.dir_slash) { debug(9, 3) ("Directory path did not end in /\n"); strCat(ftpState->title_url, "/"); ftpState->flags.isdir = 1; } ftpSendPasv(ftpState); }
false
false
false
false
false
0
print_CRT_primes (const int verbosity, const char *prefix, const mpzspm_t ntt_context) { double modbits = 0.; unsigned int i; if (test_verbose (verbosity)) { outputf (verbosity, "%s%lu", prefix, ntt_context->spm[0]->sp); modbits += log ((double) ntt_context->spm[0]->sp); for (i = 1;...
false
false
false
false
false
0
zd_usb_iowrite16v_async_start(struct zd_usb *usb) { ZD_ASSERT(usb_anchor_empty(&usb->submitted_cmds)); ZD_ASSERT(usb->urb_async_waiting == NULL); ZD_ASSERT(!usb->in_async); ZD_ASSERT(mutex_is_locked(&zd_usb_to_chip(usb)->mutex)); usb->in_async = 1; usb->cmd_error = 0; usb->urb_async_waiting = NULL; }
false
false
false
false
false
0
event(QEvent* e) { if (e->type() == QEvent::ToolTip) { QPoint pos = ((QHelpEvent*) e)->pos(); e->setAccepted(maybeTip(pos)); return true; } return Q3ListView::event(e); }
false
false
false
false
false
0
fprint_ldif(FILE *f, char *name, char *val, ber_len_t len) { char *s; if((s = ldif_put(LDIF_PUT_VALUE, name, val, len)) == NULL) return(-1); fputs(s, f); ber_memfree(s); return(0); }
false
false
false
false
false
0
add_next_index_long(zval *arg, long n) /* {{{ */ { zval *tmp; MAKE_STD_ZVAL(tmp); ZVAL_LONG(tmp, n); return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL); }
false
false
false
false
false
0
window_menu_size_allocate (PanelApplet *applet, GtkAllocation *allocation, WindowMenu *window_menu) { PanelAppletOrient orient; GList *children; GtkWidget *child; orient = panel_applet_get_orient (applet); children = gtk_container_get_children (GTK_CONTAINER (window_menu->sele...
false
false
false
false
false
0
sge_error_to_answer_list(sge_error_class_t *eh, lList **alpp, bool clear_errors) { sge_error_iterator_class_t *iter = NULL; if (eh == NULL || alpp == NULL) { return; } iter = eh->iterator(eh); while (iter && iter->next(iter)) { answer_list_add(alpp, iter->get_messag...
false
false
false
false
false
0
fiL2FloatDist(float *u0, float *u1, int i0, int j0, int i1, int j1, int xradius, int yradius, int width0, int width1) { float dist = 0.0f; for(int s = -yradius; s <= yradius; s++) { int l = (j0 + s) * width0 + (i0 - xradius); float *ptr0 = &u0[l]; l = (j1 + s) * width1 + (i1 - xrad...
false
false
false
false
false
0
L5() {register object *base=vs_base; register object *sup=base+VM5; VC5 vs_check; bds_check; bds_bind(((object)VV[3]),base[0]); vs_top=sup; goto TTL; TTL:; if(!(immnum_plusp((((object)VV[3])->s.s_dbind)))){ goto T9;}{object V5; V5= (((object)VV[3])->s.s_dbind); V6= immnum_plus((((object)VV[4])->s.s_dbind),sma...
false
false
false
false
false
0
threadpool_jobs_dec (MonoObject *obj) { MonoDomain *domain; int remaining_jobs; if (obj == NULL) return FALSE; domain = obj->vtable->domain; remaining_jobs = InterlockedDecrement (&domain->threadpool_jobs); if (remaining_jobs == 0 && domain->cleanup_semaphore) { ReleaseSemaphore (domain->cleanup_semaphore, ...
false
false
false
false
false
0
foo_scroll_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { FooScrollArea *scroll_area = FOO_SCROLL_AREA (widget); GdkRectangle new_viewport; GdkRectangle old_viewport; cairo_region_t *old_allocation; cairo_region_t *invalid; GtkAllocation widget_allocat...
false
false
false
false
false
0
imFileOpen(const char* file_name, int *error) { assert(file_name); imFileFormatBase* ifileformat = imFileFormatBaseOpen(file_name, error); if (!ifileformat) return NULL; imFileClear(ifileformat); ifileformat->attrib_table = new imAttribTable(599); imFileSetBaseAttributes(ifileformat); ifileformat...
false
false
false
false
false
0
get_line( FILE* param_file ) { char line[255]; f_line* formated_line = new f_line(); bool found_interpretable_line = false; while ( !feof( param_file ) && !found_interpretable_line ) { if ( !fgets( line, 255, param_file ) ) { delete formated_line; return NULL; } format_line( for...
false
false
false
false
false
0
player_display_padlock_view() { int padlock_view_index=0; if ( Viewer_mode & VM_PADLOCK_UP ) { padlock_view_index = 0; } else if ( Viewer_mode & VM_PADLOCK_REAR ) { padlock_view_index = 1; } else if ( Viewer_mode & VM_PADLOCK_LEFT ) { padlock_view_index = 2; } else if ( Viewer_mode & VM_PADLOCK_RIGHT ) { ...
false
false
false
false
false
0
OnKochConf() { Datafile cfg = get_configuration(); sec_it this_sec = cfg.section("Koch"); cin.ignore(); update_option(this_sec->option("Chars"), insert_chars); update_option(this_sec->option("StringsNumber"), insert_strnum); update_option(this_sec->option("StringLength"), insert_strlen); ...
false
false
false
false
false
0
dbus_server_setup_with_g_main (DBusServer *server, GMainContext *context) { ConnectionSetup *old_setup; ConnectionSetup *cs; /* FIXME we never free the slot, so its refcount just keeps growing, * which is kind of broken. */ dbus_server_allocate_data_slot (&server_slot);...
false
false
false
false
false
0
getResult(int target, Route *result) { int lTarget = target; int allocSize = 10; int *route = malloc(sizeof(int)*allocSize); int i = 0; int count = 0; // Node is not part of the graph if(target >= result->countNodes) { printf("ERROR!. The target does not exist.\n"); } else { int success = 1; // Trave...
false
false
false
false
false
0
getProperty(const char *key, const char *dflt) const { map<string, string>::const_iterator i; i = property_map.find(key); return i == property_map.end() ? dflt : (*i).second.c_str(); }
false
false
false
false
false
0
addGlobalVariable(DIGlobalVariable DIG) { if (!DIDescriptor(DIG).isGlobalVariable()) return false; if (!NodesSeen.insert(DIG)) return false; GVs.push_back(DIG); return true; }
false
false
false
false
false
0
parport_cs_release(struct pcmcia_device *link) { parport_info_t *info = link->priv; dev_dbg(&link->dev, "parport_release\n"); if (info->ndev) { struct parport *p = info->port; parport_pc_unregister_port(p); } info->ndev = 0; pcmcia_disable_device(link); }
false
false
false
false
false
0
SetClockAlarm(unset) bool unset; /* unset alarm if none needed */ { if (TimeDisplayed && UpdFreq != 0) (void) alarm((unsigned) (UpdFreq - (time((time_t *)NULL) % UpdFreq))); else if (unset) alarm((unsigned)0); }
false
false
false
false
false
0
uninstall_style_scheme (const gchar *id) { GtkSourceStyleSchemeManager *manager; GtkSourceStyleScheme *scheme; const gchar *filename; g_return_val_if_fail (id != NULL, FALSE); manager = gtk_source_style_scheme_manager_get_default (); scheme = gtk_source_style_scheme_manager_get_scheme (manager, id); if (schem...
false
false
false
false
false
0
FAMClose(FAMConnection* fc) { delete (Client *)fc->client; return(0); }
false
false
false
false
false
0
assemoutWriteNextSam(AjPOutfile outfile, const AjPAssem assem) { AjPFile outf = ajOutfileGetFile(outfile); AjPAssemContig c = NULL; AjPAssemRead r = NULL; AjPAssemTag t = NULL; AjPAssemContig* contigs = NULL; AjIList j = NULL; AjPStr argstr = NULL; const AjPStr headertext = NULL; ...
false
false
false
false
false
0
uvd_v4_2_set_dcm(struct amdgpu_device *adev, bool sw_mode) { u32 tmp, tmp2; tmp = RREG32(mmUVD_CGC_CTRL); tmp &= ~(UVD_CGC_CTRL__CLK_OFF_DELAY_MASK | UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK); tmp |= UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK | (1 << UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT) | (4 << UVD_CGC_CTRL__C...
false
false
false
false
false
0
php_network_connect_socket(php_socket_t sockfd, const struct sockaddr *addr, socklen_t addrlen, int asynchronous, struct timeval *timeout, char **error_string, int *error_code) { #if HAVE_NON_BLOCKING_CONNECT php_non_blocking_flags_t orig_flags; int n; int error = 0; socklen_t len; int ret = 0; SET_S...
false
false
false
false
false
0
assert_comments_equal (GDataComment *new_comment, GDataPicasaWebComment *original_comment) { GList *authors; GDataAuthor *author; g_assert (GDATA_IS_PICASAWEB_COMMENT (new_comment)); g_assert (GDATA_IS_PICASAWEB_COMMENT (original_comment)); g_assert (GDATA_PICASAWEB_COMMENT (new_comment) != original_comment); g...
false
false
false
false
false
0
set_changed(bool changed) { if (!changed) { for (pref_map_t::iterator it = _pref_map_old.begin();it != _pref_map_old.end();) { ProfileValue *value = _pref_map_old[(*it).first]; // Need to increment it before actually erasing the value from the map // but pass...
false
false
false
false
false
0
sec_pkcs12_set_nickname_for_cert(sec_PKCS12SafeBag *cert, sec_PKCS12SafeBag *key, SECItem *nickname) { if(!nickname || !cert) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } if(sec_pkcs12_set_nickname(cert, nickname) != SECSuccess) { return SECFailure; } if(key) { if(...
false
false
false
false
false
0
init_tmds_chip_info(void) { viafb_tmds_trasmitter_identify(); if (INTERFACE_NONE == viaparinfo->chip_info->tmds_chip_info. output_interface) { switch (viaparinfo->chip_info->gfx_chip_name) { case UNICHROME_CX700: { /* we should check support by hardware layout.*/ if ((viafb_display_hardware_layout =...
false
false
false
false
false
0
sourcerc(int *argc_ptr, char ***argv_ptr) { char *env; int xargc = 1; char **xargv; xargv = xmalloc(2*sizeof *xargv); xargv[0] = **argv_ptr; xargv[1] = NULL; env = getenv("CFLOW_OPTIONS"); if (env) { int argc; char **argv; argcv_get(env, "", "#", &argc, &argv...
false
false
false
false
false
0
create_auto_update (GtkWidget *vbox) { GtkWidget *label; GtkWidget *box; guint i; /* auto update */ label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("<b>Auto-Update:</b>")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (vbo...
false
false
false
false
false
0
afr_sh_entry_impunge_parent_setattr_cbk (call_frame_t *setattr_frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preop, struct iatt *postop) { loc_t *paren...
false
false
false
false
false
0
compare_face(const New_Face *a, const New_Face *b) { if (strcmp(a->name, "bug.111") == 0) { if (strcmp(b->name, "bug.111") == 0) return 0; return -1; } else if (strcmp(b->name, "bug.111") == 0) return 1; return strcmp(a->name, b->name); }
false
false
false
false
false
0
determineRelativePath( const QString & path ) { // now let's make it relative d->m_sRelativePath = KGlobal::dirs()->relativeLocation("apps", path); if (d->m_sRelativePath.startsWith('/')) { d->m_sRelativePath =KGlobal::dirs()->relativeLocation("xdgdata-apps", path); if (d->m_sRelativePat...
false
false
false
false
false
0
getValue(unsigned int i) const { Node const *child = _view->stochasticChildren()[i]; double y = child->value(_chain)[0]; if (_family[i] == GLM_BINOMIAL) { double N = child->parents()[1]->value(_chain)[0]; y /= N; } if (_link[i] == 0) { return y; } else { double mu = _link[i]->value(_cha...
false
false
false
false
false
0
nes_store_ee_cmd(struct device_driver *ddp, const char *buf, size_t count) { char *p = (char *)buf; u32 val; u32 i = 0; struct nes_device *nesdev; if (p[1] == 'x' || p[1] == 'X' || p[0] == 'x' || p[0] == 'X') { val = simple_strtoul(p, &p, 16); list_for_each_entry(nesdev, &nes_dev_list, list) { if (i == ee...
false
false
false
false
false
0
rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) { /* exclude ICV */ unsigned char crc[4]; struct arc4context mycontext; int curfragnum, length; u32 keylength; u8 *pframe, *payload, *iv; /* wepkey */ u8 wepkey[16]; u8 hw_hdr_offset = 0; struct pkt_attrib *pattrib = &((struct xmit_frame *)pxm...
false
false
false
false
false
0
commit(bool flush) { std::string p = filenamePath(filename); if (! fileExists(p, false)) { createDirectory(p); } FILE* f = fopen(filename.c_str(), "wb"); debugAssertM(f, "Could not open \"" + filename + "\""); fwrite(data.getCArray(), 1, data.size(), f); if (flush) { fflush(...
false
false
false
false
true
1
add_ip_list_range(char* range, ip_range_list_t * list) { char* separator = strchr(range, '-'); if (separator) { *separator = '\0'; } ioa_addr min, max; if (make_ioa_addr((const u08bits*) range, 0, &min) < 0) { TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "Wrong address format: %s\n", range); return -1; } if (se...
false
false
false
false
false
0
read_buffer(SAMPLE_BUFFER* sbuf) { /* write to sbuf->buffer[ch], similarly as the LADSPA * chainops */ sbuf->number_of_channels(channels()); /* set the length according to our buffersize */ if ((ECA_AUDIO_POSITION::length_set() == true) && ((position_in_samples() + buffersize()) >= ECA_AUDIO_...
false
false
false
false
false
0
db_open_database(JCR *jcr) { bool retval = false; char *db_path; int len; struct stat statbuf; int ret; int errstat; int retry = 0; P(mutex); if (m_connected) { retval = true; goto bail_out; } if ((errstat=rwl_init(&m_lock)) != 0) { berrno be; Mmsg1(&errmsg, _(...
false
false
false
false
false
0
gck_builder_add_exceptv (GckBuilder *builder, GckAttributes *attrs, const gulong *except_types, guint n_except_types) { gulong i; guint j; g_return_if_fail (builder != NULL); g_return_if_fail (attrs != NULL); for (i = 0; i < attrs->count;...
false
false
false
false
false
0
hdb_lock(int fd, int operation) { int i, code = 0; for(i = 0; i < 3; i++){ code = flock(fd, (operation == HDB_RLOCK ? LOCK_SH : LOCK_EX) | LOCK_NB); if(code == 0 || errno != EWOULDBLOCK) break; sleep(1); } if(code == 0) return 0; if(errno == EWOULDBLOCK) return HDB_ERR_DB_INUSE; retur...
false
false
false
false
false
0
sort_descending(GeneralMatrix& GM) { REPORT Tracer et("sort_descending"); Real* data = GM.Store(); int max = GM.Storage(); if (max > DoSimpleSort) MyQuickSortDescending(data, data + max - 1, 0); InsertionSortDescending(data, max, DoSimpleSort); }
false
false
false
false
false
0
build_tree (const char* constraints) { ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, ETCL_Interpreter::parserMutex__, -1); Lex_String_Input::reset ((char*)constraints); yyval.constraint = 0; int return_value = ::yyparse (); if (return_value == 0 && yy...
false
false
false
false
false
0
recvv (iovec iov[], int iovcnt, const ACE_Time_Value *timeout) { ssize_t result = 0; if (this->pre_recv() == -1) return -1; if (this->leftovers_.length()) { int ndx = 0; iovec *iov2 = new iovec[iovcnt]; ACE_Auto_Array_Ptr<iovec> guard (iov2); fo...
false
false
false
false
false
0
setInMotion(bool value) { if (m_inMotion == value) return; m_inMotion = value; if (m_inMotion) { // record the above widget and put itself in the stack top QWidget *parent = parentWidget(); m_aboveWidget = 0; for (int index = parent->children().indexOf(this) + 1; index < pa...
false
false
false
false
false
0
set_ref_in_item(tv, copyID) typval_T *tv; int copyID; { dict_T *dd; list_T *ll; switch (tv->v_type) { case VAR_DICT: dd = tv->vval.v_dict; if (dd != NULL && dd->dv_copyID != copyID) { /* Didn't see this dict yet. */ dd->dv_copyID = copyID; set_ref_in_ht(&dd->dv_hashtab, c...
false
false
false
false
false
0
stencil( const Bitmap* mask, const Color* color, Coord x, Coord y ) { PrinterRep* p = rep_; ostream& out = *p->out_; flush(); PrinterInfo& info = p->info_->item_ref(p->info_->count() - 1); if (info.color_ != color) { do_color(out, color); info.color_ = color; } unsigned l...
false
false
false
false
false
0
halfacceptor_dinucleotide (char *acceptor2, char *acceptor1, Substring_T acceptor) { bool sensep; char *genomic; int substring_start, substring_length; sensep = Substring_chimera_sensep(acceptor); substring_start = Substring_querystart(acceptor); genomic = Substring_genomic_refdiff(acceptor); if (sense...
false
false
false
false
false
0
find_insn_decl (const char *name) { void *entry; work_insn_decl.mode = dm_insn_reserv; DECL_INSN_RESERV (&work_insn_decl)->name = name; entry = htab_find (insn_decl_table, &work_insn_decl); return (decl_t) entry; }
false
false
false
false
false
0
fireArray( const int size, double* vect) { for( double* v = vect; v != vect + size; ++v ) *v = fire(); }
false
false
false
false
false
0
foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, unsigned int end, int pass) { struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); struct buffer_head *bh; struct gfs2_log_descriptor *ld; int error = 0; u32 length; __be64 *ptr; unsigned int offset = sizeof(struct gfs2_log_descriptor); offset += s...
false
false
false
false
false
0
cut(UT_uint32 /*offset*/, UT_uint32 /*iLen*/, bool /*bReverse*/) { if(s_pOwnerUTF8 == this) s_pOwnerUTF8 = NULL; if(s_pOwnerLogAttrs == this) s_pOwnerLogAttrs = NULL; delete [] m_pLogOffsets; m_pLogOffsets = NULL; // will be set when shaping m_iCharCount = 0; return false; }
false
false
false
false
false
0
get_label_pointer(struct gl_context *ctx, GLenum identifier, GLuint name, const char *caller) { char **labelPtr = NULL; switch (identifier) { case GL_BUFFER: { struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, name); if (bufObj) labelPtr = &buf...
false
false
false
false
false
0
put_checksum(u8 *check_string, int length) { dprintk(verbose, DST_CA_DEBUG, 1, " Computing string checksum."); dprintk(verbose, DST_CA_DEBUG, 1, " -> string length : 0x%02x", length); check_string[length] = dst_check_sum (check_string, length); dprintk(verbose, DST_CA_DEBUG, 1, " -> checksum : 0x%02x", check...
false
false
false
false
false
0
write() { if (!filename_) // RUNTIME preferences return -1; fl_make_path_for_file(filename_); FILE *f = fl_fopen( filename_, "wb" ); if ( !f ) return -1; fprintf( f, "; FLTK preferences file format 1.0\n" ); fprintf( f, "; vendor: %s\n", vendor_ ); fprintf( f, "; application: %s\n", applicatio...
false
false
false
false
false
0
free_texmat_data( struct tnl_pipeline_stage *stage ) { struct texmat_stage_data *store = TEXMAT_STAGE_DATA(stage); GLuint i; if (store) { for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) if (store->texcoord[i].data) _mesa_vector4f_free( &store->texcoord[i] ); free( store ); stage->privat...
false
false
false
false
false
0
archive_match_path_excluded(struct archive *_a, struct archive_entry *entry) { struct archive_match *a; archive_check_magic(_a, ARCHIVE_MATCH_MAGIC, ARCHIVE_STATE_NEW, "archive_match_path_excluded"); a = (struct archive_match *)_a; if (entry == NULL) { archive_set_error(&(a->archive), EINVAL, "entry is...
false
false
false
false
false
0
gst_type_find_element_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstTypeFindElement *typefind; typefind = GST_TYPE_FIND_ELEMENT (object); switch (prop_id) { case PROP_CAPS: GST_OBJECT_LOCK (typefind); g_value_set_boxed (value, typefind->caps); ...
false
false
false
false
false
0
amitk_volumes_get_enclosing_corners(const GList * objects, const AmitkSpace * space, AmitkCorners return_corners) { AmitkCorners temp_corners; gboolean valid=FALSE; while (objects != NULL) { if (AMITK_IS_VOLUME(objects->data)) { if (AMITK_VOLUME_VALID(objects->data)) { amitk_volu...
false
false
false
false
false
0
hotkey_radio_sw_notify_change(void) { if (tp_features.hotkey_wlsw) sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, "hotkey_radio_sw"); }
false
false
false
false
false
0
renew (int argc, char **argv, OtpAlgorithm *alg, char *inuser) { OtpContext newctx, *ctx; char prompt[128]; char pw[64]; void *dbm; int ret; newctx.alg = alg; newctx.user = inuser; newctx.n = atoi (argv[0]); strlcpy (newctx.seed, argv[1], sizeof(newctx.seed)); strlwr(newctx.seed...
false
false
false
false
false
0
add_abstract_origin_attribute (dw_die_ref die, tree origin) { dw_die_ref origin_die = NULL; if (TREE_CODE (origin) != FUNCTION_DECL) { /* We may have gotten separated from the block for the inlined function, if we're in an exception handler or some such; make sure that the abstract function has been ...
false
false
false
false
false
0
handle_mpath_set(struct nl80211_state *state, struct nl_cb *cb, struct nl_msg *msg, int argc, char **argv) { unsigned char dst[ETH_ALEN]; unsigned char next_hop[ETH_ALEN]; if (argc < 3) return 1; if (mac_addr_a2n(dst, argv[0])) { fprintf(stderr, "invalid destination mac address\n"); ret...
false
false
false
false
false
0
create_mg_merge_tagged_fields(AW_root *aw_root) { static AW_window_simple *aws = 0; if (aws) return aws; GB_transaction dummy(GLOBAL_gb_merge); aw_root->awar_string( AWAR_FIELD1,"full_name"); aw_root->awar_string( AWAR_FIELD2,"full_name"); aw_root->awar_string( AWAR_TAG1,"S"); aw_root->aw...
false
false
false
false
false
0
glade_design_layout_add (GtkContainer *container, GtkWidget *widget) { GladeDesignLayout *layout = GLADE_DESIGN_LAYOUT (container); GladeDesignLayoutPrivate *priv = layout->priv; priv->child_rect.width = 0; priv->child_rect.height = 0; gtk_widget_set_parent_window (widget, priv->offscreen_window); GTK_CO...
false
false
false
false
false
0
mshiftleft (header *hd) { header *st=hd,*result; double *m,*mr,*mr1; int i,j,c,r; hd=getvalue(hd); if (error) return; if (hd->type==s_real || hd->type==s_complex || hd->type==s_interval) { moveresult(st,hd); return; } else if (hd->type==s_matrix) { getmatrix(hd,&r,&c,&m); result=new_matrix(r,c,""); if (error)...
false
false
false
false
false
0
StringToValue( wxVariant& variant, const wxString& text, int ) const { wxArrayString arr; int userStringMode = GetAttributeAsLong(wxT("UserStringMode"), 0); WX_PG_TOKENIZER2_BEGIN(text,wxT('"')) if ( userStringMode > 0 || (m_choices.IsOk() && m_choices.Index( token ) != wxNOT_FOUND) ) ...
false
false
false
false
false
0
set_REVERS_IDENT(AN_revers *THIS,aisc_string x){ if(THIS->mh.ident) free(THIS->mh.ident); THIS->mh.ident = x;}
false
false
false
false
false
0
__init(void) { #ifndef __WINNT__ struct sigaction sa; if (sigemptyset(&sa.sa_mask)) exit(1); sa.sa_flags = SA_SIGINFO; sa.sa_sigaction = __term_handler; /* SIGPIPE, SIGABRT and friends are considered as bugs. no cleanup * in these cases, fix the program or replace defective * hardware :) */ if (sigaction...
false
false
false
false
false
0
ib_dealloc_device(struct ib_device *device) { WARN_ON(device->reg_state != IB_DEV_UNREGISTERED && device->reg_state != IB_DEV_UNINITIALIZED); kobject_put(&device->dev.kobj); }
false
false
false
false
false
0
delete_qr(Quadruple *qr) { if (qr->prev != NULL) qr->prev->next = qr->next; else qr->stm->qr_head = qr->next; if (qr->next != NULL) qr->next->prev = qr->prev; free(qr); }
false
false
false
false
false
0
rewriteAppendOnlyFileBackground(void) { pid_t childpid; long long start; if (server.bgrewritechildpid != -1) return REDIS_ERR; if (server.ds_enabled != 0) { redisLog(REDIS_WARNING,"BGREWRITEAOF called with diskstore enabled: AOF is not supported when diskstore is enabled. Operation not performe...
false
false
false
false
false
0
process(LEGlyphStorage &glyphStorage) const { SubtableProcessor *processor = NULL; switch (SWAPW(coverage) & scfTypeMask) { case mstIndicRearrangement: processor = new IndicRearrangementProcessor(this); break; case mstContextualGlyphSubstitution: processor = new ContextualG...
false
false
false
false
false
0
choose_mc_patterns(char *name) { int k; for (k = 0; mc_pattern_databases[k].name; k++) { if (!name || strcmp(name, mc_pattern_databases[k].name) == 0) { mc_init_patterns(mc_pattern_databases[k].values); return 1; } } return 0; }
false
false
false
false
false
0
randomize_string (char tmp[9]) { int i; const char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; for (i = 0; i < 8; i++) tmp[i] = chars[g_random_int_range (0, strlen(chars))]; tmp[8] = '\0'; }
true
true
false
false
true
1
kill_session() { const gchar *session_manager = g_getenv("SESSION_MANAGER"); if(session_manager) { gchar **splited = g_strsplit(session_manager, "/", 0); if(splited != NULL) { guint length = g_strv_length(splited); if(length > 0) { pid_t pid = atoi(splite...
false
false
false
false
false
0
setChallenge(const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod) { QString oldUsername; QString oldPassword; if (valueForKey(m_challenge, "stale").toLower() == "true") { // stale nonce: the auth failure that triggered this round of au...
false
false
false
false
false
0
compat_socket_selfpipe_discard_data( compat_socket_selfpipe_t *self ) { char bitbucket; ssize_t bytes_read; do { bytes_read = read( self->read_fd, &bitbucket, 1 ); if( bytes_read == -1 && errno != EINTR ) { ui_error( UI_ERROR_ERROR, "%s: %d: unexpected error %d (%s) reading from pip...
false
true
false
false
true
1
check_signature(struct signature *sig) { u8 ret = 0; if (sig->severity < 0 || sig->severity > 4) { WARN("Signature %d has an invalid severity: %d\n", sig->id, sig->severity); ret = 1; } if (!sig->content_cnt && !sig->mime) { WARN("Signature %d has no \"content\" nor \"mime\" string\n", sig->id); ...
false
false
false
false
false
0
u_freeentries(buf, uhp, uhpp) buf_T *buf; u_header_T *uhp; u_header_T **uhpp; /* if not NULL reset when freeing this header */ { u_entry_T *uep, *nuep; /* Check for pointers to the header that become invalid now. */ if (buf->b_u_curhead == uhp) buf->b_u_curhead = NULL; if (...
false
false
false
false
false
0
nlRowColumnAppend(NLRowColumn* c, NLint index, NLdouble value) { if(c->size == c->capacity) { nlRowColumnGrow(c) ; } c->coeff[c->size].index = index ; c->coeff[c->size].value = value ; c->size++ ; }
false
false
false
false
false
0
stream_write(STREAM *stream, char *buffer, int len) { if ((stream->common.mode & ST_WRITE) == 0) THROW(E_ACCESS); CHECK_enter(); if (sigsetjmp(CHECK_jump, TRUE) == 0) memmove(stream->memory.addr + stream->memory.pos, buffer, len); CHECK_leave(); if (CHECK_got_error()) { errno = EIO; ...
false
false
false
false
false
0
AddToLiveIns(unsigned Reg) { const std::vector<MachineBasicBlock*> Blocks = CurLoop->getBlocks(); for (unsigned i = 0, e = Blocks.size(); i != e; ++i) { MachineBasicBlock *BB = Blocks[i]; if (!BB->isLiveIn(Reg)) BB->addLiveIn(Reg); for (MachineBasicBlock::iterator MII = BB->begin(), E =...
false
false
false
false
false
0
convert_frame_new_preroll_callback (GstElement * sink, GstVideoConvertSampleContext * context) { GstSample *sample = NULL; GError *error = NULL; g_mutex_lock (&context->mutex); if (context->finished) goto done; g_signal_emit_by_name (sink, "pull-preroll", &sample); if (!sample) { error = g_e...
false
false
false
false
false
0
isl_basic_map_solve_lp(struct isl_basic_map *bmap, int max, isl_int *f, isl_int d, isl_int *opt, isl_int *opt_denom, struct isl_vec **sol) { if (sol) *sol = NULL; if (!bmap) return isl_lp_error; switch (bmap->ctx->opt->lp_solver) { case ISL_LP_PIP: return isl_pip_solve_lp(bmap,...
false
false
false
false
false
0
d_exprlist (struct d_info *di, char terminator) { struct demangle_component *list = NULL; struct demangle_component **p = &list; if (d_peek_char (di) == terminator) { d_advance (di, 1); return d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, NULL, NULL); } while (1) { struct demangle...
false
false
false
false
false
0
unique_input_switch_drop( UniqueInputSwitch *input_switch, UniqueInputChannel *channel ) { int i; UniqueContext *context; D_DEBUG_AT( UniQuE_InpSw, "unique_input_switch_drop( %p, %p )\n", input_switch, channel ); D_MAGIC_ASSERT( input_switch, UniqueInputSwitch...
false
false
false
false
false
0
policy_view_show_policy_line(policy_view_t * view, unsigned long line) { GtkTextTagTable *table = NULL; GtkTextIter iter, end_iter; GtkTextMark *mark = NULL; GString *string = g_string_new(""); gtk_notebook_set_current_page(view->notebook, 1); /* when moving the buffer we must use marks to scroll because * go...
false
false
false
false
false
0
rocker_port_fwd_enable(struct rocker_port *rocker_port, struct switchdev_trans *trans, int flags) { if (rocker_port_is_bridged(rocker_port)) /* bridge STP will enable port */ return 0; /* port is not bridged, so simulate going to FORWARDING state */ return rocker_port_stp_update(rocker_port, trans, flags,...
false
false
false
false
false
0
mouseMoveEvent(QMouseEvent *ev) { if (sizeDrag) { emit sizeDragged(ev->pos()); ev->accept(); } else ev->ignore(); }
false
false
false
false
false
0
__do_request(struct ceph_mds_client *mdsc, struct ceph_mds_request *req) { struct ceph_mds_session *session = NULL; int mds = -1; int err = 0; if (req->r_err || req->r_got_result) { if (req->r_aborted) __unregister_request(mdsc, req); goto out; } if (req->r_timeout && time_after_eq(jiffies, req->...
false
false
false
false
false
0
f_subphylumofoperator(ID o, INT i) {{ INT kc_selvar_0_1 = phylum_cast<INT>(i); if ((kc_selvar_0_1->prod_sel() == sel_Int)) { const integer ii = phylum_cast<const impl_INT_Int*>(kc_selvar_0_1)->integer_1; if (ii->value == 0) { return f_phylumofoperator( o ); } else { return f_subphylum( f_arguments...
false
false
false
false
false
0
dc1394_format7_set_value_setting(dc1394camera_t *camera, dc1394video_mode_t video_mode) { int err; if (!dc1394_is_video_mode_scalable(video_mode)) return DC1394_INVALID_VIDEO_MODE; err=dc1394_set_format7_register(camera, video_mode, REG_CAMERA_FORMAT7_VALUE_SETTING, (uint32_t)0x40000000UL); DC...
false
false
false
false
false
0
set_properties() { // begin wxGlade: SearchInPanel::set_properties m_pChkSearchOpenFiles->SetToolTip(wxT("Search in open files")); m_pChkSearchOpenFiles->SetValue(1); //-m_pChkSearchProjectFiles->SetToolTip(wxT("Search in project files")); m_pChkSearchSnippetFiles->SetToolTip(wxT("Search in Snippets...
false
false
false
false
false
0