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
wd_fdc_set_datarq( wd_fdc *f ) { if( f->datarq != 1 ) { f->status_register |= WD_FDC_SR_IDX_DRQ; f->datarq = 1; if( f->set_datarq ) f->set_datarq( f ); } }
false
false
false
false
false
0
darr_new(size_t elemsz) { darray *array; array = malloc(sizeof(darray)); if (array == 0) return 0; array->memsz = 8 * elemsz; array->mem = malloc(array->memsz); if (array->mem == 0) { free(array); return 0; } array->eltend = array->mem; array->elemsz = elemsz; return arra...
false
false
false
false
false
0
lrc_attr_add_bulk(CONNECTION *c, DBH *dbh, char **arglist) { int rc; char key[BUFLEN]; char obuf[BUFLEN]; char tbuf[BUFLEN]; char name[BUFLEN]; char vbuf[BUFLEN]; if (loglevel > 1) logit(LOG_DEBUG, "lrc_attr_add_bulk:"); while (1) { if ((rc = rrpc_readstr(c, key, BUFLEN)) != GLOBUS_RLS_SUCCESS...
false
false
false
false
false
0
moduleOfScript(s) Script s; { return (s==0) ? modulePrelude : scripts[s-1].moduleHw; }
false
false
false
false
false
0
brcmf_fws_request_indicate(struct brcmf_fws_info *fws, u8 type, u8 *data) { struct brcmf_fws_mac_descriptor *entry; entry = &fws->desc.nodes[data[1] & 0x1F]; if (!entry->occupied) { if (type == BRCMF_FWS_TYPE_MAC_REQUEST_CREDIT) fws->stats.credit_request_failed++; else fws->stats.packet_request_...
false
false
false
false
false
0
conf_set_general_havent_read_conf(void *data) { if(*(unsigned int *) data) { conf_report_error("You haven't read your config file properly."); conf_report_error ("There is a line in the example conf that will kill your server if not removed."); conf_report_error ("Consider actually reading/editing the con...
false
false
false
false
false
0
arm_no_early_store_addr_dep (rtx producer, rtx consumer) { rtx value = PATTERN (producer); rtx addr = PATTERN (consumer); if (GET_CODE (value) == COND_EXEC) value = COND_EXEC_CODE (value); if (GET_CODE (value) == PARALLEL) value = XVECEXP (value, 0, 0); value = XEXP (value, 0); if (GET_CODE (addr) ...
false
false
false
false
false
0
initerr(perrdetail *err_ret, const char *filename) { err_ret->error = E_OK; err_ret->lineno = 0; err_ret->offset = 0; err_ret->text = NULL; err_ret->token = -1; err_ret->expected = -1; #ifndef PGEN if (filename) err_ret->filename = PyUnicode_DecodeFSDefault(filename); else ...
false
false
false
false
false
0
resizeWhichGenerator(int numberNow, int numberAfter) { if (numberAfter > maximumWhich_) { maximumWhich_ = CoinMax(maximumWhich_ * 2 + 100, numberAfter) ; int * temp = new int[2*maximumWhich_] ; memcpy(temp, whichGenerator_, numberNow*sizeof(int)) ; delete [] whichGenerator_ ; ...
false
false
false
false
false
0
mkstr(size_t len, H5T_str_t strpad) { hid_t t; if((t = H5Tcopy(H5T_C_S1)) < 0) return -1; if(H5Tset_size(t, len) < 0) return -1; if(H5Tset_strpad(t, strpad) < 0) return -1; return t; }
false
false
false
false
false
0
exepath(const char *appname) { free(app_path); app_path = strdup(sys2unix(appname)); if(app_path) { char *c = strrchr(app_path, '/'); if(c) c[0] = 0; else { free(app_path); app_path = strdup("."); } } else app_path = strdup("."); addpath("EXE", app_path); log_printf(DLOG, "Application path...
false
false
false
false
false
0
RTjpeg_yuv422rgb24(RTjpeg_t *rtj, uint8_t **planes, uint8_t **rows) { int tmp; int i, j; int32_t y, crR, crG, cbG, cbB; uint8_t *bufcr, *bufcb, *bufy, *bufoute; int yskip; yskip=rtj->width; bufcb=planes[1]; bufcr=planes[2]; bufy=planes[0]; for(i=0; i<(rtj->height); i++) { bufoute=rows[i]; for(j=0; ...
false
false
false
false
false
0
evergreen_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk) { /* start off with something large */ unsigned fb_div = 0, vclk_div = 0, dclk_div = 0; int r; /* bypass vclk and dclk with bclk */ WREG32_P(CG_UPLL_FUNC_CNTL_2, VCLK_SRC_SEL(1) | DCLK_SRC_SEL(1), ~(VCLK_SRC_SEL_MASK | DCLK_SRC_SEL_MASK)...
false
false
false
false
false
0
yy_suffix(GREG *G) { int yypos0= G->pos, yythunkpos0= G->thunkpos; yyprintf((stderr, "%s\n", "suffix")); if (!yy_primary(G)) { goto l71; } { int yypos72= G->pos, yythunkpos72= G->thunkpos; { int yypos74= G->pos, yythunkpos74= G->thunkpos; if (!yy_QUESTION(G)) { goto l75; } yyDo(G, yy_1_suffix, G->begin, G->...
false
false
false
false
false
0
write_child_stdin (GIOChannel *channel, GIOCondition condition, gpointer user_data) { UDisksSpawnedJob *job = UDISKS_SPAWNED_JOB (user_data); gsize bytes_written; if (job->input_string_cursor == NULL || *job->input_string_cursor == '\0') { /* nothing left to write;...
false
false
false
false
false
0
posix_thread_function(void*c) { thread_traits<posix> ::_Ctype*ct= (thread_traits<posix> ::_Ctype*)c; try{ ct->operator()(); }catch(...){ ct->exit(); } return NULL; }
false
false
false
false
false
0
peek(int I = 0) const { return End - Ptr <= I ? 0 : Ptr[I]; }
false
false
false
false
false
0
overloadMatch(TemplateParameter *tp) { TemplateValueParameter *tvp = tp->isTemplateValueParameter(); if (tvp) { if (valType != tvp->valType) goto Lnomatch; if (valType && !valType->equals(tvp->valType)) goto Lnomatch; if (specValue != tvp->specValue) ...
false
false
false
false
false
0
p12_store(hx509_context context, hx509_certs certs, void *data, int flags, hx509_lock lock) { struct ks_pkcs12 *p12 = data; PKCS12_PFX pfx; PKCS12_AuthenticatedSafe as; PKCS12_OctetString asdata; size_t size; int ret; memset(&as, 0, sizeof(as)); memset(&pfx, 0, sizeof(pfx)); ret...
false
false
false
false
true
1
slotmem_release(ap_slotmem_instance_t *slot, unsigned int id) { char *inuse; if (!slot) { return APR_ENOSHMAVAIL; } inuse = slot->inuse; if (id >= slot->desc.num || !inuse[id] ) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(...
false
false
false
false
false
0
glade_widget_add_verify (GladeWidget *widget, GladeWidget *child, gboolean user_feedback) { g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE); g_return_val_if_fail (GLADE_IS_WIDGET (child), FALSE); return glade_widget_adaptor_add_verify (widget->priv->adaptor, widget->priv-...
false
false
false
false
false
0
gm_need_paranthesis(int this_op, int up_op, bool is_right) { if (up_op == GMOP_TER) { // for clarity I prefer adding ()s, except chained ternary-ops. // example (A+B>C) ? (D+1) : (A+C>D) ? (E+1) : (F+1) if ((this_op == GMOP_TER) && is_right) return false; else ...
false
false
false
false
false
0
ahd_build_transfer_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) { /* * We need to initiate transfer negotiations. * If our current and goal settings are identical, * we want to renegotiate due to a check condition. */ struct ahd_initiator_tinfo *tinfo; struct ahd_tmode_tstate *tstate; int dowide;...
false
false
false
false
false
0
normal_sort_tab_page_get_selected_tracks(NormalSortTabPage *self) { NormalSortTabPagePrivate *priv = NORMAL_SORT_TAB_PAGE_GET_PRIVATE(self); GList *tracks = NULL; GList *entries = priv->selected_entries; while(entries) { TabEntry *entry = entries->data; GList *gl; for (gl = ent...
false
false
false
false
false
0
mov_imglayer_constrain(gint32 image_id, gint32 drawable_id, gpointer data) { if(gap_debug) printf("GAP-DEBUG: mov_imglayer_constrain PROCEDURE image_id:%d drawable_id:%d\n" ,(int)image_id ,(int)drawable_id ); if(drawable_id < 0) { ...
false
false
false
false
false
0
any_part_free (SqlPart *part) { switch (part->part->type) { case GDA_SQL_ANY_EXPR: gda_sql_expr_free ((GdaSqlExpr*) part->part); break; default: TO_IMPLEMENT; } g_free (part); }
false
false
false
false
false
0
__mnt3_resolve_export_subdir_comp (mnt3_resolve_t *mres) { char dupsubdir[MNTPATHLEN]; char *nextcomp = NULL; int ret = -EFAULT; nfs_user_t nfu = {0, }; uuid_t gfid = {0, }; if (!mres) return ret; n...
true
true
false
false
false
1
cm_prefs_yesno(const char *val) { unsigned int i; if (val != NULL) { for (i = 0; i < sizeof(yes_words) / sizeof(yes_words[0]); i++) { if (strcasecmp(yes_words[i], val) == 0) { return 1; } } for (i = 0; i < sizeof(no_words) / sizeof(no_words[0]); i++) { if (strcasecmp(no_...
false
false
false
false
false
0
message_validate_vendor(struct message *msg, struct payload *p) { if (!msg->exchange) { /* We should have an exchange at this point. */ log_print("message_validate_vendor: payload out of sequence"); message_drop(msg, ISAKMP_NOTIFY_PAYLOAD_MALFORMED, 0, 1, 1); return -1; } /* Vendor IDs are only allowed in p...
false
false
false
false
false
0
indent_all( BOOLEAN using_stdin) { exit_values_ty exit_status = total_success; if (input_files > 1) { exit_status = indent_multiple_files(); } else { /* One input stream -- specified file, or stdin */ exit_status = indent_single_file(using_stdin); ...
false
false
false
false
false
0
update_password_for_key (GTlsPassword *password, CK_TOKEN_INFO *token_info, gboolean request_retry) { GTlsPasswordFlags flags; flags = 0; if (request_retry) flags |= G_TLS_PASSWORD_RETRY; if (token_info && token_info->flags & CKF_USER_PIN_COUNT_LOW) flags |= G_...
false
false
false
false
false
0
processNode(const Theorem& thm, vector<Theorem>& lits, vector<Theorem>& gamma, vector<Theorem>& fringe, int& pending) { // Decrease the fan-out count int fanOutCount(thm.getCachedValue() - 1); thm.setCachedValue(fanOutCount); bool wasFlagged(thm.isFlagged()); thm.setFlag(); DebugAssert(fanOutCo...
false
false
false
false
false
0
colorlabel_create_check_color_menu_item(gint color_index, gboolean force, gint menu_index) { GtkWidget *label; GtkWidget *hbox; GtkWidget *vbox; GtkWidget *item; gchar *accel; G_RETURN_VAL_IF_INVALID_COLOR(color_index, NULL); item = gtk_check_menu_item_new(); if (force) { label_colors[menu_index][color...
false
false
false
false
false
0
get_as_string() { CHECK_NOT_DESTROYED; CORBA::ULong val; { if( !isValid() ) OMNIORB_THROW(BAD_PARAM, BAD_PARAM_InvalidDynAny, CORBA::COMPLETED_NO); pd_buf.rewindInputPtr(); val <<= pd_buf; } if( val >= actualTc()->NP_member_count() ) OMNIORB_THROW(BAD_PARAM, BAD_PARAM_InvalidD...
false
false
false
false
false
0
git_submodule_sync(git_submodule *sm) { int error = 0; git_config *cfg = NULL; git_buf key = GIT_BUF_INIT; git_repository *smrepo = NULL; if (!sm->url) { giterr_set(GITERR_SUBMODULE, "No URL configured for submodule '%s'", sm->name); return -1; } /* copy URL over to config only if it already exists */ ...
false
false
false
false
false
0
psmux_ensure_program_stream_map (PsMux * mux) { gint psm_size = 16, es_map_size = 0; bits_buffer_t bw; GList *cur; guint16 len; guint8 *pos; guint8 *data; if (mux->psm != NULL) return; /* pre-write the descriptor loop */ pos = mux->es_info_buf; for (cur = mux->streams; cur != NULL; cur = cur->...
false
true
false
false
false
1
log_in_use(const char* log_name) { size_t log_name_len = strlen(log_name) + 1; THD *tmp; bool result = 0; DEBUG_SYNC(current_thd,"purge_logs_after_lock_index_before_thread_count"); mysql_mutex_lock(&LOCK_thread_count); I_List_iterator<THD> it(threads); while ((tmp=it++)) { LOG_INFO* linfo; if (...
false
false
false
false
false
0
do_fetch(struct transport *transport, struct refspec *refs, int ref_count) { struct string_list existing_refs = STRING_LIST_INIT_NODUP; struct string_list_item *peer_item = NULL; struct ref *ref_map; struct ref *rm; int autotags = (transport->remote->fetch_tags == 1); for_each_ref(add_existing, &existing_r...
false
false
false
false
false
0
rb_debug_realf (const char *func, const char *file, const int line, gboolean newline, const char *format, ...) { va_list args; char buffer[1025]; if (!rb_debug_matches (func, file)) return; va_start (args, format); g_vsnprintf (buffer, 1024, format, args); va_end (args); _rb_debug_print (func, fil...
false
false
false
false
false
0
const_1_to_31_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) { return (GET_CODE (op) == CONST_INT) && ( #line 646 "../../src/gcc/config/i386/predicates.md" (IN_RANGE (INTVAL (op), 1, 31))); }
false
false
false
false
false
0
jbd2_journal_free_reserved(handle_t *handle) { journal_t *journal = handle->h_journal; WARN_ON(!handle->h_reserved); sub_reserved_credits(journal, handle->h_buffer_credits); jbd2_free_handle(handle); }
false
false
false
false
false
0
isStereo() const { if(!info){ fxerror("%s::isStereo: visual not yet initialized.\n",getClassName()); } #ifdef HAVE_GL_H FXint s; #ifndef WIN32 glXGetConfig(DISPLAY(getApp()),(XVisualInfo*)info,GLX_STEREO,&s); #else s=(((PIXELFORMATDESCRIPTOR*)info)->dwFlags&PFD_STEREO)!=0; #endif return s; #else return FALS...
false
false
false
false
false
0
on_document_filetype_set(GObject *obj, GeanyDocument *doc, GeanyFiletype *filetype_old, gpointer user_data) { /* update styles */ if (edit_window.editor == doc->editor) sync_to_current(edit_window.sci, doc->editor->sci); }
false
false
false
false
false
0
handle_inotify_cb(GIOChannel *channel, GIOCondition cond, gpointer data) { char buf[EVENT_BUF_LEN]; GIOStatus err; gsize len, i; gboolean changed; changed = FALSE; err = g_io_channel_read_chars(channel, buf, EVENT_BUF_LEN, &len, NULL); if (err != G_IO_STATUS_NORMAL) { error("Error reading inotify eve...
false
false
false
false
false
0
cmd_fact(void) { double tmpnum; if (top()->num < 0 || modf(top()->num, &tmpnum) != 0) error(ERR_DOMAIN); else if (top()->num == 0) top()->num = 1; else for (tmpnum = top()->num, top()->num = 1; tmpnum > 1; tmpnum--) top()->num *= tmpnum; }
false
false
false
false
false
0
exhcmd_next(struct he_s *hedit, char *args) /* ARGSUSED */ { struct buffer_s *i; char *ab = alternate_buffer; char *skip; skip = exh_skipcmd(args, 0); if ((i = current_buffer->next)) { alternate_buffer = current_buffer->hedit->buffer_name; if (he_select_buffer_(i)) { /* Oops. */ he_message(1,...
false
false
false
false
false
0
altera_uart_rx_chars(struct altera_uart *pp) { struct uart_port *port = &pp->port; unsigned char ch, flag; unsigned short status; while ((status = altera_uart_readl(port, ALTERA_UART_STATUS_REG)) & ALTERA_UART_STATUS_RRDY_MSK) { ch = altera_uart_readl(port, ALTERA_UART_RXDATA_REG); flag = TTY_NORMAL; ...
false
false
false
false
false
0
match_index_to_operand(Node *operand, int indexcol, IndexOptInfo *index) { int indkey; /* * Ignore any RelabelType node above the operand. This is needed to be * able to apply indexscanning in binary-compatible-operator cases. Note: * we can assume there is at most one RelabelType node; * e...
false
false
false
false
false
0
print (ostream &out, const char *inner, bool prefix) const { ostringstream declarator; declarator << _memb_ptr_scope << "*"; if (is_qualified ()) { declarator << " "; print_qual (declarator); declarator << " "; } if (inner) declarator << inner; if (base ()) base ()->print (out, declarato...
false
false
false
false
false
0
build_mouse_menu(P_Controls *page) { gchar **gfx[] = { icon_mouse1_xpm, icon_mouse2_xpm, icon_mouse3_xpm, icon_mouse4_xpm, icon_mouse5_xpm }, *label[] = { N_("Left"), N_("Middle"), N_("Right"), N_("Wheel Up"), N_("Wheel Down") }; guint i; GtkListStore *mmodel; GtkCellRenderer *cr; for(i = 0; i < sizeof gfx ...
false
false
false
false
false
0
gst_rtp_mp4a_pay_class_init (GstRtpMP4APayClass * klass) { GObjectClass *gobject_class; GstBaseRTPPayloadClass *gstbasertppayload_class; gobject_class = (GObjectClass *) klass; gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gobject_class->finalize = gst_rtp_mp4a_pay_finalize; gstbasertppaylo...
false
false
false
false
false
0
pch_gbe_hal_init_hw(struct pch_gbe_hw *hw) { if (!hw->func->init_hw) { struct pch_gbe_adapter *adapter = pch_gbe_hw_to_adapter(hw); netdev_err(adapter->netdev, "ERROR: configuration\n"); return -ENOSYS; } return hw->func->init_hw(hw); }
false
false
false
false
false
0
open_tokens(const string& fname) throw(ParserError) { open_tokens(fname.c_str()); }
false
false
false
false
false
0
p_unit(int u) { char *name, *sign; int arity, args[MAX_ARITY], j; sign = (u < 0 ? "-" : ""); decode_int(abs(u), &name, &arity, args); printf(" %s%s", sign, name); for (j=0; j<arity; j++) printf("%d", args[j]); }
false
false
false
false
false
0
ensFeatureCalculateStrand(const EnsPFeature feature) { if (!feature) return '\0'; if (feature->Strand > 0) return '+'; if (feature->Strand < 0) return '-'; return '\0'; }
false
false
false
false
false
0
_config_color_class_end_state_apply(CFColor_Class *ccc) { const char *sig; if (!ccc->gui.end) return; sig = ccc->val.enabled ? "e,state,checked" : "e,state,unchecked"; edje_object_signal_emit(ccc->gui.end, sig, "e"); }
false
false
false
false
false
0
matrix(int nrl, int nrh, int ncl, int nch) /* Allocates a float matrix with range [nrl..nrh][ncl..nch] */ { int i; float **m; /* allocate pointers to rows */ m = (float **)G_malloc((unsigned)(nrh - nrl + 1) * sizeof(float *)); /* allocate rows */ for (i = 0; i < (nrh - nrl + 1); i++) { m[i] ...
false
false
false
false
false
0
get_account_reg2(struct char_session_data *sd,struct global_reg *reg) { int i; if(sd == NULL) return 0; for(i=0;i<max_char_slot;i++) { const struct mmo_chardata *cd = sd->found_char[i]; if(cd) { if(cd->reg.account2_num > 0) { memcpy(reg, &cd->reg.account2, sizeof(cd->reg.account2)); return cd->reg...
false
false
false
false
false
0
assert_hdmi_port_disabled(struct intel_hdmi *intel_hdmi) { struct drm_device *dev = intel_hdmi_to_dev(intel_hdmi); struct drm_i915_private *dev_priv = dev->dev_private; uint32_t enabled_bits; enabled_bits = HAS_DDI(dev) ? DDI_BUF_CTL_ENABLE : SDVO_ENABLE; WARN(I915_READ(intel_hdmi->hdmi_reg) & enabled_bits, ...
false
false
false
false
false
0
afr_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd) { afr_private_t *priv = NULL; afr_local_t *local = NULL; xlator_t **children = NULL; int call_child = 0; int32_t op_errno = 0; int32_t read_child = 0; ...
false
false
false
false
false
0
qib_count_units(int *npresentp, int *nupp) { int nunits = 0, npresent = 0, nup = 0; struct qib_devdata *dd; unsigned long flags; int pidx; struct qib_pportdata *ppd; spin_lock_irqsave(&qib_devs_lock, flags); list_for_each_entry(dd, &qib_dev_list, list) { nunits++; if ((dd->flags & QIB_PRESENT) && dd->kregb...
false
false
false
false
false
0
CopyFile(const Pathname &old_path, const Pathname &new_path) { LOG(LS_VERBOSE) << "Copying " << old_path.pathname() << " to " << new_path.pathname(); char buf[256]; size_t len; StreamInterface *source = OpenFile(old_path, "rb"); if (!source) return false; ...
false
false
false
false
false
0
AtB(vnl_vector<double>& out, const vnl_matrix<double>& A, const vnl_vector<double>& B) { const unsigned int m = A.rows(); const unsigned int l = B.size(); // Verify matrices compatible if (m != l) { vcl_cerr << "vnl_fastops::AtB: argument sizes do not match: " << m << " != " << l << '\n'; vcl_abort(); ...
false
false
false
false
false
0
cbrt(double x) { int32_t hx; union { double value; u_int64_t bits; } u; double r,s,t=0.0,w; u_int32_t sign; u_int32_t high,low; EXTRACT_WORDS(hx,low,x); sign=hx&0x80000000; /* sign= sign(x) */ hx ^=sign; if(hx>=0x7ff00000) return(x+x); /* cbrt(NaN,INF) is itself */ /* * Rough cbrt to 5...
false
false
false
false
false
0
add_assignment(int asgn_off, const char* str, int name_len, int right_off, int right_len) { // the order of doing things here is important: since the // FormulaParser requires that all references from the i-th tree // refere to trees with index lass than i, so to capture also a // nulary term for the left ...
false
false
false
false
false
0
simpleInbound(fdInfoType *info,void *buf,int len,unsigned int flags) { register fdInfoType *peer=info->peer; /* if there is no data queued, just toss it across. */ if (!info->in.dataLen) { if (peer->TCP_OUTPUT(peer,buf,len,flags)>0) { clrSelect(info->fd,SL_READ); } } else { /* We have data queu...
false
false
false
false
false
0
hasNext() const { return pos_!=NULL || !stack_->isEmpty(); }
false
false
false
false
false
0
maisdef (p_ma) p_ma_t p_ma; { as_cold(p_ma->ma_minlev <= MAXLIBLEV + 1,"maisdef: Bad ma_minlev value."); return (p_ma->ma_minlev < (MAXLIBLEV + 1)); }
false
false
false
false
false
0
mx_table_child_set_column (MxTable *table, ClutterActor *child, gint col) { MxTableChild *meta; g_return_if_fail (MX_IS_TABLE (table)); g_return_if_fail (CLUTTER_IS_ACTOR (child)); meta = get_child_meta (table, child); if (meta->col == col...
false
false
false
false
false
0
make_type_from_size (tree type, tree size_tree, bool for_biased) { unsigned HOST_WIDE_INT size; bool biased_p; tree new_type; /* If size indicates an error, just return TYPE to avoid propagating the error. Likewise if it's too large to represent. */ if (!size_tree || !host_integerp (size_tree, 1)) ...
false
false
false
true
true
1
avision_is_open (Avision_Connection* av_con) { if (av_con->connection_type == AV_SCSI) { return av_con->scsi_fd >= 0; } else { return av_con->usb_dn >= 0; } }
false
false
false
false
false
0
alarm_dispose (GObject *object) { Alarm *alarm = ALARM (object); // AlarmPrivate *priv = ALARM_PRIVATE (object); GObjectClass *parent = (GObjectClass *)alarm_parent_class; g_debug ("Alarm(%p) #%d: dispose()", alarm, alarm->id); if (parent->dispose) parent->dispose (object); alarm_gconf_disconnect (alarm); ...
false
false
false
false
false
0
main_rec_hfcpci(struct BCState *bcs) { struct IsdnCardState *cs = bcs->cs; int rcnt, real_fifo; int receive, count = 5; struct sk_buff *skb; bzfifo_type *bz; u_char *bdata; z_type *zp; if ((bcs->channel) && (!cs->hw.hfcpci.bswapped)) { bz = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2; bdata = ...
false
false
false
false
false
0
GetCanonizedTopic(struct Topic *list,char *topic_name) { struct Topic *tp; char context[CF_MAXVARSIZE],name[CF_MAXVARSIZE]; DeClassifyCanonicalTopic(topic_name,name,context); for (tp = list; tp != NULL; tp=tp->next) { if (strlen(context) == 0) { if (strcmp(name,CanonifyName(tp->topic_name)) == 0)...
false
false
false
false
false
0
gst_value_list_merge (GValue * dest, const GValue * value1, const GValue * value2) { guint i, j, k, value1_length, value2_length, skipped; const GValue *src; gboolean skip; GArray *array; g_return_if_fail (dest != NULL); g_return_if_fail (G_VALUE_TYPE (dest) == 0); g_return_if_fail (G_IS_VALUE (value...
false
false
false
false
false
0
init() { /* short swords */ create("orcish short sword", 10, 30, Attack(AT_CLAW, AD_PHYS, 1, 5), Attack(), Attack(), Attack(AT_CLAW, AD_PHYS, 1, 8), Attack(), Attack(), MATERIAL_IRON, WEAPON, 0, true, CHAOTIC | NEUTRAL | LAWFUL); create("short sword", 10, 30, Attack(AT_CLAW, AD_PHYS, 1, 6), Attack(), Attack(), Attac...
false
false
false
false
false
0
snippet_has_language (AnjutaSnippet *snippet, const gchar *language) { GList *languages = NULL, *iter = NULL; /* Assertions */ g_return_val_if_fail (ANJUTA_IS_SNIPPET (snippet), FALSE); g_return_val_if_fail (snippet->priv != NULL, FALSE); g_return_val_if_fail (language != NULL, FALSE); lan...
false
false
false
false
false
0
Curl_http_connect(struct connectdata *conn, bool *done) { CURLcode result; /* We default to persistent connections. We set this already in this connect function to make the re-use checks properly be able to check this bit. */ conn->bits.close = FALSE; /* the CONNECT procedure might not have been complete...
false
false
false
false
false
0
assignIf() { if (!_settings->isEnabled("style")) return; for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { if (tok->str() != "=") continue; if (Token::Match(tok->tokAt(-2), "[;{}] %var% = %var% [&|] %num% ;")) { const unsigned int varid(tok...
false
false
false
false
false
0
pd_floatforsignal(t_pd *x, t_float f) { int offset = (*x)->c_floatsignalin; if (offset > 0) *(t_float *)(((char *)x) + offset) = f; else pd_error(x, "%s: float unexpected for signal input", (*x)->c_name->s_name); }
false
false
false
false
false
0
print_token_fifo(pCPP_ struct token_fifo *tf) { size_t i; for (i = 0; i < tf->nt; i ++) if (ttMWS(tf->t[i].type)) fputc(' ', emit_output); else fputs(token_name(tf->t + i), emit_output); }
false
false
false
false
false
0
_Refit(AABBTreeBuilder* builder) { // 1) Recompute the new global box for current node builder->ComputeGlobalBox(mNodePrimitives, mNbPrimitives, mBV); // 2) Recurse AABBTreeNode* Pos = (AABBTreeNode*)GetPos(); AABBTreeNode* Neg = (AABBTreeNode*)GetNeg(); if(Pos) Pos->_Refit(builder); if(Neg) Neg->_Refit(builder...
false
false
false
false
false
0
toXML(xmlNodePtr xml_parent_node) throw(FWException) { xmlNodePtr me = FWObject::toXML(xml_parent_node); xmlNewProp(me, TOXMLCAST("name"), STRTOXMLCAST(getName())); xmlNewProp(me, TOXMLCAST("comment"), STRTOXMLCAST(getComment())); xmlNewProp(me, TOXMLCAST("ro"), TOXMLCAST(((getRO()) ? "True" : "False")...
false
false
false
false
false
0
paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { QGraphicsTextItem::paint(painter, option, widget); if (isSelected()) { QRectF rect=QGraphicsTextItem::boundingRect(); painter->setPen(_canvas->colorBoxFrameText()); painter->setBrush(_canvas->palette().highlight()); painter->...
false
false
false
false
false
0
test_run_and_cancel_later (Test *test, gconstpointer unused) { GError *error = NULL; GOutputStream *output; gchar *script; const gchar *argv[] = { "15", NULL }; GCancellable *cancellable; gboolean ret; cancellable = g_cancellable_new (); script = build_script_path ("mock-simple-output"); test->process = _gcr...
false
false
false
false
false
0
eng_window_resurf(Evas_GL_X11_Window *gw) { if (gw->surf) return; if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", gw); #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, ...
false
false
false
false
true
1
getnumber(locus, system, LINK) locusvalues **locus; long *system; struct LOC_getlocus *LINK; { long i; locusvalues *WITH; long FORLIM; WITH = *locus; FORLIM = WITH->nallele; for (i = 1; i <= FORLIM; i++) WITH->UU.allele[i - 1] = 1; }
false
false
false
false
false
0
xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, unsigned int slot_id, unsigned int ep_index, unsigned int stream_id, struct xhci_dequeue_state *deq_state) { dma_addr_t addr; u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); u32 trb_ep_index = EP_ID_FOR_TRB(ep_index); u32 trb_stream_id = STREAM_ID_FOR_TRB(stream...
false
false
false
false
false
0
httpSetRoutePattern(HttpRoute *route, cchar *pattern, int flags) { mprAssert(route); mprAssert(pattern && *pattern); route->flags |= (flags & HTTP_ROUTE_NOT); route->pattern = sclone(pattern); finalizePattern(route); }
false
false
false
false
false
0
eb_status(GtkCheckMenuItem *widget, gpointer stats) { struct acctStatus *s; int current_state = 0, new_state = 0; s = (struct acctStatus *)stats; eb_debug(DBG_CORE, "Status of radio button for state[%i]: %i\n", s->status, widget->active); current_state = eb_services[s->ela->service_id].sc->get_current_state(s...
false
false
false
false
false
0
pb_msg_dropped(void *obj, knode_t *unused_kn, pmsg_t *mb) { publish_t *pb = obj; publish_check(pb); (void) unused_kn; /* * Message was not sent and dropped by the queue. */ pb->msg_dropped++; pb->udp_drops++; /* * Move current pending message back at the front of the queue. */ if (PUBLISH_CACHE == ...
false
false
false
false
false
0
font_match (GnmStyle const *mstyle, char const **names) { int i; char const *font_name; if (!mstyle) return 0; font_name = gnm_style_get_font_name (mstyle); g_return_val_if_fail (names != NULL, 0); g_return_val_if_fail (font_name != NULL, 0); for (i = 0; names[i]; i++) { if (g_ascii_strcasecmp (font_name,...
false
false
false
false
false
0
fortuna_read(unsigned char *out, unsigned long outlen, prng_state *prng) { unsigned char tmp[16]; int err; unsigned long tlen; LTC_ARGCHK(out != NULL); LTC_ARGCHK(prng != NULL); LTC_MUTEX_LOCK(&prng->fortuna.prng_lock); /* do we have to reseed? */ if (++prng->fortuna.wd == FORTUNA_...
false
false
false
true
false
1
cfg_get_single_value_as_float_with_default(config_obj * cfg, const char *class, const char *key, float def) { float retv = 0; retv = __int_cfg_get_single_value_as_float(cfg, class, key); if (retv == CFG_INT_NOT...
false
false
false
false
false
0
smime_sign_encrypt(struct mailprivacy * privacy, mailmessage * msg, struct mailmime * mime, struct mailmime ** result) { struct mailmime * signed_part; struct mailmime * encrypted; int r; int res; r = smime_sign(privacy, msg, mime, &signed_part); if (r != MAIL_NO_ERROR) { res = r; goto er...
false
false
false
false
false
0
CheckRangeCallback(void* ptr, base::MallocRange::Type type, size_t min_size) { RangeCallbackState state; state.ptr = reinterpret_cast<uintptr_t>(ptr); state.expected_type = type; state.min_size = min_size; state.matched = false; MallocExtension::instance()->Ranges(&state, Rang...
false
false
false
false
false
0
dump_tx_udp_packet(const gnet_host_t *to, const pmsg_t *mb) { if (GNET_PROPERTY(dump_transmitted_gnutella_packets)) { struct gnutella_node udp; g_assert(to != NULL); g_assert(mb != NULL); /* * Fill only the fields which will be perused by * dump_packet_from_to(). */ udp.peermode = NODE_P_UDP; u...
false
false
false
false
false
0
netjoin_add(IRC_SERVER_REC *server, const char *nick, GSList *channels) { NETJOIN_REC *rec; NETJOIN_SERVER_REC *srec; g_return_val_if_fail(server != NULL, NULL); g_return_val_if_fail(nick != NULL, NULL); rec = g_new0(NETJOIN_REC, 1); rec->nick = g_strdup(nick); while (channels != NULL) { NETSPLIT_CHAN_RE...
false
false
false
false
false
0
ucma_query_device_addr(struct rdma_cm_id *cm_id, struct rdma_ucm_query_addr_resp *resp) { if (!cm_id->device) return; resp->node_guid = (__force __u64) cm_id->device->node_guid; resp->port_num = cm_id->port_num; resp->pkey = (__force __u16) cpu_to_be16( ib_addr_get_pkey(&cm_id->route.addr.dev_addr)...
false
false
false
false
false
0
findNeighbours(GwyDelaunayVertex *v, simplex *s) { gint i; arrayList *l = newArrayList(); stack *toCheck = newStack(); simplex *current; push(toCheck, s); while (!isEmpty(toCheck)) { // pop the next one to check from the stack. current = pop(toCheck); // We try to chose the things most li...
false
false
false
false
false
0