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
check_dir(char *dir_name) { #ifdef WIN32 BOOL res; res = CreateDirectory(dir_name,NULL); if(res == 0) { return 0; } else { return 1; } #else DIR *d; if (!(d=opendir(dir_name)) && (errno==ENOENT)) { mkdir(dir_name,0755); return 0; } return 1; #endif }
false
false
false
false
false
0
jme_mac_txclk_on(struct jme_adapter *jme) { u32 speed = jme->reg_ghc & GHC_SPEED; if (speed == GHC_SPEED_1000M) jme->reg_ghc |= GHC_TO_CLK_GPHY | GHC_TXMAC_CLK_GPHY; else jme->reg_ghc |= GHC_TO_CLK_PCIE | GHC_TXMAC_CLK_PCIE; jwrite32f(jme, JME_GHC, jme->reg_ghc); }
false
false
false
false
false
0
ConvertModCommand(MODCOMMAND *m) const //----------------------------------------------------- { UINT command = m->command, param = m->param; switch(command) { case 0x00: if (param) command = CMD_ARPEGGIO; break; case 0x01: command = CMD_PORTAMENTOUP; break; case 0x02: command = CMD_PORTAMENTODOWN; break; case ...
false
false
false
false
false
0
mcp89_devinit_disable(struct nvkm_devinit *init) { struct nvkm_device *device = init->subdev.device; u32 r001540 = nvkm_rd32(device, 0x001540); u32 r00154c = nvkm_rd32(device, 0x00154c); u64 disable = 0; if (!(r001540 & 0x40000000)) { disable |= (1ULL << NVKM_ENGINE_MSPDEC); disable |= (1ULL << NVKM_ENGINE_MS...
false
false
false
false
false
0
module_check_cast_module(void *object, int type_pos, const char *module, const char *id) { const char *str; if (object == NULL) return NULL; str = module_find_id_str(module, G_STRUCT_MEMBER(int, object, type_pos)); return str == NULL || strcmp(str, id) != 0 ? NULL : object; }
false
false
false
false
false
0
print_push_status(const char *dest, struct ref *refs) { struct ref *ref; int n = 0; if (args.verbose) { for (ref = refs; ref; ref = ref->next) if (ref->status == REF_STATUS_UPTODATE) n += print_one_push_status(ref, dest, n); } for (ref = refs; ref; ref = ref->next) if (ref->status == REF_STATUS_OK) ...
false
false
false
false
false
0
get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object); switch (prop_id) { case PROP_VPN_STATE: g_value_set_uint (value, priv->vpn_state); break; case PROP_BANNER: g_value_set_string (value, priv->banner ? ...
false
false
false
false
false
0
islit(void) { if (room[loc].light==0) return 1; if (lightcheck(loc+first_room,room[loc].light,1)) return 1; if (lightcheck(1,room[loc].light,1)) return 1; /* Player carried light */ if (lightcheck(1000,room[loc].light,1)) return 1; /* Worn light */ return 0; }
false
false
false
false
false
0
destroy_modules(void) { struct sr_module* t, *foo; t=modules; while(t) { foo=t->next; if ((t->exports)&&(t->exports->destroy_f)) t->exports->destroy_f(); pkg_free(t); t=foo; } modules=0; }
false
false
false
false
false
0
addAuthorityIDBlock( CPLXMLNode *psTarget, const char *pszElement, const char *pszAuthority, const char *pszObjectType, int nCode, c...
false
false
false
false
false
0
on_notebook_main_switch_page(GtkNotebook *unused_notebook, GtkNotebookPage *unused_page, int page_num, void *unused_udata) { int old_page; (void) unused_notebook; (void) unused_page; (void) unused_udata; g_return_if_fail(UNSIGNED(page_num) < nb_main_page_num); old_page = notebook_main_current_page; notebook_...
false
false
false
false
false
0
update(int wx, int wy) { double x, y; G_debug(5, "Update function wx = %d wy = %d", wx, wy); if (wx != COOR_NULL && wy != COOR_NULL) { x = D_d_to_u_col(wx); y = D_d_to_u_row(wy); i_coor(x, y); } }
false
false
false
false
false
0
speed_chain_float32 (GstSpeed * filter, GstBuffer * in_buf, GstBuffer * out_buf, guint c, guint in_samples) { gfloat *in_data, *out_data; gfloat interp, lower, i_float; guint i, j; GstMapInfo in_info, out_info; gst_buffer_map (in_buf, &in_info, GST_MAP_WRITE); gst_buffer_map (out_buf, &out_info, GST_MA...
false
false
false
false
false
0
fcsin_cost(symbol_type type) { int cost; #ifdef OUTPUT_TBL_OP_NAME printf("mathfunc name: %s\n",math_func_tbl[C_SIN].math_func_name); #endif cost = put_complex_or_dcomplex_cost( type, math_func_tbl[C_SIN].cost[0], math_func_tbl[C_SIN].cost[1]); if ( cost <= -1 ) { symbol_type ...
false
false
false
false
false
0
e1000_init_rx_addrs(struct e1000_hw *hw) { uint32_t i; uint32_t rar_num; DEBUGFUNC("e1000_init_rx_addrs"); /* Setup the receive address. */ DEBUGOUT("Programming MAC Address into RAR[0]\n"); e1000_rar_set(hw, hw->mac_addr, 0); rar_num = E1000_RAR_ENTRIES; /* Reserve a spot for the L...
false
false
false
false
false
0
addRows(int number, const double * rowLower, const double * rowUpper, const CoinBigIndex * rowStarts, const int * rowLengths, const int * columns, const double * elements) { if (number) { CoinBigIndex numberElements = 0; in...
false
false
false
false
false
0
gw_str_to_file_strb ( const gchar *pattern, GWStringBuffer *buf) { gchar *q = NULL; gchar *result = NULL; gint nb = 0; gchar *chr1 = NULL, *chr2 = NULL; #ifdef GW_DEBUG_TOOLS_COMPONENT g_print ( "*** GW - %s (%d) :: %s() : string to encode=%s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, pattern); #endif if ( (p...
false
false
false
false
false
0
paint(PaintInfo& i, int _tx, int _ty) { _tx += m_x; _ty += m_y; if (hasOverflowClip() && m_layer) m_layer->subtractScrollOffset(_tx, _ty); // default implementation. Just pass things through to the children for(RenderObject* child = firstChild(); child; child = child->nextSibling()) ...
false
false
false
false
false
0
gst_aasink_propose_allocation (GstBaseSink * bsink, GstQuery * query) { GstCaps *caps; GstVideoInfo info; guint size; gst_query_parse_allocation (query, &caps, NULL); if (caps == NULL) goto no_caps; if (!gst_video_info_from_caps (&info, caps)) goto invalid_caps; size = GST_VIDEO_INFO_SIZE (&in...
false
false
false
false
false
0
keyspan_break_ctl(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct keyspan_port_private *p_priv; p_priv = usb_get_serial_port_data(port); if (break_state == -1) p_priv->break_on = 1; else p_priv->break_on = 0; keyspan_send_setup(port, 0); }
false
false
false
false
false
0
p_tabw_add_elem (GapStbTabWidgets *tabw, GapStbMainGlobalParams *sgpp, GapStoryBoard *stb_dst) { GapStoryElem *stb_elem; if(gap_debug) printf("p_tabw_add_elem\n"); if(sgpp == NULL) { return; } if(tabw == NULL) { return; } if(stb_dst == NULL) { return; } stb_elem = gap_story_new_elem(GAP_STBREC_VID_I...
false
false
false
false
false
0
varpanel_toggle_set_active (gint jbutton, gint jvar, gboolean active, GGobiData * d) { gboolean active_prev; GtkWidget *w; if (jvar >= 0 && jvar < d->ncols) { w = varpanel_widget_get_nth (jbutton, jvar, d); if (w && GTK_WIDGET_REALIZED (w)) { active_prev = GTK_TOGGLE_...
false
false
false
false
false
0
bgav_pat_section_dump(pat_section_t * pats) { int i; bgav_dprintf( "PAT section:\n"); bgav_dprintf( " table_id: %d\n", pats->table_id); bgav_dprintf( " section_length: %d\n", pats->section_length); bgav_dprintf( " transport_stream_id: %d\n", pats->transport_stream_id); bgav_dpr...
false
false
false
false
false
0
do_spawn(struct spawn *sp, const char *command) { int status = -1; pid_t pid; if (!do_signals(sp->signals, sp->num_signals, SST_PRE)) return status; pid = fork(); if (pid < 0) { G_warning(_("Unable to create a new process")); undo_signals(sp->signals, sp->num_signals, SST_PRE); return status;...
false
false
false
false
true
1
irq_setup_forced_threading(struct irqaction *new) { if (!force_irqthreads) return 0; if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)) return 0; new->flags |= IRQF_ONESHOT; /* * Handle the case where we have a real primary handler and a * thread handler. We force thread them as well by creat...
false
false
false
false
false
0
per_file(const nstring_list &filenames) { for (size_t j = 0; j < filenames.size(); ++j) per_file(filenames[j]); }
false
false
false
false
false
0
EvalNOinputs() { nptr n; iptr list, last; for( list = last = xinputs; list != NULL; list = list->next ) { cur_node = n = list->inode; AddHist( n, (int) n->curr->val, 0, cur_delta, 0L, 0L ); if( n->nflags & VISITED ) (*model)( n ); last = list; } if( last ) { last->next =...
false
false
false
false
false
0
dessert_syssend_msg(dessert_msg_t *msg) { struct ether_header *eth; size_t eth_len; eth_len = dessert_msg_ethdecap(msg, &eth); if (eth_len == -1) { return (-EIO); } dessert_syssend(eth, eth_len); free(eth); return DESSERT_OK; }
false
false
false
false
false
0
__qamc_init(dbc) DBC *dbc; { DB *dbp; QUEUE_CURSOR *cp; int ret; dbp = dbc->dbp; /* Allocate the internal structure. */ cp = (QUEUE_CURSOR *)dbc->internal; if (cp == NULL) { if ((ret = __os_calloc(dbp->env, 1, sizeof(QUEUE_CURSOR), &cp)) != 0) return (ret); dbc->internal = (DBC_INTERNAL *)cp; } ...
false
false
false
false
false
0
ImportArrayTIFF_ASCII ( const TIFF_Manager::TagInfo & tagInfo, SXMPMeta * xmp, const char * xmpNS, const char * xmpProp ) { try { // Don't let errors with one stop the others. TrimTrailingSpaces ( (TIFF_Manager::TagInfo*) &tagInfo ); if ( tagInfo.dataLen == 0 ) return; // Ignore empty tags. const char *...
false
false
false
false
false
0
ario_shell_sync_server (ArioShell *shell) { ARIO_LOG_FUNCTION_START; GtkAction *connect_action; GtkAction *disconnect_action; gboolean is_playing; GtkAction *action; /* Set connect entry visibility * I don't know why but I need to first force visibility to TRUE...
false
false
false
false
false
0
tls_print_session_info(const host_addr_t addr, uint16 port, gnutls_session session, bool incoming) { const char *proto, *cert, *kx, *ciph, *mac, *comp; g_return_if_fail(session); proto = gnutls_protocol_get_name(gnutls_protocol_get_version(session)); cert = gnutls_certificate_type_get_name( gnutls_certificat...
false
false
false
false
false
0
set_cell_contents (GtkCMCList *clist, GtkCMCListRow *clist_row, gint column, GtkCMCellType type, const gchar *text, guint8 spacing, GdkPixbuf *pixbuf) { GtkRequisition requisition; gchar *old_text = NULL; GdkPixbuf *old_pixbuf = NULL; cm_return_if_fail (GTK_I...
false
false
false
false
false
0
value_match_save_key (gpointer key, gpointer val, gpointer udata) { gboolean found = FALSE; coll_table_pair_t *pair = (coll_table_pair_t*)udata; xmmsv_coll_t *coll = (xmmsv_coll_t*)val; /* value matching and key not ignored, found! */ if ((coll == pair->value) && (pair->key == NULL || strcmp (pair->key, key)...
false
false
false
false
false
0
processParamFile(void) { for (int i = 0; i < myParams->getNumSonar(); ++i) { //printf("sonar %d %d %d %d\n", i, myParams->getSonarX(i), //myParams->getSonarY(i), myParams->getSonarTh(i)); if (mySonars.find(i) == mySonars.end()) { mySonars[i] = new ArSensorReading(myParams->getSonarX(i), m...
false
false
false
false
false
0
myrealpath(const char* file, char* dest, int count) { /* assume dest has PATH_MAX space */ char buf[PATH_MAX+1]; char* c; int i; if (count<0) { errno=EMLINK; return 0; } if (chdir(file)==0) /* hurray! The easy case: it's a directory! */ return getcwd(dest,PATH_MAX); c=strrchr(file,'/'); if (c) ...
true
true
false
false
true
1
load_di( const std::string &path, NodeRef dst ) { // construct list of paths to search std::string found_path = path; if (!file_exists(found_path)) { // in this case, try additional // paths with the NITRO_DI_PATH var bool found=false; char *env = getenv ( "NITRO_DI_PAT...
false
false
false
false
false
0
pcm_set_channels(int arg) { if ((arg != 1) && (arg != 2)) return pcm_channels; if (arg != pcm_channels) { pas_write(pas_read(0xF8A) ^ 0x20, 0xF8A); pcm_channels = arg; pcm_set_speed(pcm_speed); /* The speed must be reinitialized */ } return pcm_channels; }
false
false
false
false
false
0
plugin_init (GstPlugin * plugin) { if (!gst_element_register (plugin, "osssrc", GST_RANK_SECONDARY, GST_TYPE_OSS_SRC) || !gst_element_register (plugin, "osssink", GST_RANK_SECONDARY, GST_TYPE_OSSSINK)) { return FALSE; } GST_DEBUG_CATEGORY_INIT (oss_debug, "oss", 0, "OSS elements"); ...
false
false
false
false
false
0
make_116 (ats_ptr_type arg0) { /* local vardec */ ATSlocal (ats_ptr_type, tmp510) ; __ats_lab_make_116: ats_instr_move_lazy_delay_mac (tmp510, ats_ptr_type, __ats_fun_118_closure_make (arg0)) ; return (tmp510) ; }
false
false
false
false
false
0
mark_phi_for_rewrite (basic_block bb, gimple phi) { gimple_vec phis; unsigned n, idx = bb->index; if (rewrite_uses_p (phi)) return; set_rewrite_uses (phi, true); if (!blocks_with_phis_to_rewrite) return; bitmap_set_bit (blocks_with_phis_to_rewrite, idx); n = (unsigned) last_basic_block + 1; ...
false
false
false
false
false
0
stats_prefix_find(const char *key) { PREFIX_STATS *pfs; uint32_t hashval; size_t length; assert(key != NULL); for (length = 0; key[length] != '\0'; length++) if (key[length] == settings.prefix_delimiter) break; hashval = hash(key, length, 0) % PREFIX_HASH_SIZE; for (p...
false
false
false
false
false
0
iwl_check_for_ct_kill(struct iwl_priv *priv) { bool is_ct_kill = false; if (iwl_within_ct_kill_margin(priv)) { iwl_tt_enter_ct_kill(priv); is_ct_kill = true; } return is_ct_kill; }
false
false
false
false
false
0
srvDefDatatype(int datatype) { int prec; if ( datatype == DATATYPE_CPX32 || datatype == DATATYPE_CPX64 ) Error("CDI/SERVICE library does not support complex numbers!"); if ( datatype != DATATYPE_FLT32 && datatype != DATATYPE_FLT64 ) datatype = DATATYPE_FLT32; if ( datatype == DATATYPE_FLT64 ) prec = ...
false
false
false
false
false
0
sanei_usb_exit (void) { int i; /* check we have really some work to do */ if(initialized==0) { DBG (1, "%s: sanei_usb in not initialized!\n", __func__); return; } /* decrement the use count */ initialized--; /* if we reach 0, free allocated resources */ if(initialized==0) { ...
false
false
false
false
false
0
test_camRecursiveKeypoints2(char *filename){ CamImage image, I1, I2; CamKeypoints points1, points2; int i; image.imageData = NULL; // camLoadPGM(&image,filename); camLoadBMP(&image, "resources/img8.bmp"); camLoadBMP(&image, filename); I1.imageData = NULL; I2.imageData = NULL; camRGB2Y(&image, &I1)...
false
false
false
false
false
0
make_memloc (rtx ad, int regno) { /* We must rerun eliminate_regs, in case the elimination offsets have changed. */ rtx tem = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], VOIDmode, NULL_RTX), 0); /* If TEM might contain a pseudo, we must copy it to avoid modifying it when we do the subs...
false
false
false
false
false
0
us_test_osc_dispatch_test1_setup( us_allocator_t *allocator, us_osc_dispatch_t *osc_dispatch ) { bool r = false; if ( us_osc_dispatch_init( osc_dispatch, allocator, 1024, 8192 ) ) { char s[64]; int mt, ch; us_osc_dispatch_index_t index; us_osc_dispatch_index_init( &index ); ...
false
false
false
false
false
0
posix_lutimes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *opath; const char *path; int res; DECLARE_UA(ua, "lutimes"); ua.path_format = 'O'; ua.path = &opath; ua.converter = PyUnicode_FSConverter; if (utime_read_time_arguments(&ua) != utime_success) return NU...
false
false
false
false
false
0
clk_register_gpio_gate(struct device *dev, const char *name, const char *parent_name, unsigned gpio, bool active_low, unsigned long flags) { return clk_register_gpio(dev, name, (parent_name ? &parent_name : NULL), (parent_name ? 1 : 0), gpio, active_low, flags, &clk_gpio_gate_ops); }
false
false
false
false
false
0
ceph_fs_debugfs_init(struct ceph_fs_client *fsc) { char name[100]; int err = -ENOMEM; dout("ceph_fs_debugfs_init\n"); BUG_ON(!fsc->client->debugfs_dir); fsc->debugfs_congestion_kb = debugfs_create_file("writeback_congestion_kb", 0600, fsc->client->debugfs_dir, fsc, &congestion_kb...
true
true
false
false
false
1
slapi_utf8casecmp(unsigned char *s0, unsigned char *s1) { unsigned char *d0, *d1; /* store lower-case strings */ unsigned char *p0, *p1; /* current UTF-8 char */ unsigned char *n0, *n1; /* next UTF-8 char */ unsigned char *t0, *t1; /* tail of the strings */ unsigned char *x0, *x1; /* current byte in...
false
false
false
false
false
0
pd_check_events(struct gendisk *p, unsigned int clearing) { struct pd_unit *disk = p->private_data; int r; if (!disk->removable) return 0; pd_special_command(disk, pd_media_check); r = disk->changed; disk->changed = 0; return r ? DISK_EVENT_MEDIA_CHANGE : 0; }
false
false
false
false
false
0
HandleZoneUpdateOpcode(WorldPacket& recv_data) { uint32 newZone; recv_data >> newZone; DETAIL_LOG("WORLD: Received opcode CMSG_ZONEUPDATE: newzone is %u", newZone); // use server side data uint32 newzone, newarea; GetPlayer()->GetZoneAndAreaId(newzone, newarea); GetPlayer()->UpdateZone(new...
false
false
false
false
false
0
set_userip(char *ruser,int ruserlen) { char line[1024]; char name[64]; FILE *fd; int base; int ofs; char *lname; char *lip; ipcp_options *wo = &ipcp_wantoptions[0]; if (ruserlen) { memcpy(name,ruser, ruserlen); name[ruserlen]='\0'; } else strncpy(name, ruser, sizeof(name)-1); fd = fopen(_PATH_USERIPT...
false
false
false
false
false
0
ladish_app_supervisor_get_running_app_count(ladish_app_supervisor_handle supervisor_handle) { struct list_head * node_ptr; struct ladish_app * app_ptr; unsigned int counter; counter = 0; list_for_each(node_ptr, &supervisor_ptr->applist) { app_ptr = list_entry(node_ptr, struct ladish_app, siblings); ...
false
false
false
false
false
0
Ch(const wchar_t ch) { wchar_t* format = new wchar_t[10]; if (ch < L' ' || ch >= 127 || ch == L'\'' || ch == L'\\') { coco_swprintf(format, 10, L"%d", ch); return format; } else { coco_swprintf(format, 10, L"'%lc'", ch); return format; } }
false
false
false
false
false
0
release_inode_blocks(e2fsck_t ctx, ext2_ino_t ino, struct ext2_inode *inode, char *block_buf, struct problem_context *pctx) { struct process_block_struct pb; ext2_filsys fs = ctx->fs; errcode_t retval; __u32 count; if (!ext2fs_inode_has_valid_blocks(inode)) return 0; pb.buf = block_buf + 3 * c...
false
false
false
false
false
0
xfer_setquotaroot(struct xfer_header *xfer, const char *mboxname) { struct quota quota; int r; char extname[MAX_MAILBOX_NAME]; (*imapd_namespace.mboxname_toexternal)(&imapd_namespace, mboxname, imapd_userid, extname); quota.root = mboxname; r = quota_read(&quota, NULL, 0); if (...
true
true
false
false
false
1
regmap_async_complete_cb(struct regmap_async *async, int ret) { struct regmap *map = async->map; bool wake; trace_regmap_async_io_complete(map); spin_lock(&map->async_lock); list_move(&async->list, &map->async_free); wake = list_empty(&map->async_list); if (ret != 0) map->async_ret = ret; spin_unlock(&map...
false
false
false
false
false
0
tohex (const unsigned char * src, size_t len, char *dst) { size_t i; for (i=0; i<len; i++) { dst[(i*2)] = hex[(src[i] >> 4)]; dst[(i*2) + 1] = hex[(src[i]&0x0F)]; } dst[(i*2)] = 0; }
false
false
false
false
false
0
rtl8821ae_enable_interrupt(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); if (rtlpci->int_clear) rtl8821ae_clear_interrupt(hw);/*clear it here first*/ rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF); rtl_write_dword...
false
false
false
false
false
0
native_vmarray_createobjectarray(jobject type, int dim) { struct vm_object *array; struct vm_class *vmc; if (!type) return throw_npe(); vmc = vm_class_get_class_from_class_object(type); if (!vmc) return throw_chained_internal_error(); array = vm_object_alloc_array_of(vmc, dim); if (!array) return rethro...
false
false
false
false
false
0
gt_md5_tab_get(const GtMD5Tab *md5_tab, unsigned long idx) { gt_assert(md5_tab && idx < md5_tab->num_of_md5s); if (md5_tab->owns_md5s) return md5_tab->md5_fingerprints[idx]; return md5_tab->fingerprints + idx * 33; }
false
false
false
false
false
0
sparseL2regularize(float lambda) { /*for (size_t i = 0; i < m_coreFeatures.size(); ++i) { m_coreFeatures[i] *= (1 - lambda); }*/ for (iterator i = begin(); i != end(); ++i) { i->second *= (1 - lambda); } }
false
false
false
false
false
0
_next_tok(char *sep, char **str) { char *tok; /* push str past any leading separators */ while ((**str != '\0') && (strchr(sep, **str) != NULL)) (*str)++; if (**str == '\0') return NULL; /* assign token ptr */ tok = *str; /* push str past token and leave pointing to first separator */ while ((**str != '...
false
false
false
false
false
0
cp_parser_template_argument_list (cp_parser* parser) { tree fixed_args[10]; unsigned n_args = 0; unsigned alloced = 10; tree *arg_ary = fixed_args; tree vec; bool saved_in_template_argument_list_p; saved_in_template_argument_list_p = parser->in_template_argument_list_p; parser->in_template_argument_lis...
false
true
false
false
false
1
llistInsertTail (LList *list, const char *key, void *data) { LNode *node; if (list == NULL || list->head == NULL || data == NULL) { slapi_log_error(SLAPI_LOG_PLUGIN, repl_plugin_name, "llistInsertHead: invalid argument\n"); return -1; } node = _llistNewNode (key, data); if (node == NULL) { slapi_log_erro...
false
false
false
false
false
0
celt_set(struct ast_format_attr *fattr, va_list ap) { enum celt_attr_keys key; struct celt_attr *attr = (struct celt_attr *) fattr; for (key = va_arg(ap, int); key != AST_FORMAT_ATTR_END; key = va_arg(ap, int)) { switch (key) { case CELT_ATTR_KEY_SAMP_RATE: attr->samplerate = (va_arg(ap, int)); break...
false
false
false
false
false
0
firestring_conf_find_next(const struct firestring_conf_t * restrict config, const char * restrict const var, const char * const prev) { int canreturn = 0; if (prev == NULL) canreturn = 1; while (config != NULL) { if (firestring_strcasecmp(config->var, var) == 0) { if (canreturn == 1) return config->valu...
false
false
false
false
false
0
encode_KeyTransRecipientInfo(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, const KeyTransRecipientInfo *data, size_t *size) { size_t ret HEIMDAL_UNUSED_ATTRIBUTE = 0; size_t l HEIMDAL_UNUSED_ATTRIBUTE; int i HEIMDAL_UNUSED_ATTRIBUTE, e HEIMDAL_UNUSED_ATTRIBUTE; /* encryptedKey */ { si...
false
false
false
false
false
0
slotSelected(Square square, int button) { Piece piece = (button & Qt::MidButton) ? Empty : m_selectedPiece; if(button & Qt::RightButton) { if(piece >= BlackKing) { piece = (Piece)(piece - (BlackKing - WhiteKing)); } else if(piece != Empty) { pi...
false
false
false
false
false
0
create_aligner(ElementT *e, RouterT *, ErrorHandler *errh) { Alignment a = parse_alignment(e, e->configuration(), false, errh); if (!a.bad()) return new GeneratorAligner(a); else return default_aligner(); }
false
false
false
false
false
0
disassociateStylesheet() { UT_DEBUGMSG(("stylesheet at site. xmlid:%s\n", m_xmlid.c_str() )); setProperty("stylesheet", ""); setProperty("stylesheet-type", ""); setProperty("stylesheet-uuid", ""); }
false
false
false
false
false
0
SP_func_wall (edict_t * self) { self->movetype = MOVETYPE_PUSH; gi.setmodel (self, self->model); if (self->spawnflags & 8) self->s.effects |= EF_ANIM_ALL; if (self->spawnflags & 16) self->s.effects |= EF_ANIM_ALLFAST; // just a wall if ((self->spawnflags & 7) == 0) { self->solid = SOLID_...
false
false
false
false
false
0
qr_need_validation (qr_conf_t *conf, qr_inode_t *qr_inode) { struct timeval now = {0, }; char need_validation = 0; GF_VALIDATE_OR_GOTO ("quick-read", conf, out); GF_VALIDATE_OR_GOTO ("quick-read", qr_inode, out); gettimeofday (&now, NULL); if (qr_...
false
false
false
false
false
0
nextLeft() { int n = _lower.size(); int i = 0; for (; i < n; ++i) { int &ind = operator[](i); if (ind < _upper[i]) { ++ind; break; } else { ind = _lower[i]; } } if (i == n) { _atend++; } return *this; }
false
false
false
false
false
0
ellipticE(m) REAL m; { REAL a,b,anext; REAL K,sum = 0; REAL ff = 1.0; if ( m > 1.0 ) kb_error(2423,"ellipticE domain violation, parameter > 1.\n",RECOVERABLE); if ( m == 1.0 ) return 1.0; a = 1.0; b = sqrt(sqrt(1 - m)); while ( fabs(a-b) > machine_eps ) { REAL aa = a*a, bb = b*b; sum += ff*...
false
false
false
false
false
0
setEnableMask(unsigned int newEnableMask) { Dprintf (( "PortRegister::setEnableMask for %s to %02X\n", name_str.c_str(), newEnableMask )); mOutputMask = newEnableMask; //unsigned int maskDiff = getEnableMask() ^ newEnableMask; unsigned int oldEnableMask = getEnableMask(); for (unsigned int i=0,...
false
false
false
false
false
0
snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { static int dev; struct rme32 *rme32; struct snd_card *card; int err; if (dev >= SNDRV_CARDS) { return -ENODEV; } if (!enable[dev]) { dev++; return -ENOENT; } err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, ...
false
true
false
false
false
1
on_menu_verb_activate (GtkWidget *widget, gpointer data) { if (window_verb) { gtk_window_present ((GtkWindow *) window_verb); return; } GIOChannel *read; gchar *file; const gchar verbs[] = "irregular-verbs"; #ifdef PACKAGE_DATA_DIR file = g_build_filename (PACKAG...
false
false
false
false
false
0
get_index_name(blind_t* bp, int i) { index_t* index; if (i < sl_size(bp->indexnames)) { char* fn = sl_get(bp->indexnames, i); return fn; } i -= sl_size(bp->indexnames); index = pl_get(bp->indexes, i); return index->indexname; }
false
false
false
false
false
0
clutter_actor_destroy (ClutterActor *self) { g_return_if_fail (CLUTTER_IS_ACTOR (self)); g_object_ref (self); /* avoid recursion while destroying */ if (!CLUTTER_ACTOR_IN_DESTRUCTION (self)) { CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_IN_DESTRUCTION); g_object_run_dispose (G_OBJECT (self)); ...
false
false
false
false
false
0
PrintError(char *msg, ...) { char buf[512]; PyObject *f = PySys_GetObject("stderr"); va_list marker; va_start(marker, msg); vsnprintf(buf, sizeof(buf), msg, marker); va_end(marker); if (f != NULL && f != Py_None) PyFile_WriteString(buf, f); PyErr_Print(); }
false
false
false
false
false
0
ddsche_write_entity_of_mf_taskq_ptr_inc_modules(csbe_context *cx, List *list) { List *li; for (li = list; li != NULL; li = li->next) { Hmdf_table *hmdf = li->data; int cl_no, pc_no, pe_no; for (cl_no = 0; cl_no < hmdf->clustering_num; cl_no++) { for (pc_no = 0; pc_no < hmdf...
false
false
false
false
false
0
cam_keypoints_tracking_extract_overall_max_on_each_scale(CamTrackingContext *tc, CamImage *integralImage, int (*detectorValue)(CamImage *, CamKeypointShort*), int index, int shiftX, int shiftY, int shiftScale) { int featureX; int featureY; int featureScale; CamKeypointShort *maxOnEachScale; CamPointsLis...
false
false
false
false
false
0
append(char* buf, const char* str) { char* cleansed1, *cleansed2; strcat(buf, ","); if (!str) { return; } cleansed1 = xstrdup(str); #if FIRMWARE_DOES_88591 /* Actually, this function needs needs refactored... */ cleansed2 = xstrdup(cleansed1); #else cleansed2 = m330_cleanse(cleansed1); #endif ...
false
true
false
false
false
1
xmlSecBufferBase64NodeContentWrite(xmlSecBufferPtr buf, xmlNodePtr node, int columns) { xmlChar* content; xmlSecAssert2(buf != NULL, -1); xmlSecAssert2(node != NULL, -1); content = xmlSecBase64Encode(xmlSecBufferGetData(buf), xmlSecBufferGetSize(buf), columns); if(content == NULL) { xmlSecErr...
false
false
false
false
false
0
tokenize(const String &s, int &pos_in, int &line) { const char *data = s.data(); int len = s.length(); int pos = pos_in; while (1) { // skip whitespace while (pos < len && isspace((unsigned char) data[pos])) { if (data[pos] == '\n') line++; else if (data[pos] == '\r' && (pos + 1 == len || ...
false
false
false
false
false
0
ReorderBufferAbortOld(ReorderBuffer *rb, TransactionId oldestRunningXid) { dlist_mutable_iter it; /* * Iterate through all (potential) toplevel TXNs and abort all that are * older than what possibly can be running. Once we've found the first * that is alive we stop, there might be some that acquired an xid ear...
false
false
false
false
false
0
netsend_send(t_netsend *x, t_symbol *s, int argc, t_atom *argv) { if (x->x_fd >= 0) { t_binbuf *b = binbuf_new(); char *buf, *bp; int length, sent; t_atom at; binbuf_add(b, argc, argv); SETSEMI(&at); binbuf_add(b, 1, &at); binbuf_gettext(b, &buf, &...
false
false
false
false
false
0
js_LineNumberToPC(JSScript *script, uintN target) { ptrdiff_t offset, best; uintN lineno, bestdiff, diff; jssrcnote *sn; JSSrcNoteType type; offset = 0; best = -1; lineno = script->lineno; bestdiff = SN_LINE_LIMIT; for (sn = script->notes(); !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) ...
false
false
false
false
false
0
ad5064_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int val, int val2, long mask) { struct ad5064_state *st = iio_priv(indio_dev); int ret; switch (mask) { case IIO_CHAN_INFO_RAW: if (val >= (1 << chan->scan_type.realbits) || val < 0) return -EINVAL; mutex_lock(&indio_dev->mlock)...
false
false
false
false
false
0
getDragTypeName(FXDragType type) const { if(initialized){ #ifndef WIN32 FXchar *name=XGetAtomName((Display*)display,type); FXString dragtypename(name); XFree(name); return dragtypename; #else if(0xC000<=type && type<=0xFFFF){ FXchar buffer[256]; GetClipboardFormatNameA(type,buffer,size...
false
false
false
false
false
0
sfxhash_gfindfirst( SFXHASH * t ) { if(t) { if (t->ghead) t->gnode = t->ghead->gnext; else t->gnode = NULL; return t->ghead; } return NULL; }
false
false
false
false
false
0
Direct_Move( EXEC_OPS PGlyph_Zone zone, Int point, TT_F26Dot6 distance ) { TT_F26Dot6 v; v = CUR.GS.freeVector.x; if ( v != 0 ) { zone->cur_x[point] += MulDiv_Round( distance, ...
false
false
false
false
false
0
_slurm_rpc_job_notify(slurm_msg_t * msg) { int error_code; /* Locks: read job */ slurmctld_lock_t job_read_lock = { NO_LOCK, READ_LOCK, NO_LOCK, NO_LOCK }; uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); job_notify_msg_t * notify_msg = (job_notify_msg_t *) msg->data; struct job_record *job_ptr; DEF_TIM...
false
false
false
false
false
0
CompatibleWithVersion(int fxdVersion, int * pfxdNeeded, int * pfxdCpilrNeeded) { bool fRet = true; if (m_psymName->IsMeasureAttr() || m_psymName->DoesJustification()) { // Measuring and justification need 2.0. *pfxdNeeded = max(*pfxdNeeded, 0x00020000); *pfxdCpilrNeeded = max(*pfxdCpilrNeeded, 0x00020000); f...
false
false
false
false
false
0
D_Display(void) { extern boolean askforquit; // Change the view size if needed if (setsizeneeded) { R_ExecuteSetViewSize(); } // // do buffered drawing // switch (gamestate) { case GS_LEVEL: if (!gametic) break; if (automapactive) ...
false
false
false
false
false
0
apply_temporary_addition (DocNode *modified, xmlNodePtr sibling, xmlNodePtr new_node, XSDData *xsd_data) { xmlNodePtr mod_sibling; xmlNodePtr new_node_copy = xml_util_copy_node (new_node); if (sibling->doc == ...
false
false
false
false
false
0