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
__acpi_match_device( struct acpi_device *device, const struct acpi_device_id *ids, const struct of_device_id *of_ids) { const struct acpi_device_id *id; struct acpi_hardware_id *hwid; /* * If the device is not present, it is unnecessary to load device * driver for it. */ if (!device || !device->status.pre...
false
false
false
false
false
0
done (xmmsc_result_t *res, cli_infos_t *infos) { const gchar *err; xmmsv_t *val; val = xmmsc_result_get_value (res); if (xmmsv_get_error (val, &err)) { g_printf (_("Server error: %s\n"), err); } cli_infos_loop_resume (infos); xmmsc_result_unref (res); }
false
false
false
false
false
0
recv_ruleset_effect_req(const struct packet_ruleset_effect_req *packet) { if (packet->effect_id != effect_list_size(ruleset_cache.tracker) - 1) { log_error("Bug in recv_ruleset_effect_req."); } else { struct effect *peffect = effect_list_get(ruleset_cache.tracker, -1); struct requirement req, *preq; ...
false
false
false
false
false
0
ignore_dirichlet_boundaries (GfsBox * box, FaceSource * f) { FttDirection d; for (d = 2*f->c; d <= 2*f->c + 1; d++) if (GFS_IS_BOUNDARY (box->neighbor[d])) { GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]); GfsBc * bc = gfs_boundary_lookup_bc (b, f->v); if (GFS_IS_BC_DIRICHLET (bc)) ftt_fac...
false
false
false
false
false
0
create_icon_menu(char *labeltext, void *stock_name, int is_stock) { GtkWidget *item, *img; if (is_stock) img = gtk_image_new_from_stock(stock_name, GTK_ICON_SIZE_MENU); else img = gtk_image_new_from_pixbuf(*((GdkPixbuf **)stock_name)); item = gtk_image_menu_item_new_with_mnemonic(labeltext); gtk_image_menu_it...
false
false
false
false
false
0
cxd2820r_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) { struct cxd2820r_priv *priv = fe->demodulator_priv; dev_dbg(&priv->i2c->dev, "%s: %d\n", __func__, enable); /* Bit 0 of reg 0xdb in bank 0x00 controls I2C repeater */ return cxd2820r_wr_reg_mask(priv, 0xdb, enable ? 1 : 0, 0x1); }
false
false
false
false
false
0
create_atoms(Display *d) { static const char *const names[netAtomCount] = { "UTF8_STRING", "_NET_SUPPORTED", "_NET_SUPPORTING_WM_CHECK", "_NET_CLIENT_LIST", "_NET_CLIENT_LIST_STACKING", "_NET_NUMBER_OF_DESKTOPS", "_NET_DESKTOP_GEOMETRY", "_NET_DESKTOP_...
false
false
false
false
false
0
eel_canvas_scroll_to (EelCanvas *canvas, int cx, int cy) { g_return_if_fail (EEL_IS_CANVAS (canvas)); scroll_to (canvas, cx, cy); }
false
false
false
false
false
0
smf_free(struct storage *s) { struct smf *smf; struct smf_sc *sc; CHECK_OBJ_NOTNULL(s, STORAGE_MAGIC); CAST_OBJ_NOTNULL(smf, s->priv, SMF_MAGIC); sc = smf->sc; Lck_Lock(&sc->mtx); sc->stats->nobj--; sc->stats->balloc -= smf->size; sc->stats->bfree += smf->size; free_smf(smf); Lck_Unlock(&sc->mtx); }
false
false
false
true
false
1
gst_rtp_sbc_depay_process (GstRTPBaseDepayload * base, GstBuffer * in) { GstRtpSbcDepay *depay = GST_RTP_SBC_DEPAY (base); GstBuffer *data = NULL; GstRTPBuffer rtp = { NULL }; gboolean fragment, start, last; guint8 nframes; guint8 *payload; guint payload_len; gst_rtp_buffer_map (in, GST_MAP_READ, &rtp...
false
false
false
false
false
0
setup_child(void *_p) { bench_process_t *p = (bench_process_t *)_p; cpu_set_t cpu_set; struct sigaction sa = { .sa_handler = SIG_DFL, }; /* Reset signal handlers so we don't try to kill child processes * on fatal signals. Remember that this code is executing in a * child process j...
false
false
false
false
false
0
visit(node& n, bool enter) { if (enter) { update_interferences(); process_op(n); } return false; }
false
false
false
false
false
0
gx_fast_meter_set(GxFastMeter* fm, gdouble lvl) { float old_level = fm->current_level; float old_peak = fm->current_peak; lvl = max(0.0, min(1.0, lvl)); fm->current_level = lvl; if (lvl >= fm->current_peak) { fm->current_peak = lvl; fm->hold_state = fm->hold_cnt; } if (fm->hold_state > 0) { -...
false
false
false
false
false
0
diff_win_options(wp, addbuf) win_T *wp; int addbuf; /* Add buffer to diff. */ { wp->w_p_diff = TRUE; wp->w_p_scb = TRUE; wp->w_p_wrap = FALSE; # ifdef FEAT_FOLDING { win_T *old_curwin = curwin; curwin = wp; curbuf = curwin->w_buffer; set_string_option_direct((char_u *)"fdm", -1, (char...
false
false
false
false
false
0
ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type, int batch_mode) { struct host_command cmd = { .host_command = PORT_TYPE, .host_command_sequence = 0, .host_command_length = sizeof(u32) }; int err; switch (port_type) { case IW_MODE_INFRA: cmd.host_command_parameters[0] = IPW_BSS; brea...
false
false
false
false
false
0
bnad_destroy_tx(struct bnad *bnad, u32 tx_id) { struct bnad_tx_info *tx_info = &bnad->tx_info[tx_id]; struct bna_res_info *res_info = &bnad->tx_res_info[tx_id].res_info[0]; unsigned long flags; if (!tx_info->tx) return; init_completion(&bnad->bnad_completions.tx_comp); spin_lock_irqsave(&bnad->bna_lock, flags...
false
false
false
false
false
0
sig_subscribe(XMPP_SERVER_REC *server, const char *jid, const char *status) { XMPP_ROSTER_USER_REC *user; char *name; g_return_if_fail(IS_SERVER(server)); g_return_if_fail(jid != NULL); user = rosters_find_user(server->roster, jid, NULL, NULL); name = user != NULL && user->name != NULL ? format_get_text(MOD...
false
false
false
false
false
0
pfs_process_scratch_address( struct pfs_process *p ) { if(p->break_address && pfs_process_verify_break_rw_address(p)) { return p->break_address - sysconf(_SC_PAGESIZE); } else { return pfs_process_heap_address(p); } }
false
false
false
false
false
0
ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) { TiXmlDocument* document = GetDocument(); // Read in text and elements in any order. const char* pWithWhiteSpace = p; p = SkipWhiteSpace( p, encoding ); while ( p && *p ) { if ( *p != '<' ) { // Take what we have, make a text ele...
false
false
false
false
false
0
useMovt(const MachineFunction &MF) const { // NOTE Windows on ARM needs to use mov.w/mov.t pairs to materialise 32-bit // immediates as it is inherently position independent, and may be out of // range otherwise. return !NoMovt && hasV6T2Ops() && (isTargetWindows() || !MF.getFunction()->optForMinSize()...
false
false
false
false
false
0
gst_frame_positionner_dispose (GObject * object) { GstFramePositionner *pos = GST_FRAME_POSITIONNER (object); if (pos->track_source) { g_signal_handlers_disconnect_by_func (pos->track_source, _track_changed_cb, pos); pos->track_source = NULL; } if (pos->current_track) { g_signal_handlers_d...
false
false
false
false
false
0
process_route_change (NMIP6Manager *manager, struct nl_msg *msg) { NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); NMIP6Device *device; struct nlmsghdr *hdr; struct rtnl_route *rtnlroute; int old_size; hdr = nlmsg_hdr (msg); rtnlroute = NULL; nl_msg_parse (msg, ref_object, &rtnlroute); if (!...
false
false
false
false
false
0
gt_blindtrie_size(unsigned long maxnumofsuffixes) { if (maxnumofsuffixes == 1UL) { return 0; } else { return sizeof (GtBlindtrie) + (GT_MULT2(maxnumofsuffixes + 1) + 1) * sizeof (GtBlindtrienode); } }
false
false
false
false
false
0
brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p) { struct afx_hdl *afx_hdl = &p2p->afx_hdl; struct brcmf_cfg80211_vif *pri_vif; unsigned long duration; s32 retry; brcmf_dbg(TRACE, "Enter\n"); pri_vif = p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif; reinit_completion(&afx_hdl->act_frm_scan); set_bit(BRCMF...
false
false
false
false
false
0
evt_kcmd_changed(GtkWidget *wid, gpointer user) { P_Controls *page = user; GtkTreeModel *model; GtkTreeIter iter; CtrlKey *key = NULL; if(gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(page->kview)), &model, &iter)) { const gchar *cmdseq = gtk_entry_get_text(GTK_ENTRY(wid)); gtk_...
false
false
false
false
false
0
writef(qlog_t *log, const char *format, ...) { if (log == NULL || log->fp == NULL) return false; char *str; DYNAMIC_VSPRINTF(str, format); if (str == NULL) return false; bool ret = write_(log, str); free(str); return ret; }
false
false
false
false
false
0
copy_enumvalue (EnumValue * self) { EnumValue * new; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (self->type == ENUMVALUE_NODE, NULL); new = g_new0(EnumValue, 1); new->type = ENUMVALUE_NODE; new->name = g_strdup (self->name); new->value = g_strdup (self->value); return new; }
false
false
false
false
false
0
Stop() { qDebug() << "Stopping!"; if(!_running) { return; } // Close all connections for(QHash<QAbstractSocket*, QByteArray>::iterator i=_tcp_buffers.begin(); i!=_tcp_buffers.end(); i++) { i.key()->close(); CloseSocket(i.key()); } QList<TcpPendingDnsData> tcp_dns_values...
false
false
false
false
false
0
removeHTML(string& sp) { string search("/<>"); unsigned int p = sp.find_first_of(search); while (p < sp.length()) { sp.replace(p, 1, "*"); p = sp.find_first_of(search, p + 1); } }
false
false
false
false
false
0
gkf_parse(options_t *options_p, GKeyFile *gkf) { const struct option *lo_ptr = long_options; while(lo_ptr->name != NULL) { gchar *value = g_key_file_get_value(gkf, options_p->config_block, lo_ptr->name, NULL); if(value != NULL) { unsigned char val_char = lo_ptr->val&0xff; if(configs_parse_str[val_char]) ...
false
false
false
false
false
0
cmd_notes(int argc, const char **argv, const char *prefix) { int result; const char *override_notes_ref = NULL; struct option options[] = { OPT_STRING(0, "ref", &override_notes_ref, "notes_ref", "use notes from <notes_ref>"), OPT_END() }; git_config(git_default_config, NULL); argc = parse_options(argc,...
false
false
false
false
false
0
InitializeColors() { m_ColorRed = ITK_NULLPTR; m_ColorGreen = ITK_NULLPTR; m_ColorBlue = ITK_NULLPTR; m_TotalColors = -1; m_ImageFormat = TIFFImageIO::NOFORMAT; if ( m_InternalImage == ITK_NULLPTR ) { return; } unsigned short *red_orig, *green_orig, *blue_orig; if ( !TIFFGetField(m_I...
false
false
false
false
false
0
schedule_block(struct schedule_state * s, struct rc_instruction * begin, struct rc_instruction * end) { unsigned int ip; /* Scan instructions for data dependencies */ ip = 0; for(struct rc_instruction * inst = begin; inst != end; inst = inst->Next) { s->Current = memory_pool_malloc(&s->C->Pool, sizeof(*s->Curr...
false
false
false
false
false
0
e1000_intr_msi(int __always_unused irq, void *data) { struct net_device *netdev = data; struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; u32 icr = er32(ICR); /* read ICR disables interrupts using IAM */ if (icr & E1000_ICR_LSC) { hw->mac.get_link_status = true; /* ICH8...
false
false
false
false
false
0
ad5449_vref_name(struct ad5449 *st, int n) { if (st->chip_info->num_channels == 1) return "VREF"; if (n == 0) return "VREFA"; else return "VREFB"; }
false
false
false
false
false
0
_getGlistFonts (std::vector<std::string> & glFonts) { GR_GraphicsFactory * pGF = XAP_App::getApp()->getGraphicsFactory(); UT_return_if_fail(pGF); const std::vector<std::string> & names = GR_CairoGraphics::getAllFontNames(); std::string currentfont; for (std::vector<std::string>::const_iterator i = names.be...
false
false
false
false
false
0
get_user_thread (GSimpleAsyncResult *result, GDataPicasaWebService *service, GCancellable *cancellable) { GDataPicasaWebUser *user; GError *error = NULL; /* Get the user and return */ user = gdata_picasaweb_service_get_user (service, g_simple_async_result_get_op_res_gpointer (result), cancellable, &error); if (e...
false
false
false
false
false
0
drawRight(bool draw) { QColor col(draw ? Qt::black : Qt::white); if (!right_.enabled) col = QColor(Qt::lightGray); drawLine(col, h - m - l + 1, m + l + 2, h - m - l + 1, h - m - l - 1); }
false
false
false
false
false
0
isIgnoreToken ( const char *const name, boolean *const pIgnoreParens, const char **const replacement) { boolean result = FALSE; if (Option.ignore != NULL) { const size_t nameLen = strlen (name); unsigned int i; if (pIgnoreParens != NULL) *pIgnoreParens = FALSE; for (i = 0 ; i < stringListCount (O...
false
false
false
false
false
0
undo_cable_magic(struct net_device *dev) { u16 data; struct netdev_private *np = netdev_priv(dev); void __iomem * ioaddr = ns_ioaddr(dev); if (dev->if_port != PORT_TP) return; if (np->srr >= SRR_DP83816_A5) return; writew(1, ioaddr + PGSEL); /* make sure the lock bit is clear */ data = readw(ioaddr + DSP...
false
false
false
false
false
0
ndmconn_sys_read (struct ndmconn *conn, char *buf, unsigned len) { int rc; ndmconn_snoop (conn, 9, "reading %d ...", len); rc = read (conn->chan.fd, buf, len); ndmconn_snoop (conn, 8, "read=%d len=%d", rc, len); ndmconn_hex_dump (conn, buf, rc); if (rc <= 0) { conn->chan.eof = 1; if (rc < 0) conn->cha...
false
false
false
false
false
0
GetUserGenre(int i) { if (i >= 0 && i < GetNumUserGenres()) { return mGenres[i]; } return wxT(""); }
false
false
false
false
false
0
kvaser_usb_close(struct net_device *netdev) { struct kvaser_usb_net_priv *priv = netdev_priv(netdev); struct kvaser_usb *dev = priv->dev; int err; netif_stop_queue(netdev); err = kvaser_usb_flush_queue(priv); if (err) netdev_warn(netdev, "Cannot flush queue, error %d\n", err); err = kvaser_usb_send_simple_m...
false
false
false
false
false
0
load_diri2(fin) FILE *fin; { int aa, numc, type; char line[MAXLINE], *ptr; struct dirichlet *diric; diric = (struct dirichlet *) malloc(sizeof(struct dirichlet)); if (diric == NULL) { printf("\nOUT OF MEMORY\n"); exit(-1); } numc = 0; while (numc < MAXCOMP && !feof(fin) && fgets(...
false
false
false
false
false
0
device_property_get_by_name(const char *name) { gpointer rv; if (!device_property_bases_by_name) return NULL; rv = g_hash_table_lookup(device_property_bases_by_name, name); if (rv) return (DevicePropertyBase *)rv; return NULL; }
false
false
false
false
false
0
ValidBrickIndex(const std::vector<uint64_t>& vLOD, const std::vector<uint64_t>& vBrick) const { const uint64_t lod = Serialize(vLOD, ulLODLevelCount); const size_t lod_s = static_cast<size_t>(lod); if(lod_s >= m_vBrickSizes.size()) { return false; } const uint64_t b_idx = ...
false
false
false
false
false
0
imapx_uidset_add (struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *uid) { guint32 uidn; uidn = strtoul (uid, NULL, 10); if (uidn == 0) return -1; ss->uids++; e (ic->is->tagprefix, "uidset add '%s'\n", uid); if (ss->last == 0) { e (ic->is->tagprefix, " start...
false
false
false
false
false
0
match(char *path) { char *oldtoken = NULL, *token = NULL; struct stat inode; int i; // // FOUR likely permutations on files, and two likely permutations on // directories before we start having to do anything fancy: // // filename.ext FILENAME.EXT filename.EXT FILENAME.ext // directory DIRECTORY ...
false
false
false
false
false
0
ends_at_CPY(int *aC, int sz){ while( sz>0 && (aC[0]>0 || aC[1]>0 || aC[2]>0) ){ if( aC[0]>=sz ) return 1; sz -= aC[0]; if( aC[1]>sz ) return 0; sz -= aC[1]; aC += 3; } return 1; }
false
false
false
false
false
0
isns_slp_build_url(uint16_t port) { char buffer[1024]; if (port) snprintf(buffer, sizeof(buffer), "service:%s://%s:%u", ISNS_SLP_SERVICE_NAME, isns_config.ic_host_name, port); else snprintf(buffer, sizeof(buffer), "service:%s://%s", ISNS_SLP_SERVICE_NAME, isns_config.ic_host_name); return isn...
false
false
false
false
false
0
N_calc_arith_mean_n(double *a, int size) { double val = 0.0; int i; for (i = 0; i < size; i++) val += a[i]; val = (val / (double)size); return val; }
false
false
false
false
false
0
on_subimage_apply_clicked (GtkButton *button, gpointer user_data) { int i= GPOINTER_TO_UINT(gtk_widget_get_data_top(GTK_WIDGET(button),"imagenum")); if ( sp-> im_filename_in[i] == NULL || strlen( sp-> im_filename_in[i]) == 0) { show_...
false
false
false
false
false
0
bfb_write_packets(fd_t fd, uint8_t type, uint8_t *buffer, int length) { bfb_frame_t *frame; int i; int l; struct timeval timeout; fd_set fds; int rc; #ifdef _WIN32 DWORD actual; #else int actual; #endif #ifdef _WIN32 return_val_if_fail (fd != INVALID_HANDLE_VALUE, FALSE); #else return_val_if_f...
false
false
false
false
false
0
getTrimmed(char *pChar, int pSize, int pEndStr, int pAddNL, char *pTrimDest) { int tSize = pSize; if(pEndStr) { tSize++; } if(pAddNL) { tSize++; } memset(pTrimDest, 0, tSize); memcpy(pTrimDest, pChar, pSize); if(pAddNL) { pTrimDest[pSize] = '\n'; } if(pEndStr) { pTrimDest[...
false
false
false
false
false
0
hdrl_mime_matrix_linspace_create(int n, double a, double b) { cpl_matrix *nodes; double *data; double h; int i; /* testing input */ if (n < 2) { cpl_error_set(cpl_func, CPL_ERROR_ILLEGAL_INPUT); return NULL; } /* allocating memory */ nodes = cpl_matrix_new(n,...
false
false
false
false
false
0
RetrieveCPUCacheDetails() { #if USE_CPUID int L1Cache[4] = { 0, 0, 0, 0 }; int L2Cache[4] = { 0, 0, 0, 0 }; // Check to see if what we are about to do is supported... if (RetrieveCPUExtendedLevelSupport (0x80000005)) { if (!call_cpuid(0x80000005, L1Cache)) { return false; } // Sav...
false
false
false
false
false
0
get_uninitialized_authority (GCancellable *cancellable, GError **error) { static volatile GQuark error_quark = 0; G_LOCK (the_lock); if (error_quark == 0) error_quark = POLKIT_ERROR; if (the_authority != NULL) { g_object_ref (the_authority); goto out; ...
false
false
false
false
false
0
writeword(mame_file *f,UINT16 num) { unsigned i; for (i = 0;i < sizeof(UINT16);i++) { unsigned char c; c = (num >> 8 * (sizeof(UINT16)-1)) & 0xff; mame_fwrite(f,&c,1); num <<= 8; } }
false
false
false
false
false
0
df_defs_record (struct df *df, rtx x, basic_block bb, rtx insn) { RTX_CODE code = GET_CODE (x); if (code == SET || code == CLOBBER) { /* Mark the single def within the pattern. */ df_def_record_1 (df, x, bb, insn); } else if (code == PARALLEL) { int i; /* Mark the multiple d...
false
false
false
false
false
0
getModRefBehavior(ImmutableCallSite CS) { if (!EnableTBAA) return AliasAnalysis::getModRefBehavior(CS); ModRefBehavior Min = UnknownModRefBehavior; // If this is an "immutable" type, we can assume the call doesn't write // to memory. if (const MDNode *M = CS.getInstruction()->getMetadata(LLVMContext::MD...
false
false
false
false
false
0
allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r, int last_reload) { int i, pass, count; /* If we put this reload ahead, thinking it is a group, then insist on finding a group. Otherwise we can grab a reg that some other reload needs. (That can happen when we have a 6800...
false
false
false
false
false
0
clientCheckBeginForwarding(clientHttpRequest * http) { request_t *r = http->request; int bytes_read, bytes_left; int bytes_to_delay; if (!r->flags.delayed) return 0; assert(http->conn->body.delayed == 1); assert(http->conn->body.delay_http != NULL); /* http->conn->in.offset -here- is the ...
false
false
false
false
false
0
thumb_loader_std_start(ThumbLoaderStd *tl, FileData *fd) { static gchar *thumb_cache = NULL; struct stat st; if (!tl || !fd) return FALSE; thumb_loader_std_reset(tl); tl->fd = file_data_ref(fd); if (!stat_utf8(fd->path, &st)) { thumb_loader_std_set_fallback(tl); return FALSE; } tl->source_mtime = st....
false
false
false
false
false
0
graph_new(int n) { graph_t *g; int i; ASSERT((sizeof(setelement)*8)==ELEMENTSIZE); ASSERT(n>0); g=malloc(sizeof(graph_t)); g->n=n; g->edges=malloc(g->n * sizeof(set_t)); g->weights=malloc(g->n * sizeof(int)); for (i=0; i < g->n; i++) { g->edges[i]=set_new(n); g->weights[i]=1; } return g; }
false
true
false
false
false
1
checkForUpdates() { VersionCheckDialog vcd; vcd.exec(); App::settings->setValue("Fotowall/LastUpdateCheck", QDate::currentDate()); }
false
false
false
false
false
0
max_err_at_vert(REAL (*u)(const REAL_D), const DOF_REAL_VEC *uh) { FUNCNAME("max_err_at_vert"); ERR_TRAVERSE_DATA td[1] = {{0}}; const FE_SPACE *fe_space; if (!(p_u = u)) { ERROR("no function u specified; doing nothing\n"); return(-1.0); } if (!(err_uh = uh) || !(fe_space = uh->fe_space)) { ...
false
false
false
false
false
0
__enable_irq(struct irq_desc *desc) { switch (desc->depth) { case 0: err_out: WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq_desc_get_irq(desc)); break; case 1: { if (desc->istate & IRQS_SUSPENDED) goto err_out; /* Prevent probing on this irq: */ irq_settings_set_noprobe(desc); irq...
false
false
false
false
false
0
find_chars(parser_t * p, const char * chars) { char * pos = NULL; while(1) { pos = strpbrk(p->buffer, chars); if(pos) return pos; if(!more_data(p)) break; } return NULL; }
false
false
false
false
false
0
fso_framework_abstract_command_queue_onHupFromTransport (FsoFrameworkAbstractCommandQueue* self) { FsoFrameworkTransport* _tmp0_ = NULL; FsoFrameworkTransport* _tmp1_ = NULL; FsoFrameworkLogger* _tmp2_ = NULL; g_return_if_fail (self != NULL); _tmp0_ = fso_framework_command_queue_get_transport ((FsoFrameworkCommand...
false
false
false
false
false
0
SetPlayerNameDefault(void) { if (net_player_name == NULL) { net_player_name = strdup(getenv("USER")); } if (net_player_name == NULL) { net_player_name = strdup(getenv("USERNAME")); } // On Windows, environment variables are in OEM codepage // encoding, so convert to UTF...
false
false
false
false
false
0
SetBreakPoint(Handle<DebugInfo> debug_info, int code_position, int source_position, int statement_position, Handle<Object> break_point_object) { Isolate* isolate = Isolate::Current(); Handle<Objec...
false
false
false
false
false
0
efx_remove_nic(struct efx_nic *efx) { netif_dbg(efx, drv, efx->net_dev, "destroying NIC\n"); efx_remove_interrupts(efx); efx->type->remove(efx); }
false
false
false
false
false
0
gutre2_(real* a, real* b) { /* Initialized data */ static real zero = (float)0.; static real two = (float)2.; static real four = (float)4.; /* System generated locals */ real ret_val, r_1; /* Local variables */ static real aabs, babs, r, s; /* (Euclidean Norm of 2-Vector) */ /* ...
false
false
false
false
false
0
afr_sh_metadata_done (call_frame_t *frame, xlator_t *this) { afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; local = frame->local; sh = &local->self_heal; afr_sh_reset (frame, this); if (IA_ISDIR (sh->type)) { gf_log (this->name, GF_LOG_DEBUG,...
false
false
false
false
false
0
Game_keyListener( const Event *event, void *data ) { if( event->type == EKeyPressed && event->key == K_F1 ) { game->mode = game->mode == EEditor ? EGame : EEditor; } // if in game mode if( game->mode == EGame ) { // TODO : send event to GUI, and if not intercepted, // send event...
false
false
false
false
false
0
GetColorInterpretation() { EpsilonDataset* poGDS = (EpsilonDataset*) poDS; if (poGDS->nBands == 1) { return GCI_GrayIndex; } else { if (nBand == 1) return GCI_RedBand; else if (nBand == 2) return GCI_GreenBand; else return GCI_B...
false
false
false
false
false
0
snd_make_quantize(sound_type s1, long steps) { register quantize_susp_type susp; rate_type sr = s1->sr; time_type t0 = s1->t0; int interp_desc = 0; sample_type scale_factor = 1.0F; time_type t0_min = t0; falloc_generic(susp, quantize_susp_node, "snd_make_quantize"); susp->factor = s1->sc...
false
false
false
false
false
0
gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr) { struct gfs2_sbd *sdp = seq->private; loff_t pos = *(loff_t *)iter_ptr; unsigned index = pos >> 3; unsigned subindex = pos & 0x07; int i; if (index == 0 && subindex != 0) return 0; seq_printf(seq, "%-10s %8s:", gfs2_gltype[index], (index == 0)...
false
false
false
false
false
0
coding_closer(ScmPort *p) { coding_port_data *data = (coding_port_data*)p->src.buf.data; if (data->source) { Scm_ClosePort(data->source); data->source = NULL; } }
false
false
false
false
false
0
on_entry_downloads_filter_regex_activate(GtkEditable *editable, void *unused_udata) { char *regex; (void) unused_udata; regex = STRTRACK(gtk_editable_get_chars(GTK_EDITABLE(editable), 0, -1)); g_return_if_fail(regex); fi_gui_filter_by_regex(regex); G_FREE_NULL(regex); }
false
false
false
false
false
0
print() { unsigned row,col; printf(" %i\n",nentries); for (row = 0; row<nentries;row++){ printf("%-10s ",hash_elements[row]->name); for (col=0; col<row; col++) { printf("%6f ",matrix->get(row,col)); } printf("\n"); } printf("\n"); }
false
false
false
false
false
0
refresh(int newRecNo, int newTotalRec) { disp_one(rec_no,CLEAR_HIGH); if( newRecNo>=0 || newTotalRec>=0 ) // if current recno and total recno has no change, don't do the recalculation { if( newRecNo >= 1 ) rec_no = newRecNo; if( newTotalRec != -1 && rec_no > newTotalRec ) rec_n...
false
false
false
false
false
0
nssSlot_Refresh ( NSSSlot *slot ) { PK11SlotInfo *nss3slot = slot->pk11slot; PRBool doit = PR_FALSE; if (slot->token && slot->token->base.name[0] == 0) { doit = PR_TRUE; } if (PK11_InitToken(nss3slot, PR_FALSE) != SECSuccess) { return PR_FAILURE; } if (doit) { nssTrustDomain_UpdateCache...
false
false
false
false
false
0
jobacct_storage_p_job_complete(void *db_conn, struct job_record *job_ptr) { char buf[BUFFER_SIZE]; uint16_t job_state; int duration; if(!storage_init) { debug("jobacct init was not called or it failed"); return SLURM_ERROR; } debug2("slurmdb_job_complete() called"); if (IS_JOB_RESIZING(job_ptr)) { ...
false
false
false
false
false
0
get_template_flags(mychan_t *mc, const char *name) { metadata_t *md; const char *d; if (mc != NULL) { md = metadata_find(mc, "private:templates"); if (md != NULL) { d = getitem(md->value, name); if (d != NULL) return flags_to_bitmask(d, 0); } } return get_global_template_flags(name); }
false
false
false
false
false
0
gtkb_pixmap_free(GtkbPixmap pixmap) { if(pixmap.pixbuf) { g_object_unref(pixmap.pixbuf); } }
false
false
false
false
false
0
test_refs_branches_ishead__can_properly_handle_missing_HEAD(void) { git_repository_free(repo); repo = cl_git_sandbox_init("testrepo.git"); delete_head(repo); cl_git_pass(git_reference_lookup(&branch, repo, "refs/heads/master")); cl_assert_equal_i(false, git_branch_is_head(branch)); cl_git_sandbox_cleanup(); ...
false
false
false
false
false
0
InitializeEnvironmentHashTable() { int i; if (EnvironmentHashTable != NULL) { return; } EnvironmentHashTable = (struct environmentData **) malloc(sizeof (struct environmentData *) * SIZE_ENVIRONMENT_HASH); if (EnvironmentHashTable == NULL) { printf("\n[ENVR...
false
false
false
false
false
0
vnc_audio_sample_copy(VncAudioSample *srcSample) { VncAudioSample *sample; sample = g_slice_dup(VncAudioSample, srcSample); sample->data = g_new0(guint8, srcSample->capacity); memcpy(sample->data, srcSample->data, srcSample->length); return sample; }
false
false
false
false
false
0
remove_decoders (GstPlayBaseBin * bin) { GSList *walk; for (walk = bin->decoders; walk; walk = g_slist_next (walk)) { GstElement *decoder = GST_ELEMENT_CAST (walk->data); GST_DEBUG_OBJECT (bin, "removing old decoder element"); /* Disconnect all the signal handlers we attached to the decodebin before ...
false
false
false
false
false
0
l440gx_set_vpp(struct map_info *map, int vpp) { unsigned long flags; spin_lock_irqsave(&l440gx_vpp_lock, flags); if (vpp) { if (++l440gx_vpp_refcnt == 1) /* first nested 'on' */ outl(inl(VPP_PORT) | 1, VPP_PORT); } else { if (--l440gx_vpp_refcnt == 0) /* last nested 'off' */ outl(inl(VPP_PORT) & ~1, ...
false
false
false
false
false
0
GetFilesystemType(const CPath& path) { typedef std::map<wxString, EFSType> FSMap; // Caching previous results, to speed up further checks. static FSMap s_fscache; // Lock used to ensure the integrity of the cache. static wxMutex s_lock; wxCHECK_MSG(path.IsOk(), fsOther, wxT("Invalid path in GetFilesystemType()")...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx3D__Object_RotateEuler(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gfx3D__Euler * rotation, struct __ecereNameSpace__ecere__gfx3D__Euler * min, struct __ecereNameSpace__ecere__gfx3D__Euler * max) { struct __ecereNameSpace__ecere__gfx3D_...
false
false
false
true
false
1
thresholdImage(VimosImage *ifuImage, float threshold, VimosImage *ifuMask, int *ngood) { #define ZERO 0.0 #define ONE 1.0 int i; int imaSize; imaSize = ifuImage->xlen * ifuImage->ylen; *ngood = imaSize; /* loop on all input image pixels */ for (i=0; i<imaSize; i++) { i...
false
false
false
false
false
0
avahi_simple_poll_iterate(AvahiSimplePoll *s, int timeout) { int r; if ((r = avahi_simple_poll_prepare(s, timeout)) != 0) return r; if ((r = avahi_simple_poll_run(s)) != 0) return r; if ((r = avahi_simple_poll_dispatch(s)) != 0) return r; return 0; }
false
false
false
false
false
0
mthca_alloc_icm_pages(struct scatterlist *mem, int order, gfp_t gfp_mask) { struct page *page; /* * Use __GFP_ZERO because buggy firmware assumes ICM pages are * cleared, and subtle failures are seen if they aren't. */ page = alloc_pages(gfp_mask | __GFP_ZERO, order); if (!page) return -ENOMEM; sg_set_pa...
false
false
false
false
false
0
wait_obj_set(struct wait_obj* obj) { #ifdef _WIN32 SetEvent(obj->event); #else int len; if (wait_obj_is_set(obj)) return; len = write(obj->pipe_fd[1], "sig", 4); if (len != 4) printf("wait_obj_set: error\n"); #endif }
false
false
false
false
false
0
updateCalendarData(const QModelIndex &top, const QModelIndex &bottom) { Q_UNUSED(bottom); if (top.column()==UserCalendarModel::DefaultDuration) { // get default duration of given calendar int defaultDuration = d->m_UserCalendarModel->index(top.row(), ...
false
false
false
false
false
0
wasp_scan_argv( wasp_list arglist ){ wasp_list list = arglist; int ct = 0; while( list ){ ct ++; if( ! wasp_is_string( wasp_car( list ) ) ){ wasp_errf( wasp_es_vm, "sx", "expected list of strings", arglist ); }; if( ! wasp_is_pair( wasp_cdr( list ) ) )break; ...
false
false
false
false
false
0
gst_rdt_packet_data_get_stream_id (GstRDTPacket * packet) { guint16 result; guint header; gboolean length_included_flag; guint8 *bufdata; g_return_val_if_fail (packet != NULL, 0); g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), 0); bufdata = GST_BUFFER_DATA (packet->buffer); header = packe...
false
false
false
false
false
0