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
findFunction(const Token *tok) const { for (std::list<Function>::const_iterator i = functionList.begin(); i != functionList.end(); ++i) { if (i->tokenDef->str() == tok->str()) { const Function *func = &*i; if (tok->strAt(1) == "(" && tok->tokAt(2)) { // check the argu...
false
false
false
false
false
0
AscGetChipVersion(PortAddr iop_base, unsigned short bus_type) { if (bus_type & ASC_IS_EISA) { PortAddr eisa_iop; unsigned char revision; eisa_iop = (PortAddr) ASC_GET_EISA_SLOT(iop_base) | (PortAddr) ASC_EISA_REV_IOP_MASK; revision = inp(eisa_iop); return ASC_CHIP_MIN_VER_EISA - 1 + revision...
false
false
false
false
false
0
offsetTOCLookupFn(const UDataMemory *pData, const char *tocEntryName, int32_t *pLength, UErrorCode *pErrorCode) { const UDataOffsetTOC *toc = (UDataOffsetTOC *)pData->toc; if(toc!=NULL) { const char *base=(const char *)toc; int32_t number, c...
false
false
false
false
false
0
get_terminal_width () { int fd; fd = fileno (stdout); #ifdef TIOCGSIZE struct ttysize wsize; #elif defined(TIOCGWINSZ) struct winsize wsize; #else return 0; #endif #ifdef TIOCGSIZE if (ioctl (fd, TIOCGSIZE, &wsize)) return 0; return wsize.ts_cols; #elif defi...
false
false
false
false
false
0
SetSocket(CSocket* pSocket, bool already_locked = false) { if (!already_locked) m_sync.Lock(); m_pSocket = pSocket; delete [] m_pHost; m_pHost = 0; delete [] m_pPort; m_pPort = 0; m_waiting = 0; if (!already_locked) m_sync.Unlock(); }
false
false
false
false
false
0
loadflist(String *s) { int c, i; c = s->s[0]; for(i = 0; s->s[i]==' ' || s->s[i]=='\t'; i++) ; if((c==' ' || c=='\t') && s->s[i]!='\n'){ if(s->s[i]=='<'){ Strdelete(s, 0L, (long)i+1); readcmd(s); }else{ Strzero(&genstr); while((c = s->s[i++]) && c!='\n') Straddc(&genstr, c); Straddc(&genst...
false
false
false
false
false
0
dmaengine_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); int (*prepare_slave_config)(stru...
false
false
false
false
false
0
rehash(st_table *table) { st_table_entry *ptr, *next, **old_bins; int i, old_num_bins, hash_val, old_num_entries; /* save old values */ old_bins = table->bins; old_num_bins = table->num_bins; old_num_entries = table->num_entries; /* rehash */ table->num_bins = (int) (table-...
false
false
false
false
false
0
consume_shallow_list(int fd) { if (args.stateless_rpc && args.depth > 0) { /* If we sent a depth we will get back "duplicate" * shallow and unshallow commands every time there * is a block of have lines exchanged. */ char line[1000]; while (packet_read_line(fd, line, sizeof(line))) { if (!prefixcmp(l...
false
false
false
false
false
0
nfs41_set_target_slotid_locked(struct nfs4_slot_table *tbl, u32 target_highest_slotid) { if (tbl->target_highest_slotid == target_highest_slotid) return; tbl->target_highest_slotid = target_highest_slotid; tbl->generation++; }
false
false
false
false
false
0
knode_dead_probability_cmp(const void *a, const void *b) { const knode_t *k1 = a; const knode_t *k2 = b; double p1, p2; double e; p1 = knode_still_alive_probability(k1); p2 = knode_still_alive_probability(k2); /* Higher alive chances => lower dead probability */ e = p2 - p1; if (e < 0.0) e = -e; if (e <...
false
false
false
false
false
0
test_kvp_frame_set_slot_path_gslist( Fixture *fixture, gconstpointer pData ) { /* similar to previous test except path is passed as GSList*/ GSList *path_list = NULL; GHashTable *frame_hash = NULL; KvpValue *input_value, *output_value; g_assert( fixture->frame ); g_assert( kvp_frame_is_empty( f...
false
false
false
false
false
0
handle_cli_database_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { char prefix[MAX_DB_FIELD]; int counter = 0; sqlite3_stmt *stmt = gettree_stmt; switch (cmd) { case CLI_INIT: e->command = "database show"; e->usage = "Usage: database show [family [keytree]]\n" " OR: database show [fa...
false
false
false
false
false
0
ovl_removexattr(struct dentry *dentry, const char *name) { int err; struct path realpath; enum ovl_path_type type = ovl_path_real(dentry, &realpath); err = ovl_want_write(dentry); if (err) goto out; err = -ENODATA; if (ovl_need_xattr_filter(dentry, type) && ovl_is_private_xattr(name)) goto out_drop_write; ...
false
true
false
false
false
1
lbs_prb_rsp_limit_get(struct device *dev, struct device_attribute *attr, char *buf) { struct lbs_private *priv = to_net_dev(dev)->ml_priv; struct cmd_ds_mesh_access mesh_access; int ret; u32 retry_limit; memset(&mesh_access, 0, sizeof(mesh_access)); mesh_access.data[0] = cpu_to_le32(CMD_ACT_GET); ret = lbs_m...
false
false
false
false
false
0
bluetooth_disconnect(DBusConnection *conn, void *user_data) { DBG("connection %p", conn); if (bluetooth_devices == NULL) return; g_hash_table_destroy(bluetooth_networks); bluetooth_networks = NULL; g_hash_table_destroy(bluetooth_devices); bluetooth_devices = NULL; g_hash_table_destroy(pending_networks); pen...
false
false
false
false
false
0
do_report_request(sge_gdi_ctx_class_t *ctx, struct_msg_t *aMsg, monitoring_t *monitor) { lList *rep = NULL; const char *admin_user = ctx->get_admin_user(ctx); const char *myprogname = ctx->get_progname(ctx); sge_gdi_packet_class_t *packet = NULL; DENTER(TOP_LAYER, "do_report_request"); /* Load repor...
false
false
false
false
false
0
target_toggled_cb (GtkToggleButton *button, gpointer data) { int target_toggle = GPOINTER_TO_INT (data); gboolean take_area_shot, take_window_shot; if (gtk_toggle_button_get_active (button)) { take_window_shot = (target_toggle == TARGET_TOGGLE_WINDOW); take_area_shot = ...
false
false
false
false
false
0
seq_reverse(int l, unsigned char *s) { int i; for (i = 0; i < l>>1; ++i) { int tmp = s[l-1-i]; s[l-1-i] = s[i]; s[i] = tmp; } }
false
false
false
false
false
0
rorschach_draw_step (Display *dpy, Window window, struct state *st) { # define ITER_CHUNK 300 XPoint points [4 * ITER_CHUNK]; int x = st->current_x; int y = st->current_y; int i, j = 0; int this_iterations = ITER_CHUNK; if (this_iterations > st->remaining_iterations) this_iterations = st->remaining_ite...
false
false
false
false
false
0
code39_vectorize (const gchar *code, gdouble w, gdouble h, gboolean text_flag, gboolean checksum_flag, const gchar *data, const gchar *string) { gint n_chars; ...
false
false
false
false
false
0
buff_blockread(void *buff,long size,long offset) { char *errstr; if (int_buff!=NULL) memcpy((char*)buff,int_buff+offset,size); else { binseek(bfile,offset); if (!binread(bfile,buff,size,1,&errstr)) fatal(errstr); } }
false
false
false
false
false
0
refresh() { gtk_widget_queue_draw(border); if (frame != border && GTK_IS_WIDGET(frame)) gtk_widget_queue_draw(frame); if (widget != frame && GTK_IS_WIDGET(widget)) gtk_widget_queue_draw(widget); afterRefresh(); }
false
false
false
false
false
0
check_buf_node(BUF_NODE *bt,BLOCKAGE *block,int num,int *direct){ int x = (int) bt->x; int y = (int) bt->y; int i; for ( i = 0 ; i < num ; i++){ if(((*direct)=constradict(x,y,(block->pool + i))) > 0 ){ return; } } }
false
false
false
false
false
0
mimeview_update (MimeView *mimeview) { if (mimeview && mimeview->mimeinfo) { icon_list_clear(mimeview); icon_list_create(mimeview, mimeview->mimeinfo); } }
false
false
false
false
false
0
isCharType(bool (*xiswtest)(const unsigned long wc), const char *ptr, const bool reverse) const { const char *xptr = ptr; unsigned long w=getValidUCS4(xptr); if(ptr != xptr) { if (sizeof(wchar_t) == 2) w &= 0xffff; if (reverse ^ xiswtest(w)) ...
false
false
false
false
false
0
m_Get(Object *in, Object *out) { if(DXLoopFirst()) DXWarning("#5260", "Get", "Get", "Get"); return(Get(in, out, GLOBAL)); }
false
false
false
false
false
0
elm_drop_target_add(Evas_Object *obj, Elm_Sel_Type format, Elm_Drop_Cb dropcb, void *cbdata) { if (!_elm_cnp_init_count) _elm_cnp_init(); #ifdef HAVE_ELEMENTARY_X if (_x11_elm_widget_xwin_get(obj)) return _x11_elm_drop_target_add(obj, format, dropcb, cbdata); #endif return _local_elm_d...
false
false
false
false
false
0
hdlcdev_rx(SLMP_INFO *info, char *buf, int size) { struct sk_buff *skb = dev_alloc_skb(size); struct net_device *dev = info->netdev; if (debug_level >= DEBUG_LEVEL_INFO) printk("hdlcdev_rx(%s)\n",dev->name); if (skb == NULL) { printk(KERN_NOTICE "%s: can't alloc skb, dropping packet\n", dev->name); ...
false
true
false
false
false
1
mg_drag_begin_cb (GtkWidget *widget, GdkDragContext *context, gpointer userdata) { #ifndef WIN32 /* leaks GDI pool memory - don't use on win32 */ int width, height; GdkColormap *cmap; GdkPixbuf *pix, *pix2; /* ignore file drops */ if (!mg_is_gui_target (context)) return FALSE; cmap = gtk_widget_get_colormap (...
false
false
false
false
false
0
qfits_header_makeline( char * line, const keytuple * k, int conservative) { char blankline[81]; int i; if (line==NULL || k==NULL) return -1; /* If a previous line information is there, use it as is */ if (conservative) { if (k->li...
true
true
false
false
false
1
get_geometric_area( double start_segment, double end_segment ) const { // Fuzzy set first (resp last) point must be at x = X_MIN (resp x = X_MAX) assert( _points->get_first() != _points->get_last() ); assert( _points->get_first()->get_obj()->x == X_MIN ); assert( _points->get_last()->get_obj()->x == X_MAX ); ...
false
false
false
false
false
0
intern_data(ConstraintEvaluator &eval, DDS &dds) { DBG(cerr << "Sequence::intern_data - for " << name() << endl); DBG2(cerr << " intern_data, values: " << &d_values << endl); // Why use a stack instead of return values? We need the stack because // Sequences neted three of more levels deep will loos...
false
false
false
false
false
0
one_store_motion_pass (void) { basic_block bb; int x; struct st_expr * ptr; int did_edge_inserts = 0; int n_stores_deleted = 0; int n_stores_created = 0; init_alias_analysis (); /* Find all the available and anticipatable stores. */ num_stores = compute_store_table (); if (num_stores == 0) { ...
false
false
false
false
false
0
p54_get_survey(struct ieee80211_hw *dev, int idx, struct survey_info *survey) { struct p54_common *priv = dev->priv; struct ieee80211_channel *chan; int err, tries; bool in_use = false; if (idx >= priv->chan_num) return -ENOENT; #define MAX_TRIES 1 for (tries = 0; tries < MAX_TRIES; tries++) { chan = pr...
false
false
false
false
false
0
startNewRound( bool incrementRound, const QString & layout ) { cleanUpRound(); m_waitingOutRound = false; m_coordinator->beginNewAnimationStage(); if ( incrementRound ) { ++m_round; if ( m_rules->energyEnabled() ) { m_maxEnergy += m_rules->maxEnergyAddedEachRound(); updateEnergy( m_rules->energyAdd...
false
false
false
false
false
0
normalizePath(Tree path) { //cout << "Normalize Path [[" << *path << "]]" << endl; Tree npath; if (isNil(path)) { npath = path; } else { npath = normalizeLabel(hd(path), normalizePath(tl(path))); } //cout << " -> [[" << *npath << "]]" << endl; return npath; }
false
false
false
false
false
0
sp_unit_get_list(guint bases) { g_return_val_if_fail((bases & ~SP_UNITS_ALL) == 0, NULL); GSList *units = NULL; for (unsigned i = sp_num_units ; i--; ) { if (bases & sp_units[i].base) { units = g_slist_prepend(units, (gpointer) &sp_units[i]); } } return units; }
false
false
false
false
false
0
__ecerePropertySelfWatcher_1_background(struct __ecereNameSpace__ecere__com__Instance * this) { struct __ecereNameSpace__ecere__gui__controls__DropBox * __ecerePointer___ecereNameSpace__ecere__gui__controls__DropBox = (struct __ecereNameSpace__ecere__gui__controls__DropBox *)(this ? (((char *)this) + __ecereClass___ece...
false
false
false
false
false
0
print_multi_pw_aff_isl(__isl_take isl_printer *p, __isl_keep isl_multi_pw_aff *mpa) { int i; if (!mpa) return isl_printer_free(p); p = isl_printer_print_str(p, "("); for (i = 0; i < mpa->n; ++i) { if (i) p = isl_printer_print_str(p, ","); p = isl_printer_print_pw_aff(p, mpa->p[i]); } p = isl_printer_p...
false
false
false
false
true
1
strbuf_ltrim(struct strbuf *sb) { char *b = sb->buf; while (sb->len > 0 && isspace(*b)) { b++; sb->len--; } memmove(sb->buf, b, sb->len); sb->buf[sb->len] = '\0'; }
false
false
false
false
false
0
acdAttrTest(const AcdPAcd thys,const char *attrib) { AcdPAttr attr; AcdPAttr defattr = acdAttrDef; ajint i; if(acdIsQtype(thys)) attr = acdType[thys->Type].Attr; else attr = acdKeywords[thys->Type].Attr; i = acdFindAttrC(attr, attrib); if(i >= 0) return ajTrue; if(thys->DefStr) ...
false
false
false
false
false
0
list_msg_mime_multipart(struct rfc2045 *rfc, FILE *fp) { struct rfc2045 *q; int first=1; int rc; for (q=rfc->firstpart; q; q=q->next) { if (q->isdummy) continue; if (!first) printf("\n ------------------------------\n\n"); first=0; rc=list_msg_mime(q, fp); if (rc) return (rc); } return (0);...
false
false
false
false
false
0
setArguments( const QList<Expression *> &args ) { foreach( Expression *arg, args ) { addSubExpression( arg ); } }
false
false
false
false
false
0
length_in_samples(void) const { // -------- DBC_REQUIRE(is_selected()); // -------- SAMPLE_SPECS::sample_pos_t cslen = 0; if (selected_chainsetup_repp->length_set() == true) { cslen = selected_chainsetup_repp->length_in_samples(); } if (selected_chainsetup_repp->max_length_set() == true) { cslen ...
false
false
false
false
false
0
tg3_10_100_only_device(struct tg3 *tp, const struct pci_device_id *ent) { u32 grc_misc_cfg = tr32(GRC_MISC_CFG) & GRC_MISC_CFG_BOARD_ID_MASK; if ((tg3_asic_rev(tp) == ASIC_REV_5703 && (grc_misc_cfg == 0x8000 || grc_misc_cfg == 0x4000)) || (tp->phy_flags & TG3_PHYFLG_IS_FET)) return true; if (en...
false
false
false
false
false
0
mxt_t6_command(struct mxt_data *data, u16 cmd_offset, u8 value, bool wait) { u16 reg; u8 command_register; int timeout_counter = 0; int ret; reg = data->T6_address + cmd_offset; ret = mxt_write_reg(data->client, reg, value); if (ret) return ret; if (!wait) return 0; do { msleep(20); ret = __mx...
false
false
false
false
false
0
substitute(OutBuffer *buf, void *p) { for (size_t i = 0; i < components.dim; i++) { if (p == components[i]) { /* Sequence is S_, S0_, .., S9_, SA_, ..., SZ_, S10_, ... */ buf->writeByte('S'); if (i) writeBase36(buf, i - 1); ...
false
false
false
false
false
0
sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const { if (index.row() == 0 || index.row() == m_grandTotalRow || m_emptyRows.contains(index.row())) { return QItemDelegate::sizeHint(option, index); } else { // Set the height to that of the font set at pointSize m_height QSize size; Q...
false
false
false
false
false
0
e_dialog_border_icon_set(E_Dialog *dia, const char *icon) { E_Border *border; border = dia->win->border; if (!border) return; if (border->internal_icon) { eina_stringshare_del(border->internal_icon); border->internal_icon = NULL; } if (icon) border->internal_icon = eina_st...
false
false
false
false
false
0
forwardGaplessPssmXdropScore(const uchar *seq, const ScoreMatrixRow *pssm, int maxScoreDrop) { int score = 0; int s = 0; while (true) { s += (*pssm++)[*seq++]; // overflow risk if (s < score - maxScoreDrop) break; if (s > score) score ...
false
false
false
false
false
0
ordin(n) /* return the ordinal suffix of a number */ int n; /* note: should be non-negative */ { register int dd = n % 10; return (dd == 0 || dd > 3 || (n % 100) / 10 == 1) ? "th" : (dd == 1) ? "st" : (dd == 2) ? "nd" : "rd"; }
false
false
false
false
false
0
netsnmp_access_route_container_load(netsnmp_container* container, u_int load_flags) { int rc; DEBUGMSGTL(("access:route:container", "load\n")); if (NULL == container) { container = netsnmp_container_find("access:_route:fifo"); if (NULL == container) { snmp_log(LOG_ERR, "no cont...
false
false
false
false
false
0
get_opdef(integer op) { op=op%2048; /* Strip operand information */ if (op<0 || (op>MAX_COND && op<START_ACT) || (op>PREWIN_ACT && op<WIN_ACT) || (op>MAX_ACT) ) { return &illegal_def; } if (op>=2000) return &end_def[op-2000]; if (op>=1000) return &act_def[op-1000]; return &cond_def[op]; ...
false
false
false
false
false
0
ne_crc (UINT8 *data, UINT32 bytes) { UINT32 crc, i; crc = (UINT32)-1; for(i = 0; i < bytes; i++, data++) crc = ((crc >> 8) & 0xFFFFFF) ^ CRCTable[((crc ^ *data) & 0xFF)]; crc = ~crc; return crc; }
false
false
false
false
false
0
toscinot() const { double mant, exponent; double k_1_10 = 0.1; double k_1_10000 = 0.0001; double k_base = 65536.0 * 32768.0; exponent = 0; if (v.i & 1) { /* small integer */ mant = (double)(v.i >> 1) ; } else { /* big integer: a string of 31-bit chunks */ mant = 0 ; double m = 1 ; ...
false
false
false
false
false
0
iscsi_target_destroy(u32 tid) { struct target_info info; int err; memset(&info, 0, sizeof(info)); info.tid = tid; err = ioctl(ctrl_fd, DEL_TARGET, &info); if (err < 0 && errno == EFAULT) log_error("error calling ioctl DEL_TARGET: %m"); return (err < 0) ? -errno : 0; }
false
false
false
false
false
0
LocationValid() const { if (triesleft <= 0) return false; if (locations.end() == location) return false; return true; }
false
false
false
false
false
0
annkPriSearch( ANNpoint q, // query point int k, // number of near neighbors to return ANNidxArray nn_idx, // nearest neighbor indices (returned) ANNdistArray dd, // dist to near neighbors (returned) double eps) // error bound (ignored) { // max tolerable squared error ANNprMaxE...
false
false
false
false
false
0
match_bin_op(__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2, __isl_give isl_map *(*fn)(__isl_take isl_map*, __isl_take isl_map*)) { struct isl_union_map_match_bin_data data = { NULL, NULL, fn }; umap1 = isl_union_map_align_params(umap1, isl_union_map_get_space(umap2)); umap2 = isl_union_map_alig...
false
false
false
false
false
0
hmc5843_read_measurement(struct hmc5843_data *data, int idx, int *val) { __be16 values[3]; int ret; mutex_lock(&data->lock); ret = hmc5843_wait_measurement(data); if (ret < 0) { mutex_unlock(&data->lock); return ret; } ret = regmap_bulk_read(data->regmap, HMC5843_DATA_OUT_MSB_REGS, values,...
false
false
false
false
false
0
s_MD5E_process(stream_state * st, stream_cursor_read * pr, stream_cursor_write * pw, bool last) { stream_MD5E_state *const ss = (stream_MD5E_state *) st; int status = 0; if (pr->ptr < pr->limit) { gs_md5_append(&ss->md5, pr->ptr + 1, pr->limit - pr->ptr); pr->ptr = pr->limit;...
false
false
false
false
false
0
ProtectRtp(void* p, int in_len, int max_len, int* out_len) { if (!session_) { LOG(LS_WARNING) << "Failed to protect SRTP packet: no SRTP Session"; return false; } int need_len = in_len + rtp_auth_tag_len_; // NOLINT if (max_len < need_len) { LOG(LS_WARNING) << "Failed to protect SRTP packet: The b...
false
false
false
false
false
0
nilfs_read_super_root_block(struct the_nilfs *nilfs, sector_t sr_block, struct buffer_head **pbh, int check) { struct buffer_head *bh_sr; struct nilfs_super_root *sr; u32 crc; int ret; *pbh = NULL; bh_sr = __bread(nilfs->ns_bdev, sr_block, nilfs->ns_blocksize); if (unlikely(!bh_sr)) { ret = NILFS_SEG_FAIL...
false
false
false
false
false
0
GXDrawFillPoly(GWindow gw, GPoint *pts, int16 cnt, Color col) { GXWindow gxw = (GXWindow) gw; GXDisplay *display = gxw->display; gxw->ggc->fg = col; #ifndef _NO_LIBCAIRO if ( gxw->usecairo ) { _GXCDraw_FillPoly( gxw,pts,cnt); } else #endif { GXDrawSetline(display,gxw->ggc); /* Polygons draw ...
false
false
false
false
false
0
activate_action (GtkToolButton *toolbutton, GladeWidgetAction *action) { GladeWidget *widget; if ((widget = g_object_get_data (G_OBJECT (toolbutton), "glade-widget"))) glade_widget_adaptor_action_activate (widget->adaptor, widget->object, action->klass->path); }
false
false
false
false
false
0
stk500v2_jtagmkII_open(PROGRAMMER * pgm, char * port) { long baud; void *mycookie; int rv; if (verbose >= 2) fprintf(stderr, "%s: stk500v2_jtagmkII_open()\n", progname); /* * The JTAG ICE mkII always starts with a baud rate of 19200 Bd upon * attaching. If the config file or command-line paramete...
false
false
false
false
false
0
sync_ep_set_params(struct snd_usb_endpoint *ep) { int i; ep->syncbuf = usb_alloc_coherent(ep->chip->dev, SYNC_URBS * 4, GFP_KERNEL, &ep->sync_dma); if (!ep->syncbuf) return -ENOMEM; for (i = 0; i < SYNC_URBS; i++) { struct snd_urb_ctx *u = &ep->urb[i]; u->index = i; u->ep = ep; u->packets = 1; u...
false
false
false
false
false
0
gda_data_model_array_get_row (GdaDataModelArray *model, gint row, GError **error) { g_return_val_if_fail (GDA_IS_DATA_MODEL_ARRAY (model), NULL); g_return_val_if_fail (row >= 0, NULL); if ((guint)row >= model->priv->rows->len) { if (model->priv->rows->len > 0) g_set_error (error, GDA_DATA_MODEL_ERROR, GDA_DATA...
false
false
false
false
false
0
_roster_get_walker(const char *id, int idlen, void *val, void *arg) { item_t item = (item_t) val; roster_walker_t rw = (roster_walker_t) arg; _roster_insert_item(rw->pkt, item, 2); /* remember largest item version */ if(item->ver > rw->ver) rw->ver = item->ver; }
false
false
false
false
false
0
stmmac_ptp_unregister(struct stmmac_priv *priv) { if (priv->ptp_clock) { ptp_clock_unregister(priv->ptp_clock); priv->ptp_clock = NULL; pr_debug("Removed PTP HW clock successfully on %s\n", priv->dev->name); } }
false
false
false
false
false
0
form_alliance_treaty(int nationRecno) { err_when( nationRecno == nation_recno ); err_when( nation_array.is_deleted(nationRecno) ); set_relation_status(nationRecno, NATION_ALLIANCE); //--- allied nations are oblied to trade with each other ---// set_trade_treaty(nationRecno, 1); //------ set is_allied_with_pla...
false
false
false
false
false
0
gt_diagram_new(GtFeatureIndex *feature_index, const char *seqid, const GtRange *range, GtStyle *style, GtError *err) { GtDiagram *diagram; int had_err = 0; GtArray *features = NULL; gt_assert(seqid && range && style); if (range->start == range->end) { ...
false
false
false
false
false
0
clashingBounds(const Theorem& lowerBound, const Theorem& upperBound) { // Get the expressions const Expr& lowerBoundExpr = lowerBound.getExpr(); const Expr& upperBoundExpr = upperBound.getExpr(); // Check soundness if (CHECK_PROOFS) { CHECK_SOUND(isLE(lowerBoundExpr) || isLT(lowerBoundExpr), "clashingBounds: l...
false
false
false
false
false
0
writeInitValues(ostream &output) const { for (init_values_t::const_iterator it = init_values.begin(); it != init_values.end(); it++) { const int symb_id = it->first; const expr_t expression = it->second; SymbolType type = symbol_table.getType(symb_id); int tsid = symbol_table.getTy...
false
false
false
false
false
0
stack_copy(ref_stack_t * to, const ref_stack_t * from, uint count, uint from_index) { long i; for (i = (long)count - 1; i >= 0; --i) *ref_stack_index(to, i) = *ref_stack_index(from, i + from_index); }
false
false
false
false
false
0
ResolveRow() { std::vector<int> rowsol = mCurRow->GetSolution(); mSolver->GuessIn(&rowsol); std::vector<int> hints = RateSol2Guess(mSolution, rowsol); if (hints.size() == (unsigned) mPegCnt) { int bl = 0; for (int i = 0; i < mPegCnt; ++i) { if (hints.at(i) == 2)...
false
false
false
false
false
0
NextValue() { unsigned long x = seed; unsigned long a1x1; unsigned long a0x0; unsigned long a1x0pa0x1; a1x1 = a1 * (x >> 16); a0x0 = a0 * (x & 0x0000FFFF); a1x0pa0x1 = a1ma0 * ((x & 0x0000FFFF) - (x >> 16) ) + a1x1 + a0x0; a1x0pa0x1 &= 0xFFFFFFFF; a1x1 += (a1x0pa0x1 >> 16); unsi...
false
false
false
false
false
0
command_sequence(unsigned char *command, int command_length, unsigned char *answer) { int bytes_read, retry = 0; while (retry++ < PW_MAX_TRY) { if (retry == PW_MAX_TRY) { ser_flush_in(upsfd, "", 0); } send_write_command(command, command_length); bytes_read = get_answer(answer, *command); if (bytes_r...
false
false
false
false
false
0
efi_map_region(efi_memory_desc_t *md) { unsigned long size = md->num_pages << PAGE_SHIFT; u64 pa = md->phys_addr; if (efi_enabled(EFI_OLD_MEMMAP)) return old_map_region(md); /* * Make sure the 1:1 mappings are present as a catch-all for b0rked * firmware which doesn't update all internal pointers after swit...
false
false
false
false
false
0
f_negative_p(VALUE x) { if (FIXNUM_P(x)) return f_boolcast(FIX2LONG(x) < 0); return rb_funcall(x, '<', 1, ZERO); }
false
false
false
false
false
0
gda_sql_builder_add_param (GdaSqlBuilder *builder, const gchar *param_name, GType type, gboolean nullok) { g_return_val_if_fail (GDA_IS_SQL_BUILDER (builder), 0); g_return_val_if_fail (builder->priv->main_stmt, 0); g_return_val_if_fail (param_name && *param_name, 0); GdaSqlExpr *expr; expr = gda_sql_expr_new (NUL...
false
false
false
false
false
0
vp_draw_rectangle(vp_info_t *v, filesize_t from, filesize_t to, guint top, guint bottom) { guint s_from; guint s_to; g_assert(v); g_assert(v->context); g_assert(v->context->drawable); /* * Both these variables should be set to a value, otherwise we get * a division by zero below. We cou...
false
false
false
false
false
0
match(const char *mask, const char *name) { const u_char *m = (const u_char *)mask, *n = (const u_char *)name; const char *ma = mask, *na = name; int wild = 0, q = 0, calls = 0; if (!mask || !name) return 1; /* if the mask is "*", it matches everything */ if ((*m == '*') && (*(m + 1) == '\0')) return 0; w...
false
false
false
false
false
0
add_cred(krb5_context context, krb5_creds const *tkt, krb5_creds ***tgts) { int i; krb5_error_code ret; krb5_creds **tmp = *tgts; for(i = 0; tmp && tmp[i]; i++); /* XXX */ tmp = realloc(tmp, (i+2)*sizeof(*tmp)); if(tmp == NULL) return krb5_enomem(context); *tgts = tmp; ret = krb5_copy_...
false
false
false
false
false
0
twa_check_srl(TW_Device_Extension *tw_dev, int *flashed) { int retval = 1; unsigned short fw_on_ctlr_srl = 0, fw_on_ctlr_arch_id = 0; unsigned short fw_on_ctlr_branch = 0, fw_on_ctlr_build = 0; u32 init_connect_result = 0; if (twa_initconnection(tw_dev, TW_INIT_MESSAGE_CREDITS, TW_EXTENDED_INIT_CONNECT,...
false
false
false
false
false
0
updateShortcutDisplay() { //empty string if no non-modifier was pressed QString s = keySequence.toString(QKeySequence::NativeText); s.replace('&', QLatin1String("&&")); if (isRecording) { if (modifierKeys) { if (!s.isEmpty()) s.append(","); if (modifierKeys & Qt::META) ...
false
false
false
false
false
0
ddf_SelectNextHalfspace(ddf_ConePtr cone, ddf_rowset excluded, ddf_rowrange *hh) { if (cone->PreOrderedRun){ if (ddf_debug) { fprintf(stderr,"debug ddf_SelectNextHalfspace: Use PreorderNext\n"); } ddf_SelectPreorderedNext(cone, excluded, hh); } else { if (ddf_debug) { fprintf(stderr,"d...
false
false
false
false
false
0
TagLoad(const char *FileName) { if (!TagsAdd(FileName)) return 0; ClearTagStack(); if (TagFilesLoaded) { if (!TagsLoad(TagFileCount - 1) || !SortTags()) { TagClear(); return 0; } } return 1; }
false
false
false
false
false
0
assuan_get_data_fp (assuan_context_t ctx) { #if defined (HAVE_FOPENCOOKIE) || defined (HAVE_FUNOPEN) if (ctx->outbound.data.fp) return ctx->outbound.data.fp; #ifdef HAVE_FUNOPEN ctx->outbound.data.fp = funopen (ctx, 0, fun1_cookie_write, 0, _assuan_cookie_write_flush); #else ctx->outbound.data.fp = ...
false
false
false
false
false
0
cmpStr(string s1, string s2) { string::const_iterator p1 = s1.begin(); string::const_iterator p2 = s2.begin(); while (p1 != s1.end() && p2 != s2.end()) { if (toupper(*p1) != toupper(*p2)) return (toupper(*p1) < toupper(*p2)) ? -1 : 1; ++p1; ++p2; } return (s2.size() == s1.size()) ? 0 : ...
false
false
false
false
false
0
isKnownAttribute(const QualifiedName& attrName) { return (attrName.matches(SVGNames::xAttr) || attrName.matches(SVGNames::yAttr) || attrName.matches(SVGNames::dxAttr) || attrName.matches(SVGNames::dyAttr) || attrName.matches(SVGNames::rotateAttr) || SVGTex...
false
false
false
false
false
0
clear_rhs_from_active_local_stores (void) { insn_info_t ptr = active_local_stores; while (ptr) { store_info_t store_info = ptr->store_rec; /* Skip the clobbers. */ while (!store_info->is_set) store_info = store_info->next; store_info->rhs = NULL; store_info->const_rhs = NULL; ...
false
false
false
false
false
0
loadIconFromFile( QString const & _filename, bool isFullName ) { QFileInfo info; QString fileName( _filename ); if( isFullName ) info = QFileInfo( fileName ); else { fileName += "bmp"; info = QFileInfo( fileName ); if ( !info.isFile() ) { fileName.chop( 3 ); fileName += "png";...
false
false
false
false
false
0
handleRankedElement(const ElementType *e) { StringC rankSuffix(e->definition()->rankSuffix()); const RankStem *rankStem = e->rankedElementRankStem(); for (size_t i = 0; i < rankStem->nDefinitions(); i++) { const ElementDefinition *def = rankStem->definition(i); for (size_t j = 0; j < def->nRankStems(); j+...
false
false
false
false
false
0
do_arglist(str, what, after) char_u *str; int what UNUSED; int after UNUSED; /* 0 means before first one */ { garray_T new_ga; int exp_count; char_u **exp_files; int i; #ifdef FEAT_LISTCMDS char_u *p; int match; #endif /* * Collect all file name arguments in "new_ga"....
false
false
false
false
false
0
rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) { NODE *prelude = 0; NODE *scope = node; struct parser_params *parser; if (!node) return node; TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); node = node->nd_body; if (nd_type(node) == N...
false
false
false
false
false
0
glade_widget_add_events (GtkWidget * widget) { GList *children, *list; gtk_widget_add_events (widget, GDK_POINTER_MOTION_MASK | /* Handle pointer events */ GDK_POINTER_MOTION_HINT_MASK | /* for drag/resize and */ GDK_BUTTON_PRESS_MAS...
false
false
false
false
false
0
deleteTab() { bool deleteFile = false; if (!m_textEdit->document()->isEmpty()) { QString name = QFileInfo(m_filename).fileName(); if (name.isEmpty()) { name = m_tabWidget->tabText(m_tabWidget->currentIndex()); } DeleteDialog deleteDialog(tr("Remove \"%1\"?").arg(name), tr("Are you sure you want ...
false
false
false
false
false
0
NewContextFromSnapshot() { if (context_size_ == 0) { return Handle<Context>(); } Heap::ReserveSpace(new_space_used_, pointer_space_used_, data_space_used_, code_space_used_, map_space_used_, cell_space_use...
false
false
false
false
false
0