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
__ecereMethod___ecereNameSpace__ecere__gui__drivers__XInterface_ActivateRootWindow(struct __ecereNameSpace__ecere__com__Instance * window) { if(!__ecereProp___ecereNameSpace__ecere__gui__Window_Get_parent(window) || !__ecereProp___ecereNameSpace__ecere__gui__Window_Get_display(__ecereProp___ecereNameSpace__ecere__gui__...
false
false
false
false
false
0
WriteUInt32(uint32 val) { uint32 v = (byte_order_ == ORDER_NETWORK) ? HostToNetwork32(val) : val; WriteBytes(reinterpret_cast<const char*>(&v), 4); }
false
false
false
false
false
0
Realloc_IOdef_entry_buffer(IOdef_entry *iodef, int num_bytes) { void *dum_ptr; if(!iodef)return REG_FAILURE; #ifdef REG_DEBUG if(iodef->buffer){ fprintf(stderr, "STEER: Realloc_IOdef_entry_buffer: realloc'ing " "pointer %p\n", iodef->buffer); } else{ fprintf(stderr, "STEER: Realloc_I...
false
false
false
false
false
0
get_word(FILE * in, char * w) { int bufsize = BUFSIZE - 1; register int c; while (c = getc(in), c <= 32 && c != EOF); if (c != EOF) { do { *w++ = (char)(c); } while (c = getc(in), c > 32 && c != EOF && --bufsize); } *w = '\0'; ungetc(c, in); if (c == EOF) return 0; /* done */ if (bufsiz...
false
false
false
false
false
0
zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /* {{{ */ { char lcname[16]; int name_len; zend_do_extended_info(TSRMLS_C); zend_do_return(NULL, 0 TSRMLS_CC); pass_two(CG(active_op_array) TSRMLS_CC); zend_release_labels(TSRMLS_C); if (CG(active_class_entry)) { zend_check_magic_method...
false
false
false
false
false
0
Destroyed(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { static int cnt = 0; /* * if all the protocol widgets are dead, kill myself. */ if (++cnt >= numProtocols) Exit(); }
false
false
false
false
false
0
trace_emit_binary (unsigned char *str, int len) { long length = len; int i; long col; unsigned char *ptr; int truncated = 0; char buf[80]; char *HEX = "0123456789ABCDEF"; if (!str || len <= 0) return; /* * Guard against very long binary buffers */ if (length > MAX_EMIT_BINARY) { ...
false
false
false
false
false
0
qmonHostFolderChange(Widget w, XtPointer cld, XtPointer cad) { XmTabCallbackStruct *cbs = (XmTabCallbackStruct *) cad; DENTER(GUI_LAYER, "qmonHostFolderChange"); DPRINTF(("%s\n", XtName(cbs->tab_child))); if (!strcmp(XtName(cbs->tab_child), "adminhost_layout")) dialog_mode = SGE_AH_LIST; if ...
false
false
false
false
false
0
OTF_WStream_writeSnapshotCommentKV( OTF_WStream* wstream, uint64_t time, uint32_t process, const char* comment, OTF_KeyValueList* list ) { OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); /* buffer can be NULL if file-open fails */ if ( NULL == buffer ) return 0; if ( 0 == OTF_WBuffer_setTimeAn...
false
false
false
false
false
0
user_wrapper_rmdir(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC) { struct php_user_stream_wrapper *uwrap = (struct php_user_stream_wrapper*)wrapper->abstract; zval *zfilename, *zoptions, *zfuncname, *zretval; zval **args[3]; int call_result; zval *object; int ret = 0;...
false
false
false
false
false
0
style_editor_hide (StyleEditor *se) { g_return_if_fail (se); g_return_if_fail (se->priv->dialog); gtk_widget_destroy (se->priv->dialog); se->priv->dialog = NULL; free_saved_props (se); }
false
false
false
false
false
0
Pred_Without_Aux_4(WamWord name_word, WamWord arity_word, WamWord name1_word, WamWord arity1_word) { int func, arity; int func1, arity1; func = Rd_Atom_Check(name_word); arity = Rd_Integer_Check(arity_word); func1 = Pred_Without_Aux(func, arity, &arity1); return Un_Atom_Check(func1, name1_word) && ...
false
false
false
false
false
0
IoLexer_readExponent(IoLexer *self) { if (IoLexer_readCharAnyCase_(self, 'e')) { IoLexer_readChar_(self, '-') || IoLexer_readChar_(self, '+'); if (!IoLexer_readDigits(self)) { return -1; } return 1; } return 0; }
false
false
false
false
false
0
renderHTMLContentItem(STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream & /*annexStream*/, const size_t nestingLevel, size_t & /*annexNumber*/, ...
false
false
false
false
false
0
draw_character_cell (GucharmapPrintOperation *print_operation, cairo_t *cr, int row, int col, int character_index) { GucharmapPrintOperationPrivate *priv = print_operation->priv; gunichar wc; char utf8[7]; int len; double x, y...
true
true
false
false
false
1
lindna_InterBlocks(float xDraw, float yDraw, float BlockHeight, float From, float To, const AjPStr InterSymbol, ajint Colour) { float x1Inter; float y1Inter; float x2Inter; float y2Inter; x1Inter = xDraw+From; y1Inter = yDraw+((float)1.0*BlockHeight/(float)2.); x2Inter =...
false
false
false
false
false
0
glusterd_nodesvc_set_rpc (char *server, struct rpc_clnt *rpc) { int ret = 0; xlator_t *this = NULL; glusterd_conf_t *priv = NULL; this = THIS; GF_ASSERT (this); priv = this->private; GF_ASSERT (priv); GF_ASSERT (priv->shd); GF...
false
false
true
true
false
1
cloneAttrs(void *old, void *new) { int kind = AGTYPE(old); Agsym_t *a; char* s; Agraph_t *g = agroot(old); Agraph_t *ng = agroot(new); for (a = agnxtattr(g, kind, 0); a; a = agnxtattr(g, kind, a)) { s = agxget (old, a); if (aghtmlstr(s)) agset(new, a->name, agstrdup_html(ng, s)); else ...
false
false
false
false
false
0
qla1280_rst_aen(struct scsi_qla_host *ha) { uint8_t bus; ENTER("qla1280_rst_aen"); if (ha->flags.online && !ha->flags.reset_active && !ha->flags.abort_isp_active) { ha->flags.reset_active = 1; while (ha->flags.reset_marker) { /* Issue marker command. */ ha->flags.reset_marker = 0; for (bus = 0; b...
false
false
false
false
false
0
cloog_names_generate_items(int nb_items, char * prefix, char first_item) { int i ; char ** names ; if (nb_items == 0) return NULL ; names = (char **)malloc(nb_items*sizeof(char *)) ; if (names == NULL) cloog_die("memory overflow.\n"); for (i=0;i<nb_items;i++) { names[i] = (char *)malloc(MAX_N...
false
true
false
true
false
1
check_data(struct gfs2_inode *ip, struct metawalk_fxns *pass, struct gfs2_buffer_head *bh, int head_size, uint64_t *blks_checked, uint64_t *error_blk) { int error = 0, rc = 0; uint64_t block, *ptr; uint64_t *ptr_start = (uint64_t *)(bh->b_data + head_size); char *ptr_end = (bh->b_data + ip->i_sbd->b...
false
false
false
false
false
0
daq_acquire(const DAQ_Module_t *module, void *handle, int cnt, DAQ_Analysis_Func_t callback, void *user) { if (!module) return DAQ_ERROR_NOMOD; if (!handle) return DAQ_ERROR_NOCTX; if (module->check_status(handle) != DAQ_STATE_STARTED) { module->set_...
false
false
false
false
false
0
test_x(obj, fname) VALUE obj, fname; { SafeStringValue(fname); if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse; return Qtrue; }
false
false
false
false
false
0
iser_alloc_rx_descriptors(struct iser_conn *iser_conn, struct iscsi_session *session) { int i, j; u64 dma_addr; struct iser_rx_desc *rx_desc; struct ib_sge *rx_sg; struct ib_conn *ib_conn = &iser_conn->ib_conn; struct iser_device *device = ib_conn->device; iser_conn->qp_max_recv_dtos = session->c...
false
false
false
false
false
0
saveScavengerRegister(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, MachineBasicBlock::iterator &UseMI, const TargetRegisterClass *RC, unsigned...
false
false
false
false
false
0
gst_wavpack_get_default_channel_mask (gint nchannels) { gint channel_mask = 0; /* Set the default channel mask for the given number of channels. * It's the same as for WAVE_FORMAT_EXTENDED: * http://www.microsoft.com/whdc/device/audio/multichaud.mspx */ switch (nchannels) { case 11: channel_ma...
false
false
false
false
false
0
new_phonet(const String & file, Conv & iconv, const Language * lang) { String buf; DataPair dp; FStream in; RET_ON_ERR(in.open(file, "r")); PhonetParmsImpl * parms = new PhonetParmsImpl(); parms->lang = lang; parms...
false
false
false
false
true
1
set_audio_standard_FM(struct cx88_core *core, enum cx88_deemph_type deemph) { static const struct rlist fm_deemph_50[] = { {AUD_DEEMPH0_G0, 0x0C45}, {AUD_DEEMPH0_A0, 0x6262}, {AUD_DEEMPH0_B0, 0x1C29}, {AUD_DEEMPH0_A1, 0x3FC66}, {AUD_DEEMPH0_B1, 0x399A}, {AUD_DEEMPH1_G0, 0x0D80}, {AUD_DEEMPH1_A0, 0...
false
false
false
false
false
0
dial_features_duplicate(void *data) { struct ast_dial_features *df = data, *df_copy; if (!(df_copy = ast_calloc(1, sizeof(*df)))) { return NULL; } memcpy(df_copy, df, sizeof(*df)); return df_copy; }
false
false
false
false
false
0
soc_dev_attr_is_visible(struct kobject *kobj, struct attribute *attr, int idx) { struct device *dev = kobj_to_dev(kobj); struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev); if (attr == &dev_attr_pmdown_time.attr) return attr->mode; /* always visible */ return rtd->codec ? attr->mode : 0; /* enable...
false
false
false
false
false
0
ata_scsi_scan_host(struct ata_port *ap, int sync) { int tries = 5; struct ata_device *last_failed_dev = NULL; struct ata_link *link; struct ata_device *dev; repeat: ata_for_each_link(link, ap, EDGE) { ata_for_each_dev(dev, link, ENABLED) { struct scsi_device *sdev; int channel = 0, id = 0; if (dev->s...
false
false
false
false
false
0
Load() { if( loaded ) return; // TODO: this should likely be protected by a mutex. /* -------------------------------------------------------------------- */ /* Load the segment contents into a buffer. */ /* ----------------------------------------------------------------...
false
false
false
false
false
0
add_file(char *name) { file_list *pointer; file_list *new_file; /* Loop until the end of the current list of valid files is found */ pointer = file_header; while (pointer->next_file != NULL) { pointer = pointer->next_file; } /* Add the valid file to the list of files */ if ((new_file = (file_list *) mall...
false
true
false
false
false
1
glusterd_compare_friend_data (dict_t *vols, int32_t *status) { int32_t ret = -1; int32_t count = 0; int i = 1; gf_boolean_t update = _gf_false; gf_boolean_t stale_nfs = _gf_false; gf_boolean_t ...
false
false
false
true
false
1
storvsc_on_io_completion(struct storvsc_device *stor_device, struct vstor_packet *vstor_packet, struct storvsc_cmd_request *request) { struct vstor_packet *stor_pkt; struct hv_device *device = stor_device->device; stor_pkt = &request->vstor_packet; /* * The current SCSI handling on the host side doe...
false
false
false
false
false
0
db_do_init(const str* url, void* (*new_connection)()) { struct db_id* id; void* con; db_con_t* res; int con_size = sizeof(db_con_t) + sizeof(void *); id = 0; res = 0; if (!url || !url->s || !new_connection) { LM_ERR("invalid parameter value\n"); return 0; } if (url->len > MAX_URL_LENGTH) { LM_ERR("SQL...
false
false
false
false
false
0
write(const char* packet_, const unsigned int size_) { trace_with_mask("IPv4Socket::write()",SOCKTRACE); int ret = 0; if (!is_valid_handler (m_fd)) { return -1; } if (m_rdbuf->unbuffered ()) { int wlen = size_; char* p = (char*) packet_; while (wlen-- > 0) { if (m_rdbuf->sputc (*p++) == EOF) { ...
false
false
false
false
false
0
parse_node(parser_t * p, int * is_comment) { bgav_yml_node_t * ret; *is_comment = 0; ret = calloc(1, sizeof(*ret)); if(!p->buffer_size) { if(!more_data(p)) goto fail; } if(*(p->buffer) == '<') { /* Skip comments */ if(p->buffer_size < 4) { if(!more_data(p)) ...
false
false
false
false
false
0
convert_uri_to_file_name(struct mg_connection *conn, char *buf, size_t buf_len, struct mgstat *st) { struct vec a, b; const char *rewrite, *uri = conn->request_info.uri; char *p; int match_len, stat_result; buf_len--; // This is because memmove() for PATH_INFO may shift p...
false
false
false
false
false
0
tds_skip_quoted(const char *s) { const char *p = s; char quote = (*s == '[') ? ']' : *s; for (; *++p;) { if (*p == quote) { if (*++p != quote) return p; } } return p; }
false
false
false
false
false
0
search_result_menu(SearchData *sd, gboolean on_row, gboolean empty) { GtkWidget *menu; GtkWidget *item; GList *editmenu_fd_list; menu = popup_menu_short_lived(); menu_item_add_sensitive(menu, _("_View"), on_row, G_CALLBACK(sr_menu_view_cb), sd); menu_item_add_stock_sensitive(menu, _("View in _new window"), ...
false
false
false
false
false
0
sl_iter(const skiplist *l, int (*f)(void*,void*,void*), void *p1) { if (!l) return; if (!f) return; node p; p = l->header; p = p->forward[0]; while (p != NULL) { node q = p->forward[0]; int j; for (j = 0; j < p->nbr; j++) { if (!f(p1, p->bkt[j].key, p->bkt[j].val)) return; } p = q; }...
false
false
false
false
false
0
ompi_attr_delete(ompi_attribute_type_t type, void *object, opal_hash_table_t *attr_hash, int key, bool predefined) { int ret; OPAL_THREAD_LOCK(&attribute_lock); ret = ompi_attr_delete_impl(type, object, attr_hash, key, predefined); opal_atomic_wmb(); OPAL_...
false
false
false
false
false
0
show ( const ASCString& widgetName, PG_Widget* parent ) { if ( !parent ) parent = this; PG_Widget* i = parent->FindChild( widgetName, true ); if ( i ) i->Show(); }
false
false
false
false
false
0
pets_move_golem(object *op) { int made_attack = 0; object *tmp; tag_t tag; object *owner; if (QUERY_FLAG(op, FLAG_MONSTER)) return; /* Has already been moved */ owner = object_get_owner(op); if (owner == NULL) { LOG(llevDebug, "Golem without owner destructed.\n"); o...
false
false
false
false
false
0
tar_append_eof(TAR *t) { ssize_t i, j; char block[T_BLOCKSIZE]; memset(&block, 0, T_BLOCKSIZE); for (j = 0; j < 2; j++) { i = tar_block_write(t, &block); if (i != T_BLOCKSIZE) { if (i != -1) errno = EINVAL; return -1; } } return 0; }
false
false
false
false
false
0
sample (ACE_UINT64 throughput, ACE_UINT64 latency) { this->ACE_Basic_Stats::sample (latency); if (this->samples_count () == 1u) { this->throughput_last_ = throughput; } else { this->throughput_last_ = throughput; } }
false
false
false
false
false
0
save(char *filename) { FILE *out; out = fopen(filename,"w"); if (!out) { return "Cannot save your File"; } unsigned row,col; fprintf(out,"%i\n",nentries); for (row = 0; row<nentries;row++){ fprintf(out,"%-13s",hash_elements[row]->name); for (col=0; col<=row; col++) {...
false
false
false
false
false
0
GetCurEventTime ( MIDIClockTime *t ) const { // if there is a next event, then set *t to the time of the event and return true if ( state.GetCurEventTrack() != -1 ) { *t = state.GetCurrentTime(); return true; } else { return false; } }
false
false
false
false
false
0
m68k_op_asr_16_aw(void) { uint ea = EA_AW_16(); uint src = m68ki_read_16(ea); uint res = src >> 1; if(GET_MSB_16(src)) res |= 0x8000; m68ki_write_16(ea, res); FLAG_N = NFLAG_16(res); FLAG_Z = res; FLAG_V = VFLAG_CLEAR; FLAG_C = FLAG_X = src << 8; }
false
false
false
false
false
0
ifdef_enter(void) { struct ifdef_stack_t*cur; cur = (struct ifdef_stack_t*) calloc(1, sizeof(struct ifdef_stack_t)); if (istack->path) cur->path = strdup(istack->path); cur->lineno = istack->lineno; cur->next = ifdef_stack; ifdef_stack = cur; }
false
false
false
false
false
0
float__format__(PyObject *self, PyObject *args) { PyObject *format_spec; _PyUnicodeWriter writer; int ret; if (!PyArg_ParseTuple(args, "U:__format__", &format_spec)) return NULL; _PyUnicodeWriter_Init(&writer); ret = _PyFloat_FormatAdvancedWriter( &writer, self, ...
false
false
false
false
false
0
get_row_data_at_cursor(GtkTreeView *tv) { GtkTreePath *path; void *data = NULL; g_return_val_if_fail(tv, NULL); gtk_tree_view_get_cursor(tv, &path, NULL); if (path) { GtkTreeModel *model; GtkTreeIter iter; model = gtk_tree_view_get_model(tv); if (gtk_tree_model_get_iter(model, &iter, path)) { data = ...
false
false
false
false
false
0
PopPolicy() { if(this->PolicyStack.size() > this->PolicyBarriers.back()) { this->PolicyStack.pop_back(); } else { this->IssueMessage(cmake::FATAL_ERROR, "cmake_policy POP without matching PUSH"); } }
false
false
false
false
false
0
fc_rport_error_retry(struct fc_rport_priv *rdata, struct fc_frame *fp) { unsigned long delay = msecs_to_jiffies(FC_DEF_E_D_TOV); /* make sure this isn't an FC_EX_CLOSED error, never retry those */ if (PTR_ERR(fp) == -FC_EX_CLOSED) goto out; if (rdata->retries < rdata->local_port->max_rport_retry_count) { ...
false
false
false
false
false
0
ClaimDeviceInterface(void) { Interface::Print("Claiming interface...\n"); int result = libusb_claim_interface(deviceHandle, interfaceIndex); #ifdef OS_LINUX if (result != LIBUSB_SUCCESS) { detachedDriver = true; Interface::Print("Attempt failed. Detaching driver...\n"); libusb_detach_kernel_driver(deviceHa...
false
false
false
false
false
0
Lnumber_compare(int s, int t) { int narg, i; narg = vs_top - vs_base; if (narg == 0) too_few_arguments(); for (i = 0; i < narg; i++) check_type_or_rational_float(&vs_base[i]); for (i = 1; i < narg; i++) if (s*number_compare(vs_base[i], vs_base[i-1]) < t) { vs_top = vs_base+1; vs_base[0] = Cnil; ret...
false
false
false
false
false
0
rewrite_ac_declaration_specifier #ifdef KC_USE_PROTOTYPES (ac_declaration_specifier kc_p, rview kc_current_view) #else (kc_p, kc_current_view) ac_declaration_specifier kc_p; rview kc_current_view; #endif { /*SUPPRESS 622*/ assert_ac_declaration_specifier( kc_p, "kc_p" ); switch((int)kc_current_view) { default: cas...
false
false
false
true
false
1
htmlGetEndPriority (const xmlChar *name) { int i = 0; while ((htmlEndPriority[i].name != NULL) && (!xmlStrEqual((const xmlChar *)htmlEndPriority[i].name, name))) i++; return(htmlEndPriority[i].priority); }
false
false
false
false
false
0
_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) { xmlURI *uri; xmlChar *escsource; char *file_dest; int isFileUri = 0; uri = xmlCreateURI(); escsource = xmlURIEscapeStr((xmlChar *)source, (xmlChar *) ":"); xmlParseURIReference(uri, (char *)escsource); xmlFree...
false
false
false
false
false
0
set_transport_template(struct iscsi_transport *t) { struct iscsi_transport_template *tmpl; int j; for (j = 0; iscsi_transport_templates[j] != NULL; j++) { tmpl = iscsi_transport_templates[j]; if (!strcmp(tmpl->name, t->name)) { t->template = tmpl; log_debug(3, "Matched transport %s\n", t->name); retur...
false
false
false
false
false
0
setResolution(int resolution, const char *scanType, ArMapChangeDetails *changeDetails) { if (myResolution == resolution) { return; } ArMapFileLineSet origLines; if (changeDetails != NULL) { ArMapFileLineSetWriter origWrite...
false
false
false
false
false
0
border_draw_border_parts( common_decorations_type *cd, FvwmWindow *fw, window_parts pressed_parts, window_parts force_draw_parts, clear_window_parts clear_parts, rectangle *old_g, rectangle *new_g, Bool do_hilight) { border_relief_descr br; window_parts draw_parts; Bool do_clear; if (HAS_NO_BORDER(fw)) { /*...
false
false
false
false
false
0
_e_mod_comp_bd_urgent_change(void *data __UNUSED__, int type __UNUSED__, void *event) { E_Event_Border_Urgent_Change *ev = event; E_Comp_Win *cw = _e_mod_comp_win_find(ev->border->win); if (!cw) return ECORE_CALLBACK_PASS_ON; if (cw->bd->client.icc...
false
false
false
false
false
0
setup_locked (Test *test, gconstpointer unused) { GVariant *element; GVariant *retval; GError *error = NULL; const gchar *prompt; GVariant *locked; /* Main setup */ setup (test, unused); element = g_variant_new_object_path ("/org/freedesktop/secrets/collection/test"); retval = dbus_call_perform...
false
false
false
false
false
0
sidebar_visible_changed(property_t prop) { GtkWidget *widget; gboolean visible; gui_prop_get_boolean_val(prop, &visible); #if !GTK_CHECK_VERSION(2,0,0) widget = gui_main_window_lookup("hpaned_main"); gtk_paned_set_gutter_size(GTK_PANED(widget), visible ? 10 : 0); #endif /* Gtk+ < 2.x */ widget = gui_main...
false
false
false
false
false
0
getSvgSizes(QDomDocument & doc, double & sWidth, double & sHeight, double & vbWidth, double & vbHeight) { bool isIllustrator = isIllustratorDoc(doc); QDomElement root = doc.documentElement(); QString swidthStr = root.attribute("width"); if (swidthStr.isEmpty()) return false; QString sheightStr = root.attribute(...
false
false
false
false
false
0
lbtf_free_cmd_buffer(struct lbtf_private *priv) { struct cmd_ctrl_node *cmdarray; unsigned int i; lbtf_deb_enter(LBTF_DEB_HOST); /* need to check if cmd array is allocated or not */ if (priv->cmd_array == NULL) { lbtf_deb_host("FREE_CMD_BUF: cmd_array is NULL\n"); goto done; } cmdarray = priv->cmd_array; ...
false
false
false
false
false
0
__cq_dequeue(struct circular_queue *cq, unsigned long *elem) { if (__cq_empty(cq)) return -1; *elem = cq->element[cq->front]; cq->front = (cq->front + 1) & CQ_MASK; return 0; }
false
false
false
false
false
0
has_unexpired_creds(krb5_gss_cred_id_t kcred, const gss_OID desired_mech, int default_cred, gss_const_key_value_set_t cred_store) { OM_uint32 major_status, minor; gss_name_t cred_name; gss_OID_set_desc desired_mechs; gss_cred_id_t tmp_cred = GS...
false
false
false
false
false
0
Clone() const { ReaderMutexLock ml(mutex_); TemplateCache* new_cache = new TemplateCache(); *(new_cache->parsed_template_cache_) = *parsed_template_cache_; for (TemplateMap::iterator it = parsed_template_cache_->begin(); it != parsed_template_cache_->end(); ++it) { it->second.refcounted_tpl->IncRef()...
false
false
false
false
false
0
proxy_find(void) { int uid; int gid; int um; int hash; int pix; proxy_ty *pp; // // search for an existing proxy // trace(("proxy_find()\n{\n")); os_become_must_be_active(); os_become_query(&uid, &gid, &um); hash = proxy_hash(uid, gid, um); pix = hash % SIZE...
false
false
false
false
false
0
hypothetical_percent_rank_final(PG_FUNCTION_ARGS) { int64 rank; int64 rowcount; double result_val; rank = hypothetical_rank_common(fcinfo, -1, &rowcount); if (rowcount == 0) PG_RETURN_FLOAT8(0); result_val = (double) (rank - 1) / (double) (rowcount); PG_RETURN_FLOAT8(result_val); }
false
false
false
false
false
0
mem_cgroup_hierarchy_write(struct cgroup_subsys_state *css, struct cftype *cft, u64 val) { int retval = 0; struct mem_cgroup *memcg = mem_cgroup_from_css(css); struct mem_cgroup *parent_memcg = mem_cgroup_from_css(memcg->css.parent); mutex_lock(&memcg_create_mutex); if (memcg->use_hierarchy == val) g...
false
false
false
false
false
0
check_for_missing_columns (csvjoin *jspec) { const char *name; int i; /* Note: it's possible, though we hope unlikely, that our heuristic for extracting column names from the filter expression (if present) gave a false positive. In that case the name at position JOIN_F* might be spurio...
false
false
false
false
false
0
pdp_resample_halve(s16 *src_image, s16 *dst_image, s32 src_w, s32 src_h) { int dst_x,dst_y; int src_x = 0; int src_y = 0; int dst_w = src_w >> 1; int dst_h = src_h >> 1; s32 tmp1,tmp2,tmp3,tmp4; //post("%x %x %d %d\n", src_image, dst_image, src_w, src_h); for(dst_y = 0; dst_y < dst_h ...
false
false
false
false
false
0
print_token (struct obstack *out, bool first, char const *tok) { char const *q = escape (tok); if (! first) obstack_sgrow (out, ", "); obstack_sgrow (out, q); return false; }
false
false
false
false
false
0
eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, ETableItem *eti) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti); if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED)) { eti_unfreeze (eti); re...
false
false
false
false
false
0
vpn_mainloop(struct openconnect_info *vpninfo) { struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = handle_sigint; sigaction(SIGINT, &sa, NULL); sigaction(SIGHUP, &sa, NULL); while (!vpninfo->quit_reason) { int did_work = 0; int timeout = INT_MAX; struct timeval tv; fd_set rfds, wfds, efd...
false
false
false
false
false
0
srp_rsp ( struct srp_device *srp, struct io_buffer *iobuf ) { struct srp_rsp *rsp = iobuf->data; int rc; DBGC2 ( srp, "SRP %p RX SCSI response tag %08x%08x\n", srp, ntohl ( rsp->tag.dwords[0] ), ntohl ( rsp->tag.dwords[1] ) ); /* Sanity check */ if ( iob_len ( iobuf ) < sizeof ( *rsp ) ) { DBGC ( srp, "SRP %...
false
false
false
false
false
0
mwl8k_create_ba(struct ieee80211_hw *hw, struct mwl8k_ampdu_stream *stream, u8 buf_size, struct ieee80211_vif *vif) { struct mwl8k_cmd_bastream *cmd; int rc; cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); if (cmd == NULL) return -ENOMEM; cmd->header.code = cpu_to_le16(MWL8K_CMD_BASTREAM); cmd->header.length = cp...
false
false
false
false
false
0
upscli_strerror(UPSCONN_t *ups) { #ifdef WITH_OPENSSL unsigned long err; char sslbuf[UPSCLI_ERRBUF_LEN]; #endif if (!ups) { return upscli_errlist[UPSCLI_ERR_INVALIDARG].str; } if (ups->upsclient_magic != UPSCLIENT_MAGIC) { return upscli_errlist[UPSCLI_ERR_INVALIDARG].str; } if (ups->upserror > UPSCLI_ERR_...
false
false
false
false
false
0
inputf(fname, newbuf) register char *fname; bool newbuf; { FILE *f; int fsize, /* bytes read in */ rc; if (newbuf) readonly = NO; zerostack(&undo); if ( newbuf ) { modified = NO; low = 0; } else { fixupline(bseekeol(curr)); } printch('"'); prints(fname); prints...
false
false
false
false
false
0
load_font(const char *name, const char *fallback, unsigned char type) { cachefont_t *font; XFontStruct *xfont; D_FONT(("load_font(%s, %s, %d) called.\n", NONULL(name), NONULL(fallback), type)); /* Default type is X font. */ if (type == 0) { type = FONT_TYPE_X; } /* Specify some s...
false
false
false
false
false
0
rc6_mode(struct rc6_dec *data) { switch (data->header & RC6_MODE_MASK) { case 0: return RC6_MODE_0; case 6: if (!data->toggle) return RC6_MODE_6A; /* fall through */ default: return RC6_MODE_UNKNOWN; } }
false
false
false
false
false
0
ph_state(struct dchannel *dch) { struct hfcsusb *hw = dch->hw; if (hw->protocol == ISDN_P_NT_S0) ph_state_nt(dch); else if (hw->protocol == ISDN_P_TE_S0) ph_state_te(dch); }
false
false
false
false
false
0
gsl_complex_sub_real (gsl_complex a, double x) { /* z=a-x */ gsl_complex z; GSL_SET_COMPLEX (&z, GSL_REAL (a) - x, GSL_IMAG (a)); return z; }
false
false
false
false
false
0
HtmlProps_dup(const HTML_PROPS *pro) { HTML_PROPS *pr; pr=HtmlProps_new(); pr->font=pro->font; if (pr->font) HtmlFont_Attach(pr->font); pr->foregroundColor=pro->foregroundColor; pr->backgroundColor=pro->backgroundColor; return pr; }
false
false
false
false
false
0
param_lookup(int index, lam_ssi_base_param_storage_t *storage) { char *env; lam_ssi_base_param_t *p; /* Lookup the index and see if it's valid */ if (PUB(params) == NULL) return LAMERROR; if (lam_arr_size(PUB(params)) < index) return LAMERROR; p = ((lam_ssi_base_param_t*) lam_arr_get(PUB(params)))...
false
false
false
false
true
1
Cvar_Increase_f (void) { cvar_t *var; char val[32]; float value; if (Cmd_Argc() < 2) { Com_Printf ("Usage: %s <cvar> [value]\n", Cmd_Argv(0)); return; } var = Cvar_FindVar(Cmd_Argv(1)); if (!var) { Com_Printf ("Unknown cvar '%s'\n", Cmd_Argv(1)); return; } if(!Q_IsNumeric(var->string)) { Com_Prin...
false
false
false
false
false
0
clk_pll_vote_enable(struct clk_hw *hw) { int ret; struct clk_pll *p = to_clk_pll(clk_hw_get_parent(hw)); ret = clk_enable_regmap(hw); if (ret) return ret; return wait_for_pll(p); }
false
false
false
false
false
0
init_gtk(int argc, char **argv) { int i, ok; game_saved = FALSE; toolbar_size = 0; /* Initialize the environment */ ok = gtk_init_check(&argc, &argv); if (ok == FALSE) return -1; /* Parse args */ for (i = 1; i < argc; i++) { if (prefix(argv[i], "-n")) { num_term = atoi(&argv[i][2]); if (num_term...
false
false
false
false
true
1
read_ssl(int sock, SSL *ssl, char *buff) { if(ssl) { return SSL_read(ssl, buff, 65535); } else { return recv(sock, buff, 65535, 0); } }
false
false
false
false
false
0
crda_get_file_ptr(__u8 *db, int dblen, int structlen, __be32 ptr) { __u32 p = ntohl(ptr); if (p > dblen - structlen) { fprintf(stderr, "Invalid database file, bad pointer!\n"); exit(3); } return (void *)(db + p); }
false
false
false
false
false
0
read_line(char *buf, FILE *file) { char *p; p = fgets(buf, AP_MAXPATH+1, file); if (!p) return 0; if (*p == '\0') return 1; p = buf; while (*p) p++; p--; /* remove trailing space and slash */ while ( isspace(*p) && p >= buf ) *p-- = '\0'; while ( *p == '/' && p ...
false
false
false
false
true
1
config_ptoken_new(struct str_buff *s, struct pctx *ctx) { struct ptoken *ret_val = config_ptoken_alloc(); if(ret_val) { ret_val->d = *s; ret_val->d.freeable = false; ret_val->ctx = ctx; } return ret_val; }
false
false
false
false
false
0
internal_del(HTT *htt, const char *name, int reduced) { unsigned u = hash_string(name), v; int ls; hash_item_header *father; hash_item_header *node = find_node(htt, u, &father, &ls, reduced); hash_item_header *pnode, *fnode, *znode; char *tmp; if (node == NULL) return 0; v = *(unsigned *)(node->ident); if ((v...
false
false
false
false
false
0
get_attr_prefix_vex_w (rtx insn ATTRIBUTE_UNUSED) { switch (recog_memoized (insn)) { case -1: if (GET_CODE (PATTERN (insn)) != ASM_INPUT && asm_noperands (PATTERN (insn)) < 0) fatal_insn_not_found (insn); default: return 0; } }
false
false
false
false
false
0
ipxcp_up(f) fsm *f; { int unit = f->unit; IPXCPDEBUG((LOG_INFO, "ipxcp: up")); /* The default router protocol is RIP/SAP. */ if (ho->router == 0) ho->router = BIT(RIP_SAP); if (go->router == 0) go->router = BIT(RIP_SAP); /* Fetch the network number */ if (!ho->neg_nn)...
false
false
false
false
false
0
__txn_activekids(env, rectype, txn) ENV *env; u_int32_t rectype; DB_TXN *txn; { /* * On a child commit, we know that there are children (i.e., the * committing child at the least. In that case, skip this check. */ if (F_ISSET(txn, TXN_COMPENSATE) || rectype == DB___txn_child) return (0); if (TAILQ_FIRST...
false
false
false
false
false
0