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
property_callback( const gchar *option_name, const gchar *value, gpointer data, GError **error) { const char *equal; char *t; if (!(equal = strchr(value, '='))) { g_set_error(error, error_domain(), 0, "Property lac...
false
false
false
false
false
0
getcached (Proto *p, UpVal **encup, StkId base) { Closure *c = p->cache; if (c != NULL) { /* is there a cached closure? */ int nup = p->sizeupvalues; Upvaldesc *uv = p->upvalues; int i; for (i = 0; i < nup; i++) { /* check whether it has right upvalues */ TValue *v = uv[i].instack ? base + u...
false
false
false
false
true
1
getCharWidth(const FXwchar ch) const { if(font){ #if defined(WIN32) ///// WIN32 ///// FXnchar sbuffer[2]; SIZE size; sbuffer[0]=ch; if(0xFFFF<ch){ // Deal with surrogate pair sbuffer[0]=(ch>>10)+LEAD_OFFSET; sbuffer[1]=(ch&0x3FF)+0xDC00; GetTextExten...
false
false
false
false
false
0
dvb_id_bus_channel_list_proxy_AddChannelToGroup (DVBIDBusChannelList* self, guint channel_id, gint channel_group_id, GError** error) { GDBusMessage *_message; GVariant *_arguments; GVariantBuilder _arguments_builder; GDBusMessage *_reply_message; GVariant *_reply; GVariantIter _reply_iter; gboolean _result; GVa...
false
false
false
false
false
0
cmd_prune(int argc, const char **argv, const char *prefix) { struct rev_info revs; const struct option options[] = { OPT__DRY_RUN(&show_only, "do not remove, show only"), OPT__VERBOSE(&verbose, "report pruned objects"), OPT_DATE(0, "expire", &expire, "expire objects older than <time>"), OPT_END() }; cha...
false
false
false
false
false
0
brcms_c_set_new_probe_resp(struct brcms_c_info *wlc, struct sk_buff *probe_resp) { if (!probe_resp) return; if (wlc->probe_resp) dev_kfree_skb_any(wlc->probe_resp); wlc->probe_resp = probe_resp; /* add PLCP */ skb_push(wlc->probe_resp, D11_PHY_HDR_LEN); brcms_c_update_probe_resp(wlc, false); }
false
false
false
false
false
0
gftpui_show_busy (gboolean busy) { GtkWidget * toplevel = gtk_widget_get_toplevel (openurl_btn); GdkDisplay * display = gtk_widget_get_display (toplevel); GdkCursor * busyCursor = (busy) ? (gdk_cursor_new_for_display (display, GDK_WATCH)) : NULL; gdk_window_set_cursor (toplevel->window, busyCursor); i...
false
false
false
false
false
0
save_permanent_variables(World *world) { PerlInterpreter *old_interpreter; gchar *variables_file; GSList *iter; gchar *varname; gchar *command; SV *retval; GString *file_contents; GError *error = NULL; if (!world->file) { return...
false
false
false
false
false
0
scan_periodic(struct oxu_hcd *oxu) { unsigned frame, clock, now_uframe, mod; unsigned modified; mod = oxu->periodic_size << 3; /* * When running, scan from last scan point up to "now" * else clean up by scanning everything that's left. * Touches as few pages as possible: cache-friendly. */ now_uframe = ...
false
false
false
false
false
0
GetTestModelFromString(const char* str) { if ( !str ) { return cmCTest::EXPERIMENTAL; } std::string rstr = cmSystemTools::LowerCase(str); if ( strncmp(rstr.c_str(), "cont", 4) == 0 ) { return cmCTest::CONTINUOUS; } if ( strncmp(rstr.c_str(), "nigh", 4) == 0 ) { return cmCTest::NI...
false
false
false
false
false
0
cp_parser_late_parsing_default_args (cp_parser *parser, tree fn) { bool saved_local_variables_forbidden_p; tree parm, parmdecl; /* While we're parsing the default args, we might (due to the statement expression extension) encounter more classes. We want to handle them right away, but we don't want the...
false
false
false
false
false
0
exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, int fh_len, int fileid_type, int (*acceptable)(void *, struct dentry *), void *context) { const struct export_operations *nop = mnt->mnt_sb->s_export_op; struct dentry *result, *alias; char nbuf[NAME_MAX+1]; int err; /* * Try to get any dentry for th...
false
false
false
false
false
0
rl_vi_eWord (count, ignore) int count, ignore; { while (count-- && rl_point < (rl_end - 1)) { if (!whitespace (rl_line_buffer[rl_point])) rl_point++; /* Move to the next non-whitespace character (to the start of the next word). */ while (rl_point < rl_end && whitespace (rl_line_buffer[r...
false
false
false
false
false
0
gwy_meta_browser_construct(MetadataBrowser *browser) { static const struct { const gchar *title; const guint id; } columns[] = { { N_("Name"), META_KEY, }, { N_("Value"), META_VALUE, }, }; GtkTreeView *treeview; GtkTreeSelection *selection; GtkCellRenderer...
false
false
false
false
false
0
Peek() { wxCompilerCommandsNode* node = m_Commands.GetFirst(); if (!node) return 0; return node->GetData(); }
false
false
false
false
false
0
ath10k_download_board_data(struct ath10k *ar, const void *data, size_t data_len) { u32 board_data_size = ar->hw_params.fw.board_size; u32 address; int ret; ret = ath10k_push_board_ext_data(ar, data, data_len); if (ret) { ath10k_err(ar, "could not push board ext data (%d)\n", ret); goto exit; } re...
false
false
false
false
false
0
mainwindow_get_mainwindow(void) { if (mainwin_list && mainwin_list->data) return (MainWindow *)(mainwin_list->data); else return NULL; }
false
false
false
false
false
0
inf_text_gtk_buffer_buffer_get_modified(InfBuffer* buffer) { InfTextGtkBuffer* gtk_buffer; InfTextGtkBufferPrivate* priv; gtk_buffer = INF_TEXT_GTK_BUFFER(buffer); priv = INF_TEXT_GTK_BUFFER_PRIVATE(gtk_buffer); if(priv->buffer != NULL) return gtk_text_buffer_get_modified(priv->buffer); else retur...
false
false
false
false
false
0
qof_query_printParamPath (QofQueryParamList * parmList) { QofQueryParamList *list = NULL; GString *gs = g_string_new ("Param List: "); g_string_append (gs, " "); for (list = parmList; list; list = list->next) { g_string_append (gs, (gchar *) list->data); if (list->next) g...
false
false
false
false
false
0
tReadBlockIndices(FILE *pFile, ULONG *aulBlockDepot, size_t tMaxRec, ULONG ulOffset) { size_t tDone; int iIndex; UCHAR aucBytes[BIG_BLOCK_SIZE]; fail(pFile == NULL || aulBlockDepot == NULL); fail(tMaxRec == 0); /* Read a big block with BBD or SBD indices */ if (!bReadBytes(aucBytes, BIG_BLOCK_SIZE, ulOffset, ...
false
false
false
false
false
0
getbits(UInt * vptr, UInt from, UInt nbits) { UInt wno = (from -1)/BIPEB; UInt word1 = vptr[wno]; UInt shift1 = (from -1)% BIPEB; UInt lbit = shift1 + nbits; UInt word2; if (lbit <= BIPEB) { /* range is all in one word */ word1 <<= BIPEB -lbit; word1 >>= BIPEB - nbits; } else ...
false
false
false
false
false
0
FindFirstInLargest(void) { uint64_t start, firstBlock, lastBlock, segmentSize, selectedSize = 0, selectedSegment = 0; start = 0; do { firstBlock = FindFirstAvailable(start); if (firstBlock != UINT32_C(0)) { // something's free... lastBlock = FindLastInFree(firstBlock); segmentSiz...
false
false
false
false
false
0
PUTDOT(short xx, short yy, byte * cc, byte * cm) { static int oldyy; static int oldyyshifted; byte *oldcc = cc; if (xx < 32) cc += 7 - (xx >> 2); else if (xx > (finit_width - 32)) cc += 7 - ((finit_width - xx) >> 2); // if(cc==oldcc) //make sure that we don't double fade the co...
false
false
false
true
false
1
done(int r) { if(d->busy->isActive() && d->type == 1) { int n = QMessageBox::information(this, tr("Busy"), tr("<qt>Registration has already been submitted, so closing this window will not prevent the registration from happening. Do you still wish to close?</qt>"), tr("&Yes"), tr("&No")); if(n != 0) return; } ...
false
false
false
false
false
0
set_malign(mtmp) struct monst *mtmp; { schar mal = mtmp->data->maligntyp; boolean coaligned; if (mtmp->ispriest || mtmp->isminion) { /* some monsters have individual alignments; check them */ if (mtmp->ispriest) mal = EPRI(mtmp)->shralign; else if (mtmp->isminion) mal = EMIN(mtmp)->min_align; /* unles...
false
false
false
false
false
0
est_db_write_meta(ESTDB *db){ char vbuf[ESTNUMBUFSIZ], *sbuf; int err, ssiz; assert(db); err = FALSE; sprintf(vbuf, "%d", est_idx_num(db->idxdb)); if(!dpput(db->metadb, ESTKEYIDXNUM, -1, vbuf, -1, DP_DOVER)) err = TRUE; sprintf(vbuf, "%d", db->dseq); if(!dpput(db->metadb, ESTKEYDSEQ, -1, vbuf, -1, DP_DO...
false
false
false
false
false
0
switch_realloc (gpointer mem, gsize size) { gpointer p; if (size == 0) { free (mem); return NULL; } if (!mem) { if (seahorse_use_secure_mem) p = gnome_keyring_memory_alloc (size); else p = malloc (size); } else if (gnome_keyring_memory_is_sec...
false
false
false
false
false
0
csio_scsi_cmd(struct csio_ioreq *req) { struct csio_wr_pair wrp; struct csio_hw *hw = req->lnode->hwp; struct csio_scsim *scsim = csio_hw_to_scsim(hw); uint32_t size = CSIO_SCSI_CMD_WR_SZ_16(scsim->proto_cmd_len); req->drv_status = csio_wr_get(hw, req->eq_idx, size, &wrp); if (unlikely(req->drv_status != 0)) r...
false
false
false
false
false
0
show_address(fbuf, id, name, alias) fbuf_t *fbuf; auth_id *id; char *name, *alias; { abook_state astate; abook_fielddata *fetch; int count, i, freedata; if ((fetch = abook_fetch(&astate, id, name, alias, &count, &freedata))) { im_send(fbuf, NULL, msg_fetchaddr, name, alias); for (i = ...
false
false
false
false
false
0
GetAudioBuf() { RtpData *pRtp; u_int16 NextSeqAvailable; NetAudio *pAudio = NULL; if(pInHead != NULL) { pAudio = pInHead; pInHead = pAudio->Link; AudioQCount--; } else if(bRxActive && (pRtp = pRtpQueue) != NULL) { // We're not buffering and there's uncompressed RTP data available...
false
false
false
false
false
0
cs4349_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct cs4349_private *cs4349; int ret; cs4349 = devm_kzalloc(&client->dev, sizeof(*cs4349), GFP_KERNEL); if (!cs4349) return -ENOMEM; cs4349->regmap = devm_regmap_init_i2c(client, &cs4349_regmap); if (IS_ERR(cs4349->regma...
false
false
false
false
false
0
close_detect_launch(evutil_socket_t fd, short what, void *arg) { struct evhttp_connection *evcon = arg; struct event_base *base = evhttp_connection_get_base(evcon); struct evhttp_request *req; req = evhttp_request_new(close_detect_done, base); /* Add the information that we care about */ evhttp_add_header(evhtt...
false
false
false
false
false
0
group_rd(struct lib_context *lc, struct raid_set *rs, struct raid_set **ss, struct raid_dev *rd) { struct via *via = META(rd, via); if (!init_raid_set(lc, rs, rd, VIA_STRIDE(via), VIA_RAID_TYPE(via), handler)) return 0; list_add_sorted(lc, &rs->devs, &rd->devs, dev_sort); switch (VIA_RAID_TYPE(via)) { ...
false
false
false
false
false
0
add_page(pstops_doc_t *doc, /* I - Document information */ const char *label) /* I - Page label */ { pstops_page_t *pageinfo; /* New page info object */ if (!doc->pages) doc->pages = cupsArrayNew(NULL, NULL); if (!doc->pages) { _cupsLangPrintError("EMERG", _("Unable to allocate memory f...
false
false
false
false
false
0
Getword(FILE *fp, int type) { static char buffer[512]; static char *sptr = NULL; if (sptr != NULL) sptr = strtok(NULL, " \t\n"); while (sptr == NULL) { if ((sptr = fgets(buffer, 512, fp)) == NULL) return NULL; if ((sptr = strchr(buffer, '#')) != NULL) *sptr = '\0'; sptr = strtok(buffer...
true
true
false
false
false
1
get_next_visible_pos(long position, int direction) { long pos; if (direction < 0) position--; for (pos = position; pos >= 0 && pos < seq_len; pos += direction){ if (remap->is_visible(pos)) { break; } } return pos<0 || pos>=seq_len ? -1 : pos; }
false
false
false
false
false
0
rpc_destroy_udp_client(struct conn_info *info) { if (!info->client) return; clnt_destroy(info->client); info->client = NULL; return; }
false
false
false
false
false
0
ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai) { int i, err; struct ubi_ainf_volume *av; empty_vtbl_record.crc = cpu_to_be32(0xf116c36b); /* * The number of supported volumes is limited by the eraseblock size * and by the UBI_MAX_VOLUMES constant. */ ubi->vtbl_slots = ubi->leb_si...
false
false
false
false
false
0
OverAddAllNewsgroups(void) { QIOSTATE *qp; int count; char *q,*p; char *line; ARTNUM hi, lo; if ((qp = QIOopen(ActivePath)) == NULL) sysdie("cannot open %s", ActivePath); for (count = 1; (line = QIOread(qp)) != NULL; count++) { if ((p = strchr(line, ' ')) == NULL) { war...
false
false
false
false
false
0
adrbk_get_ae(AdrBk *ab, a_c_arg_t entry_num) { if(!ab || entry_num >= (a_c_arg_t) ab->count) return((AdrBk_Entry *) NULL); return(&ab->arr[entry_num]); }
false
false
false
false
false
0
test_complex_header(const unsigned char *ptr,const char *name) { if (ptr[0] != BERT_SMALL_TUPLE) { test_fail("complex BERT data must be stored in a small tuple"); } switch (ptr[1]) { case 2: case 3: case 4: case 5: break; default: test_fail("invalid small tuple length %u for BERT complex data",p...
false
false
false
false
false
0
editor_font_cb(GtkWidget *button, gpointer data) { const gchar *font_name; Ebook *ebook = (Ebook *) data; font_name = gtk_font_button_get_font_name (GTK_FONT_BUTTON (button)); if (!font_name) { g_warning ("Could not get font name"); return; } gconf_client_set_string(ebook->client, ebook->editor_font.key, fo...
false
false
false
false
false
0
chirp_global_md5(const char *host, const char *path, unsigned char *digest, time_t stoptime) { if(is_multi_path(host)) { char mhost[CHIRP_PATH_MAX]; char mpath[CHIRP_PATH_MAX]; parse_multi_path(path, mhost, mpath); return chirp_multi_md5(mhost, mpath, digest, stoptime); } else if(not_empty(host)) { return c...
false
false
false
false
false
0
mkp_scanner_parse_token (MkpScanner *scanner, AnjutaToken *token, GError **error) { AnjutaToken *first; AnjutaTokenStream *stream; stream = anjuta_token_stream_push (scanner->stream, NULL, token, NULL); first = anjuta_token_stream_get_root (stream); if (scanner->stream != NULL) { /* Pa...
false
false
false
false
false
0
PyvtkImageStencilData_GetNextExtent(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNextExtent"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkImageStencilData *op = static_cast<vtkImageStencilData *>(vp); int temp0; int temp1; int temp2; int temp3; int temp4; int temp5; ...
false
false
false
false
false
0
Identity() { // forget the Pre- and PostMatrix this->PreMatrix = NULL; this->PostMatrix = NULL; this->PreMatrixTransform = NULL; this->PostMatrixTransform = NULL; // delete all the transforms if (this->NumberOfTransforms > 0) { for (int i = 0; i < this->NumberOfTransforms; i++) { vtkT...
false
false
false
false
false
0
getIdxByName(const std::string& name) const { size_t max = std::numeric_limits<size_t>::max(); size_t idx = max; for(size_t i = 0; i < m_alignData.size(); ++i) { if(m_alignData[i].name == name) { if(idx == max) { idx = i; } ...
false
false
false
false
false
0
connection_is_ready_to_write(struct ntb_connection *conn) { return (conn->out_buf.length > 0 || !ntb_list_empty(&conn->ready_objects)); }
false
false
false
false
false
0
OnEvent(const SEvent& event) { if (!IsEnabled || !isVisible() ) return IGUIElement::OnEvent(event); switch(event.EventType) { case EET_GUI_EVENT: switch(event.GUIEvent.EventType) { case EGET_ELEMENT_FOCUSED: if ( !canTakeFocus(event.GUIEvent.Caller)) { Environment->setFoc...
false
false
false
false
false
0
gt_alphabet_to_file(const GtAlphabet *alphabet, const char *indexname, GtError *err) { FILE *al1fp; bool haserr = false; gt_error_check(err); al1fp = gt_fa_fopen_with_suffix(indexname,GT_ALPHABETFILESUFFIX,"wb",err); if (al1fp == NULL) { haserr = true; } if (!haserr) { ...
false
false
false
false
false
0
wacom_handle_model_response(struct wacom *wacom) { int major_v, minor_v, r = 0; char *p; p = strrchr(wacom->data, 'V'); if (p) r = sscanf(p + 1, "%u.%u", &major_v, &minor_v); if (r != 2) major_v = minor_v = 0; switch (wacom->data[2] << 8 | wacom->data[3]) { case MODEL_CINTIQ: /* UNTESTED */ case MODEL_CIN...
false
false
false
false
false
0
create(unsigned int chipset) { switch (chipset & ~0xf) { case 0xc0: case 0xd0: case 0xe0: case 0xf0: case 0x100: return getTargetNVC0(chipset); case 0x50: case 0x80: case 0x90: case 0xa0: return getTargetNV50(chipset); default: ERROR("unsupported target: NV%x\n", chips...
false
false
false
false
false
0
ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb, struct ahc_dma_seg *sg, dma_addr_t addr, bus_size_t len) { int consumed; if ((scb->sg_count + 1) > AHC_NSEG) panic("Too few segs for dma mapping. " "Increase AHC_NSEG\n"); consumed = 1; sg->addr = ahc_htole32(addr & 0xFFFFFFFF); scb->platf...
true
true
false
false
false
1
_policy_zone_layout_splash(E_Border *bd, E_Illume_Config_Zone *cz) { E_Border *parent = NULL; int mw, mh, nx, ny; /* NB: This code is almost exactly the same as the dialog layout code * (_policy_zone_layout_dialog) except for setting a different layer */ // printf("\tLayout Splash: %s\n", bd->client....
false
false
false
false
false
0
save_clicked() { Entry* entry = preset_combo.get_entry(); if (entry) { ustring presetname = entry->get_text(); if (!presetname.empty()) { presets *p_save = new presets(); // Getting all the names vector<string>names_vector = p_save->get_names_xml(dir); // Checking if we already have this name bool ...
false
false
false
false
false
0
paircmp(VALUE_PAIR *one, VALUE_PAIR *two) { int compare; switch (one->operator) { case T_OP_CMP_TRUE: return (two != NULL); case T_OP_CMP_FALSE: return (two == NULL); /* * One is a regex, compile it, print two to a string, * and then do string comparisons. */ case T_OP_REG_EQ: case T_OP_REG_NE: ...
false
false
false
false
false
0
dumpbuf(unsigned char* buf, size_t sz) { static omni_tracedmutex lock; omni_tracedmutex_lock sync(lock); unsigned i; char row[80]; omniORB::logger l; const size_t dumplimit = 128; if (!omniORB::trace(40) && sz > dumplimit) { l << (int)dumplimit << " bytes out of " << (int)sz << "\n"; sz = dumplim...
false
false
false
false
false
0
verify_dir_index(struct fsck_inode_record *inorecptr, struct dinode *inoptr, struct dtreeQelem *this_Qel, int dtindex, uint cookie) { int64_t page_addr; struct dir_table_slot *slot; struct dir_table_slot *table; if (!inorecptr->check_dir_index) return; /* * FIXME: Don't treat ...
false
false
false
false
false
0
ui_mainloop(int loop) { int inmovement = 1; int x, y, b, k; int time; driver->processevents((!inmovement && !uih->inanimation), &x, &y, &b, &k); do { mousetype(uih->play ? REPLAYMOUSE : uih-> inhibittextoutput ? VJMOUSE : NORMALMOUSE); if (...
false
false
false
false
false
0
nouveau_get_hdmi_dev(struct nouveau_drm *drm) { struct pci_dev *pdev = drm->dev->pdev; if (!pdev) { DRM_INFO("not a PCI device; no HDMI\n"); drm->hdmi_device = NULL; return; } /* subfunction one is a hdmi audio device? */ drm->hdmi_device = pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DE...
false
false
false
false
false
0
make_result(List *tlist, Node *resconstantqual, Plan *subplan) { Result *node = makeNode(Result); Plan *plan = &node->plan; if (subplan) copy_plan_costsize(plan, subplan); else { plan->startup_cost = 0; plan->total_cost = cpu_tuple_cost; plan->plan_rows = 1; /* wrong if we have a set-valued fu...
false
false
false
false
false
0
clearSet() { if (myset) for(int i=0;i<256;i++) myset[i]=false; }
false
false
false
false
false
0
cx18_memset_io(struct cx18 *cx, void __iomem *addr, int val, size_t count) { u8 __iomem *dst = addr; u16 val2 = val | (val << 8); u32 val4 = val2 | (val2 << 16); /* Align writes on the CX23418's addresses */ if ((count > 0) && ((unsigned long)dst & 1)) { cx18_writeb(cx, (u8) val, dst); count--; dst++; } i...
false
false
false
false
false
0
inserter(r1,o1,r,o) /* Insert first field in (r1,o1), */ Type r1; /* which is known to begin with */ Int o1; /* an EXT, into row (r,o) */ Type r; Int o; { Text labt = extText(fun(fun(r1))); /* Find the text of the label */ #if DEBUG_TYPES Printf("inserting "); printType(stdout,debugT...
false
false
false
false
false
0
cpl_column_fill_invalid_double_complex(cpl_column *column, double complex code) { const char *fid = "cpl_column_fill_invalid_double_complex"; cpl_type type = cpl_column_get_type(column); cpl_size length = cpl_column_get_size(colu...
false
false
false
true
false
1
gst_xing_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) { GstXingMux *xing; gboolean result; xing = GST_XING_MUX (parent); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEGMENT: if (xing->sent_xing) { GST_ERROR ("Already sent Xing header, dropping NEWSEGMENT event!");...
false
false
false
false
false
0
ctx_clear_notify_call(struct vmci_ctx *context) { if (context->pending_datagrams == 0 && vmci_handle_arr_get_size(context->pending_doorbell_array) == 0) ctx_clear_notify(context); }
false
false
false
false
false
0
animatedShow(Plasma::Direction direction) { if (!Plasma::Theme::defaultTheme()->windowTranslucencyEnabled()) { show(); return; } //copied to not add new api Location location = Desktop; switch (direction) { case Up: location = BottomEdge; break; case Left: ...
false
false
false
false
false
0
soup_session_unqueue_item (SoupSession *session, SoupMessageQueueItem *item) { SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); SoupSessionHost *host; if (item->conn) { if (item->msg->method != SOUP_METHOD_CONNECT || !SOUP_STATUS_IS_SUCCESSFUL (item->msg->status_code)) soup_c...
false
false
false
false
false
0
fizmo_register_screen_interface(struct z_screen_interface *screen_interface) //, z_colour screen_default_foreground_color, //z_colour screen_default_background_color) { z_colour default_colour; if (active_interface != NULL) return -1; default_colour = screen_interface->get_default_foreground_colour(...
false
false
false
false
false
0
ChooseVideoResolution(int current_res) { UI_tMenuItem *menu_array; char (*res_strings)[10]; int num_res = VIDEOMODE_NumAvailableResolutions(); unsigned int i; menu_array = Util_malloc((num_res+1) * sizeof(UI_tMenuItem)); res_strings = Util_malloc(num_res * sizeof(char(*[10]))); for (i = 0; i < num_res; i ++) ...
false
false
false
false
false
0
IsBitwiseOp() const { return value == TOK_DIV || value == TOK_MOD || value == TOK_SHL || value == TOK_SHR || value == TOK_NOT || value == TOK_OR || value == TOK_AND || value == TOK_XOR; }
false
false
false
false
false
0
mgopengl_material(struct mgastk *astk, int mask) { GLfloat f[4]; Material *mat = &astk->mat; #ifdef TRUE_EMISSION static float lmnull = (float) 0; /* LMNULL */ #endif mask &= mat->valid; if (mask & MTF_Kd) kd = mat->kd; if((mask & (MTF_EMISSION|MTF_DIFFUSE|MTF_AMBIENT|MTF_SPECULAR |MTF_SHININES...
false
false
false
false
false
0
chip_intel_8254_pit_out_val_set( struct cpssp *cpssp, unsigned int ch, unsigned int val ) { if (ch == 0) { sig_boolean_or_set(cpssp->port_out0, cpssp, val); } else if (ch == 1) { sig_boolean_or_set(cpssp->port_out1, cpssp, val); } else if (ch == 2) { sig_boolean_or_set(cpssp->port_out2, cpssp, val); } else...
false
false
false
false
false
0
write ( tnstream& stream ) const { stream.writeInt(2); stream.writeInt( size() ); for ( int m = 0; m < size(); m++ ) stream.writeInt ( at(m) ); }
false
false
false
false
false
0
empty_intersection( const atomList_t &alist ) const { for( size_t i = 0; i < alist.size(); ++i ) if( find( alist.atom( i ) ) ) return( false ); return( true ); }
false
false
false
false
false
0
max310x_reg_precious(struct device *dev, unsigned int reg) { switch (reg & 0x1f) { case MAX310X_RHR_REG: case MAX310X_IRQSTS_REG: case MAX310X_SPCHR_IRQSTS_REG: case MAX310X_STS_IRQSTS_REG: return true; default: break; } return false; }
false
false
false
false
false
0
augment(double height) const { size_t NV=mVertices.size(); size_t NF=mFaces.size(); vector<TPoint3D> vertices(NV+NF); std::copy(mVertices.begin(),mVertices.end(),vertices.begin()); size_t tnf=0; for (vector<TPolyhedronFace>::const_iterator it=mFaces.begin();it!=mFaces.end();++it) tnf+=it->vertices.size(); vector...
false
false
false
false
false
0
rio_open (struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); void __iomem *ioaddr = np->ioaddr; const int irq = np->pdev->irq; int i; u16 macctrl; i = request_irq(irq, rio_interrupt, IRQF_SHARED, dev->name, dev); if (i) return i; /* Reset all logic functions */ dw16(ASICCtrl + 2, ...
false
false
false
false
false
0
get() { try { DiagnosticContextStack* ptr = getPtr(); if(ptr != NULL && !ptr->empty()) { return ptr->top().fullMessage; } } catch(...) { getLogLog().error(LOG4CPLUS_TEXT("NDC::get()- exception occured")); } return LOG4CPLUS_TEXT(""); }
false
false
false
false
false
0
Update() { std::ofstream os( this->m_FileName.c_str() ); if ( !os.is_open() ) { itkExceptionMacro( "failed openning the output XML file" ); } this->Update( os ); os.close(); }
false
false
false
false
false
0
foldAdjustVisual() { pos_T *start, *end; char_u *ptr; if (!VIsual_active || !hasAnyFolding(curwin)) return; if (ltoreq(VIsual, curwin->w_cursor)) { start = &VIsual; end = &curwin->w_cursor; } else { start = &curwin->w_cursor; end = &VIsual; } if (hasFolding(start->lnum, &s...
false
false
false
false
false
0
CompileNextError(ExState &/*State*/) { if (!CompilerMsgs) return 0; return CompilerMsgs->CompileNextError(this); }
false
false
false
false
false
0
skipToXml() { iDeflated = false; String s1 = readLine(); String s2 = readLine(); if (s1.substr(0, 11) != "%!PS-Adobe-" || s2.substr(0, 17) != "%%Creator: Ipelib") return false; do { s1 = readLine(); if (s1.substr(0, 17) == "%%BeginIpeImage: ") { Lex lex(s1.substr(17)); int num...
false
false
false
false
false
0
put_c_fl(fname, keep) char *fname; int keep; { struct fileparts *fp; fp = fparse(fname); fprintf(curlst, "%s\n", fp->name); if (keep) add_dpnd(src_lkup(cur_src), fname); }
false
false
false
false
false
0
champlain_bounding_box_is_valid (ChamplainBoundingBox *bbox) { g_return_val_if_fail (CHAMPLAIN_BOUNDING_BOX (bbox), FALSE); return (bbox->left < bbox->right) && (bbox->bottom < bbox->top) && (bbox->left > CHAMPLAIN_MIN_LONGITUDE) && (bbox->left < CHAMPLAIN_MAX_LONGITUDE) && (bbox->right > CHAMPLA...
false
false
false
false
false
0
Intlist_append (T list, T tail) { T *p = &list; while (*p) { p = &(*p)->rest; } *p = tail; return list; }
false
false
false
false
false
0
calculate_target(struct lbalance *lb) { unsigned int target; target = best_target(lb); /* Jitter if the adjacent ones are unknown. */ if (target >= lb->max_stats || lb->stats[target].num_stats == 0) return target; if (target + 1 == lb->max_stats || lb->stats[target+1].num_stats == 0) return target + 1; if...
false
false
false
false
false
0
OnFinishedAICHHashing(CHashingEvent& evt) { wxCHECK_RET(evt.GetResult(), wxT("No result of AICH-hashing")); CKnownFile* owner = const_cast<CKnownFile*>(evt.GetOwner()); CScopedPtr<CKnownFile> result(evt.GetResult()); if (result->GetAICHHashset()->GetStatus() == AICH_HASHSETCOMPLETE) { CAICHHashSet* oldSet = o...
false
false
false
false
false
0
ia_change_qos(struct atm_vcc *vcc, struct atm_qos *qos, int flags) { IF_EVENT(printk(">ia_change_qos\n");) return 0; }
false
false
false
false
false
0
compute_data_dependences_for_bb (basic_block bb, bool compute_self_and_read_read_dependences, VEC (data_reference_p, heap) **datarefs, VEC (ddr_p, heap) **dependence_relations) { if (find_data_references_in_bb (NULL, bb...
false
false
false
false
false
0
LoadHistogram(int dbtype) { FILE *fp; int position, i, day; Verbose("LoadHistogram()\n"); if (HISTO) { char filename[CF_BUFSIZE]; switch(dbtype) { case DAILY: snprintf(filename, CF_BUFSIZE, "%s/daily.hist", LOCATION); break; case YEARLY: snprintf(filenam...
true
true
false
false
true
1
get(const Jid &j, const QString &id, int direction, int len) { item_file_req *r = new item_file_req; r->j = j; r->type = item_file_req::Type_get; r->len = len < 1 ? 1: len; r->dir = direction; r->eventId = id.toInt(); r->id = genUniqueId(); d->rlist.append(r); QTimer::singleShot(FAKEDELAY, this, SLOT(performR...
false
false
false
false
false
0
bringForward() { QLanguageItem* languageItem = dynamic_cast<QLanguageItem*>(sender()); if ( !languageItem ) languageItem = mFirstSelectedItem; if ( !languageItem ) return; int index = mZOrderedItems.indexOf( languageItem ); mZOrderedItems.move( index , MIN(mZOrderedItems.size() - 1 , index + 1) ); updateZOrd...
false
false
false
false
false
0
vector_display_value_ulong( ulong** value, /*!< Pointer to vector value array */ int width /*!< Number of elements in value array */ ) { int i, j; /* Loop iterator */ int bits_left = UL_MOD(width - 1); printf( "value: %d'b", width ); for( i=UL_SIZE(width); i--; ) { for( j=bits_left; j>=0; j--...
false
false
false
false
false
0
get_time(char *buf, const size_t len) { struct tm tm; time_t now; now = time(NULL); if (NULL == gmtime_r(&now, &tm)) return false; if (0 == strftime(buf, len, "%y/%m/%d %H:%M:%S", &tm)) return false; return true; }
false
false
false
false
false
0
us_socket_collections_group_select( us_socket_collection_group_t *self, uint64_t cur_time, uint64_t max_sleep_time_in_ms ) { bool r = true; int s; fd_set readable; fd_set writable; int largest_fd = -1; struct timeval tv; FD_ZERO( &readable ); FD_ZERO( &writable ); largest_fd = us_s...
false
false
false
false
false
0
v_tally_thr(Pair * const pair, const int i, const int j, const int nlocal, const int newton_pair, const double * const v, ThrData * const thr) { if (pair->vflag_global) { double * const va = thr->virial_pair; if (newton_pair) { v_tally(va,v); } else ...
false
false
false
false
false
0
inc_account_mail_real(MainWindow *mainwin, PrefsAccount *account) { IncProgressDialog *inc_dialog; IncSession *session; switch (account->protocol) { case A_IMAP4: case A_NNTP: /* Melvin: bug [14] * FIXME: it should return foldeview_check_new() value. * TODO: do it when bug [19] is fixed (IMAP folder sets...
false
false
false
false
false
0
mlmatch_print_results_aux(list_t*res,char* str) { if(res != NULL) { print_chunk((struct chunk_t*)(res->data),str); if(res->next != NULL) printf(","); mlmatch_print_results_aux(res->next,str); } }
false
false
false
false
false
0