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
qmonBrowserOpen(Widget w, XtPointer cld, XtPointer cad) { DENTER(TOP_LAYER, "qmonBrowserOpen"); /* set busy cursor */ XmtDisplayBusyCursor(w); if (!BrowserShell) { BrowserShell = qmonBrowserCreateDialog(AppShell, "Qmon Object Browser"); /* ** set the close button callback ** ...
false
false
false
false
false
0
hasTransparency( const Surface& surf ) { if ( surf.GetPixelFormat().BytesPerPixel() == 4 ) { const Uint32* p = (const Uint32*) surf.pixels(); int aMask = surf.GetPixelFormat().Amask(); int aShift = surf.GetPixelFormat().Ashift(); for ( int y = 0; y < surf.h() ; ++y ) { for ( int x = ...
false
false
false
false
false
0
skip_to_plain_text(char *start) { while ( *start=='<' || isspace(*start)) { if ( *start=='<' ) { while( *start!='\0' && *start!='>' ) { if ( *start=='"' || *start=='\'' ) { char ch = *start; ++start; while ( *start!='\0' && *start!=ch ) ++start; if ( *start==ch ) ++start; } els...
false
false
false
false
false
0
cmd_reflog_expire(int argc, const char **argv, const char *prefix) { struct cmd_reflog_expire_cb cb; unsigned long now = time(NULL); int i, status, do_all; git_config(reflog_expire_config); save_commit_buffer = 0; do_all = status = 0; memset(&cb, 0, sizeof(cb)); if (!default_reflog_expire_unreachable) defa...
false
false
false
false
false
0
acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock) { acpi_status status; status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER); if (ACPI_FAILURE(status)) { return (status); } /* Acquire the write lock only for the first reader */ lock->num_readers++; if (lock->num_readers == 1) { status ...
false
false
false
false
false
0
imap_set_flags( store_t *gctx, message_t *msg, int uid, int add, int del, void (*cb)( int sts, void *aux ), void *aux ) { imap_store_t *ctx = (imap_store_t *)gctx; if (msg) { uid = msg->uid; add &= ~msg->flags; del &= msg->flags; msg->flags |= add; msg->flags &= ~del; } if (add || del) { ...
false
false
false
false
false
0
kmo_debug_header(const cpl_propertylist *header) { int i = 0; const cpl_property *p = NULL; cpl_type t; cpl_error_code ret_error = CPL_ERROR_NONE; KMO_TRY { cpl_msg_debug("", "===== START HEADER ====="); if (header == NULL) { ...
false
false
false
false
false
0
create_battery_widget (GtkWidget * hbox_displays) { if (!battery_get_values ()) return; if (NULL == drawing_battery) { GtkWidget *alignment3; drawing_battery = gtk_drawing_area_new (); gtk_drawing_area_size (GTK_DRAWING_AREA (drawing_battery), 27, 52); frame_battery = gtk_frame_new...
false
false
false
false
false
0
unregister_each (MessageIdentifier *identifier, GType *gtype, UnregisterInfo *info) { if (g_strcmp0 (identifier->object_path, info->object_path) == 0) { gedit_message_bus_unregister_real (info->bus, identifier->object_path, ...
false
false
false
false
false
0
wr_char(int c) { int rc; db(4, "Sending: %02x '%c'\n", (unsigned)c, isprint(c) ? c : '.'); if (rc = gbser_writec(serial_handle, c), gbser_OK != rc) { fatal(MYNAME ": Write error (%d)\n", rc); } }
false
false
false
false
false
0
launchWriter(TeeWiggleIteratorData * data) { // Initialize variables data->count = 0; data->done = false; pthread_cond_init(&data->continue_cond, NULL); pthread_mutex_init(&data->continue_mutex, NULL); data->dataBlocks = data->lastBlock = (BlockData*) calloc(1, sizeof(BlockData)); data->lastBlock->bedGraph = dat...
false
false
false
false
false
0
print() { if (is_rename() && is_move()) { printf("Moved the %s \"%s\" in the folder \"%s\" to the folder \"%s\" with the name \"%s\".\n", get_type_name().c_str(), get_name(old_path).c_str(), path_to_string(get_parent(old_path)).c_str(), path_to_string(get_parent(new_path)).c_str(), ...
false
false
false
false
false
0
is_presorted (table, elems) char **table; int elems; /* Checks whether the textual entries in `&table[]' are presorted in ascending sort order. Returns TRUE if the entries in `table' are presorted, otherwise FALSE. */ { if (--elems > 0) { register int i = 0; register int j = ...
false
false
false
false
false
0
break_out_comdat_types (dw_die_ref die) { dw_die_ref c; dw_die_ref first; dw_die_ref prev = NULL; dw_die_ref next = NULL; dw_die_ref unit = NULL; first = c = die->die_child; if (c) next = c->die_sib; if (c) do { if (prev == NULL || prev->die_sib == c) prev = c; c = next; next = (c...
false
false
false
false
false
0
tofixedstring(int w,int i) { // use a fixed width integer output - prefixed with 0 if needs be. ostringstream ost; ost.flags ( ios::right | ios::dec | ios::showbase | ios::fixed ); ost.fill('0'); ost << setw(w) << i; return ost.str(); }
false
false
false
false
false
0
THDiskFile_seekEnd(THFile *self) { THDiskFile *dfself = (THDiskFile*)(self); THArgCheck(dfself->handle != NULL, 1, "attempt to use a closed file"); if(fseek(dfself->handle, 0L, SEEK_END) < 0) { dfself->file.hasError = 1; if(!dfself->file.isQuiet) THError("unable to seek at end of file"); } }
false
false
false
false
false
0
QR_solve (gretl_matrix *a, gretl_matrix *b, integer m, integer n, integer nrhs, integer ldb) { char trans = 'N'; integer info; integer lda = m; integer lwork = -1; double *work; int err = 0; if (m > n && is_block_matrix(b)) { matrix_block_error("QR solve"); return E_DATA; ...
false
false
false
false
false
0
update_back_map(ptr<expr> e, ptr<expr> de, gen_map eg, gen_type gm, bool& did_inc) { assert(!e->back().empty() && !de->back().empty() && "backtrack set never empty"); gen_map deg; gen_set deb = de->back(); auto debt = deb.begin(); auto egt = eg.begin(); // Only copy ma...
false
false
false
false
false
0
fill_data_attribute (CK_ATTRIBUTE *attr, gconstpointer data, gsize length) { if (!attr->pValue) { attr->ulValueLen = length; return CKR_OK; } else if (attr->ulValueLen < length) { attr->ulValueLen = length; return CKR_BUFFER_TOO_SMALL; } else { ...
false
false
false
false
false
0
openfile_c(char *filename, int filetype, int fileaccess) { z_file *result; int access_index; if ((result = malloc(sizeof(z_file))) == NULL) return NULL; if (fileaccess == FILEACCESS_READ) access_index = 0; else if (fileaccess == FILEACCESS_WRITE) access_index = 1; else if (fileaccess == FILEAC...
false
false
false
false
false
0
gen_dump(Entry * head, FILE * fp) { Entry *entry; fprintf(fp, "static void\n" "dump_config(StoreEntry *entry)\n" "{\n" ); for (entry = head; entry != NULL; entry = entry->next) { assert(entry->loc != NULL); if (strcmp(entry->loc, "none") == 0) continue; if (strcmp(entry->name, "comment") == 0) ...
false
false
false
false
false
0
_opt_batch_script(const char * file, const void *body, int size) { char *magic_word1 = "#SBATCH"; char *magic_word2 = "#SLURM"; int magic_word_len1, magic_word_len2; int argc; char **argv; void *state = NULL; char *line; char *option; char *ptr; int skipped = 0, warned = 0, lineno = 0; int i; magic_word_le...
false
false
false
false
false
0
JimParseListQuote(struct JimParserCtx *pc) { pc->p++; pc->len--; pc->tstart = pc->p; pc->tline = pc->linenr; pc->tt = JIM_TT_STR; while (pc->len) { switch (*pc->p) { case '\\': pc->tt = JIM_TT_ESC; if (--pc->len == 0) { ...
false
false
false
false
false
0
http_bad_header_test(void) { struct evkeyvalq headers; fprintf(stdout, "Testing HTTP Header filtering: "); TAILQ_INIT(&headers); if (evhttp_add_header(&headers, "One", "Two") != 0) goto fail; if (evhttp_add_header(&headers, "One\r", "Two") != -1) goto fail; if (evhttp_add_header(&headers, "One", "Two") !...
false
false
false
false
false
0
tsl2x7x_prox_cal(struct iio_dev *indio_dev) { int prox_history[MAX_SAMPLES_CAL + 1]; int i; struct tsl2x7x_prox_stat prox_stat_data[2]; struct tsl2x7x_prox_stat *calP; struct tsl2X7X_chip *chip = iio_priv(indio_dev); u8 tmp_irq_settings; u8 current_state = chip->tsl2x7x_chip_status; if (chip->tsl2x7x_settings....
false
false
false
false
false
0
pygi_source_scanner_get_comments (PyGISourceScanner *self) { GSList *l, *comments; PyObject *list; int i = 0; comments = gi_source_scanner_get_comments (self->scanner); list = PyList_New (g_slist_length (comments)); for (l = comments; l; l = l->next) { GISourceComment *comment = l->data; P...
false
false
false
false
false
0
T_Light(light_t * light) { if (light->count) { light->count--; return; } switch (light->type) { case LITE_FADE: light->sector->lightlevel = ((light->sector->lightlevel << FRACBITS) + light->value2) >> FRACBITS; if (ligh...
false
false
false
false
false
0
applyCuts( const OsiCuts & cs, double effectivenessLb ) { OsiSolverInterface::ApplyCutsReturnCode retVal; int i; // Loop once for each column cut for ( i=0; i<cs.sizeColCuts(); i ++ ) { if ( cs.colCut(i).effectiveness() < effectivenessLb ) { retVal.incrementIneffective(); continue; } i...
false
false
false
false
false
0
ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) { QString qstr; int gmt; QDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt); qstr = KGlobal::locale()->formatDateTime(qdt, KLocale::LongDate, true); if (gmt) { qstr += ' '; qstr += i18n("GMT"); } return qstr; }
false
false
false
false
false
0
h5tools_close(void) { H5E_auto2_t tools_func; void *tools_edata; if (h5tools_init_g) { /* special case where only data is output to stdout */ if((rawoutstream == NULL) && rawdatastream && (rawdatastream == stdout)) HDfprintf(rawdatastream, "\n"); H5...
false
false
false
false
false
0
assign_source(CONTROLLER_SOURCE* obj) { if (init_called_rep == true && source != obj) init(); source = obj; }
false
false
false
false
false
0
clearEntries(ProfilerObject *pObj) { RotatingTree_Enum(pObj->profilerEntries, freeEntry, NULL); pObj->profilerEntries = EMPTY_ROTATING_TREE; /* release the memory hold by the ProfilerContexts */ if (pObj->currentProfilerContext) { free(pObj->currentProfilerContext); pObj->currentProfiler...
false
false
false
false
false
0
UD_cb_query(const char * link_name, const void *udata, size_t udata_size, void *buf, size_t buf_size) { if(!link_name) TEST_ERROR if(udata_size > 0 && !udata) TEST_ERROR if(HDstrcmp(link_name, UD_CB_LINK_NAME)) TEST_ERROR if(HDstrcmp((const char *)udata, UD_CB_TARGET)) TEST_ERROR if(udata_size ...
false
false
false
false
false
0
missing_arg (opt_index) size_t opt_index; { const char *opt_text = cl_options[opt_index].opt_text; switch (cl_options[opt_index].opt_code) { case OPT_Wformat_eq: case OPT_d: case OPT_fabi_version: case OPT_fbuiltin_: case OPT_fdump: case OPT_fname_mangling: case OPT_ftabstop: ...
false
false
false
false
false
0
mpn_tracen (const char *name, int num, mp_srcptr ptr, mp_size_t size) { if (name != NULL && name[0] != '\0') { printf (name, num); putchar ('='); } mpn_trace (NULL, ptr, size); }
false
false
false
false
false
0
SetUp(vecrec **Comp) { /* sets up the compatibility matrix */ long i, j; if (printcomp) { if (Factors) fprintf(outfile, " (For original multistate characters)\n"); fprintf(outfile, "Character Compatibility Matrix (1 if compatible)\n"); fprintf(outfile, "--------- ------------- ------ -- --...
false
false
false
false
false
0
Insert_attributes(DBFHandle hDBFHandle, int row) { int i,num_fields; char val[1024]; char *escval; num_fields = DBFGetFieldCount( hDBFHandle ); for( i = 0; i < num_fields; i++ ) { if(DBFIsAttributeNULL( hDBFHandle, row, i)) { if(dump_format) { printf("\\N"); //printf("\t"); }...
false
false
false
false
false
0
getModelObject(int index, objectType type, bool only_active) const { int count = modelData->modelObjects->size(); if (index < 0 || index >= count ) return NULL; int counter = -1; for (int i = 0; i < count; i++) { ModelObject* obj = (*modelData->modelObjects)[i]; if ( obj != NULL && obj->getObjectTyp...
false
false
false
false
false
0
triton_context_call(struct triton_context_t *ud, void (*func)(void *), void *arg) { struct _triton_context_t *ctx; struct _triton_ctx_call_t *call = mempool_alloc(call_pool); int r; if (!call) return -1; if (ud) ctx = (struct _triton_context_t *)ud->tpd; else ctx = (struct _triton_context_t *)default_ctx....
false
false
false
false
false
0
Delete (void* p) { register AList* e; e = Find(p); if (e != nil) { Remove(e); delete e; } }
false
false
false
false
false
0
vnc_connection_audio_timer(gpointer opaque) { VncConnection *conn = opaque; VncConnectionPrivate *priv = conn->priv; priv->audio_timer = 0; if (!priv->audio_sample) return FALSE; VNC_DEBUG("Audio tick %u\n", priv->audio_sample->length); if (priv->audio) vnc_audio_playback_data...
false
false
false
false
false
0
construct_fastq_entry(FILE *fp, char *name, char *bases, uint8_t *quality, int nbases) { register int j; uint8_t quality_char; /* print out the name/sequence blocks */ fprintf(fp, "@%s\n%s\n+%s\n...
false
false
false
false
false
0
update_field(Field *field) { int i, j, k; int lines = 0; int is_full_line; for (i = 0; i < FIELD_HEIGHT; ++i) { is_full_line = 1; for (j = 0; j < FIELD_WIDTH; ++j) { if(!(*field)[i][j]){ is_full_line = 0; break; } } if(is_full_line) { lines++; for (k = i; k > 0; --k) { for (j = 0; ...
false
false
false
false
false
0
gm_world_text_view_button_press_event(GtkWidget *widget, GdkEventButton *event) { GtkTextView *text_view = GTK_TEXT_VIEW(widget); GmWorldTextView *view = GM_WORLD_TEXT_VIEW(widget); GtkTextIter start, end; GtkTextBuffer *buffer = gtk_text_view_get_buffer(text_view); GtkTextTag *tag; gint x, y; if (event->bu...
false
false
false
false
false
0
fromName( const QString &name ) { instance(); // ensure that we have an instance with the default factories foreach( Dynamic::AbstractBiasFactory* fac, s_biasFactories ) { if( name == fac->name() ) return fac->createBias(); } return Dynamic::BiasPtr( new ReplacementBias( name ) )...
false
false
false
false
false
0
P_Display_Vendor (Object d) { register char *s; Object ret, name; GC_Node; Check_Type (d, T_Display); s = ServerVendor (DISPLAY(d)->dpy); name = Make_String (s, strlen (s)); GC_Link (name); ret = Cons (Null, Make_Integer (VendorRelease (DISPLAY(d)->dpy))); Car (ret) = name; GC_U...
false
false
false
false
false
0
gt_size_of_sort_workspace (const Sfxstrategy *sfxstrategy) { size_t sumsize = 0; if (!sfxstrategy->cmpcharbychar) { sumsize += sizeof (GtCountingsortinfo) * sfxstrategy->maxcountingsort; if (sfxstrategy->maxwidthrealmedian >= MINMEDIANOF9WIDTH) { sumsize += sizeof (GtMedianinfo) * sfxstrategy->...
false
false
false
false
false
0
engine_get_screen_pos( int mx, int my, int *sx, int *sy ) { int x = map_sx, y = map_sy; /* this is the starting position if x-pos of first tile on screen is not odd */ /* if it is odd we must add the y_offset to the starting position */ if ( ODD( map_x ) ) y += hex_y_offset; /* reduce to vis...
false
false
false
false
false
0
skip_extension(bgav_input_context_t * input) { uint8_t u_8; bgav_input_skip(input, 2); while(1) { if(!bgav_input_read_data(input, &u_8, 1)) return; if(!u_8) return; else bgav_input_skip(input, u_8); } }
false
false
false
false
false
0
tor_get_exit_code(const process_handle_t *process_handle, int block, int *exit_code) { #ifdef _WIN32 DWORD retval; BOOL success; if (block) { /* Wait for the process to exit */ retval = WaitForSingleObject(process_handle->pid.hProcess, INFINITE); if (retval != WAIT_OBJECT_0) { ...
false
false
false
false
false
0
estimate_edge_devirt_benefit (struct cgraph_edge *ie, int *size, int *time, int prob, VEC (tree, heap) *known_vals, VEC (tree, heap) *known_binfos) { tree target; int time_diff, size_diff; if (!known_vals && !known_binfos) return; target = ipa_get_indirect_edge_target (ie, known...
false
false
false
false
false
0
approximate_joinrel_size(PlannerInfo *root, Relids relids) { double rowcount = 1.0; int relid; relid = -1; while ((relid = bms_next_member(relids, relid)) >= 0) { RelOptInfo *rel; /* Paranoia: ignore bogus relid indexes */ if (relid >= root->simple_rel_array_size) continue; rel = root->simple_rel_a...
false
false
false
false
false
0
RelinkPageListInChunkOrder(PagedSpace* space, Page** first_page, Page** last_page, Page** last_page_in_use) { Page* first = NULL; Page* last = NULL; for (int i = 0, l...
false
false
false
false
false
0
remove_group_types_from_list (char **group_types, GList *mime_types) { GList *l, *next; char **group_type; char *mime_type; group_type = group_types; while (*group_type != NULL) { for (l = mime_types; l != NULL; l = next) { mime_type = l->data; next = l->next; if (strcmp (mime_type, *group_type) == 0)...
false
false
false
false
false
0
layout() { ASSERT(needsLayout()); // Arbitrary affine transforms are incompatible with LayoutState. /*canvas()->disableLayoutState();*/ /*IntRect oldBounds; IntRect oldOutlineBox; bool checkForRepaint = checkForRepaintDuringLayout() && selfWillPaint(); if (checkForRepaint) { oldBou...
false
false
false
false
false
0
get_card_status(struct mmc_card *card, u32 *status, int retries) { struct mmc_command cmd = {0}; int err; cmd.opcode = MMC_SEND_STATUS; if (!mmc_host_is_spi(card->host)) cmd.arg = card->rca << 16; cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC; err = mmc_wait_for_cmd(card->host, &cmd, retries); if (err ...
false
false
false
false
false
0
gtk_widget_get_translation_to_window (GtkWidget *widget, GdkWindow *window, int *x, int *y) { GdkWindow *w, *widget_window; if (! gtk_widget_get_has_window (widget)) { GtkAllocati...
false
false
false
false
false
0
cp_parser_omp_parallel (cp_parser *parser, cp_token *pragma_tok) { enum pragma_kind p_kind = PRAGMA_OMP_PARALLEL; const char *p_name = "#pragma omp parallel"; tree stmt, clauses, par_clause, ws_clause, block; unsigned int mask = OMP_PARALLEL_CLAUSE_MASK; unsigned int save; location_t loc = cp_lexer_peek_tok...
false
false
false
false
false
0
gnuplot_process_file (gretlopt opt, PRN *prn) { const char *inname = get_optval_string(GNUPLOT, OPT_D); FILE *fp, *fq; int err = 0; if (inname == NULL && *inname == '\0') { return E_DATA; } fp = gretl_fopen(inname, "r"); if (fp == NULL) { return E_FOPEN; } fq = open_plot_input_f...
false
false
true
true
false
1
lx_graphics_disable(struct fb_info *info) { struct lxfb_par *par = info->par; unsigned int val, gcfg; /* Note: This assumes that the video is in a quitet state */ write_vp(par, VP_A1T, 0); write_vp(par, VP_A2T, 0); write_vp(par, VP_A3T, 0); /* Turn off the VGA and video enable */ val = read_dc(par, DC_GENER...
false
false
false
false
false
0
notifylist_print(NOTIFYLIST_REC *rec) { char *ircnets; ircnets = rec->ircnets == NULL ? NULL : g_strjoinv(",", rec->ircnets); printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_NOTIFY_LIST, rec->mask, ircnets != NULL ? ircnets : "", rec->away_check ? "-away" : ""); g_free_not_null(ircnets); }
false
false
false
false
false
0
ti_bandgap_add_hyst(struct ti_bandgap *bgp, int adc_val, int hyst_val, u32 *sum) { int temp, ret; /* * Need to add in the mcelsius domain, so we have a temperature * the conv_table range */ ret = ti_bandgap_adc_to_mcelsius(bgp, adc_val, &temp); if (ret < 0) return ret; temp += hyst_val; ret = ti_ban...
false
false
false
false
false
0
click_hook_get_short_app_id (ClickHook* self, const gchar* package, const gchar* app_name, GError** error) { gchar* result = NULL; gboolean _tmp0_ = FALSE; const gchar* _tmp1_ = NULL; gboolean _tmp2_ = FALSE; gboolean _tmp5_ = FALSE; const gchar* _tmp8_ = NULL; const gchar* _tmp9_ = NULL; const gchar* _tmp10_ =...
false
false
false
false
false
0
sci_res_read_entry(byte *buf, resource_t *res, int sci_version) { res->id = buf[0] | (buf[1] << 8); res->type = SCI0_RESID_GET_TYPE(buf); res->number = SCI0_RESID_GET_NUMBER(buf); res->status = SCI_STATUS_NOMALLOC; if (sci_version == SCI_VERSION_01_VGA_ODD) { res->file = SCI01V_RESFILE_GET_FILE(buf + 2); res-...
false
false
false
false
false
0
falcon_mask_status_intr ( struct efab_nic *efab, int enable ) { efab_dword_t reg; if ( efab->pci_revision < FALCON_REV_B0 ) return; /* Flush the ISR */ if ( enable ) falcon_xmac_readl ( efab, &reg, FCN_XM_MGT_INT_REG_MAC_B0 ); EFAB_POPULATE_DWORD_2 ( reg, FCN_XM_MSK_RMTFLT, !enable, FCN_XM_MSK_LCLF...
false
false
false
false
false
0
afr_sh_data_pick_algo (call_frame_t *frame, xlator_t *this) { afr_private_t * priv = NULL; struct afr_sh_algorithm * algo = NULL; afr_local_t * local = NULL; afr_self_heal_t * sh = NULL; priv = this->private; local = frame->local; ...
false
false
false
false
false
0
loc_strablgetword() { char *BeginWord; char *EndWord; char SwapChar; BeginWord = AblScanString; loc_strablendword(); EndWord = AblScanString; if ( BeginWord == EndWord ) { return( (char *)0 ); } SwapChar = *EndWord; *EndWord = '\0'; BeginWord = namealloc( BeginWord ); *EndWord = Sw...
false
false
false
false
false
0
saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std) { struct saa711x_state *state = to_state(sd); /* Prevent unnecessary standard changes. During a standard change the I-Port is temporarily disabled. Any devices reading from that port can get confused. Note that s_std is also used to switch from ...
false
false
false
false
false
0
read_dvb(bgav_input_context_t* ctx, uint8_t * buffer, int len) { dvb_priv_t * priv; struct dvb_frontend_event event; int ret = 0; int result; struct pollfd pfd[1]; priv = ctx->priv; /* Flush events */ while (ioctl(priv->fe_fd, FE_GET_EVENT, &event) != -1); pfd[0].fd = pr...
false
false
false
false
false
0
w83627hf_set_bank(struct w83627hf_data *data, u16 reg) { if ((reg & 0x00f0) == 0x50) { outb_p(W83781D_REG_BANK, data->addr + W83781D_ADDR_REG_OFFSET); outb_p(reg >> 8, data->addr + W83781D_DATA_REG_OFFSET); } }
false
false
false
false
false
0
hard_c_str() const { // See also c_str(). // We may already have a '\0' in the right place. If _memo has no // capacity, then this is one of the special strings (null or // stable). We are guaranteed, in these strings, that _data[_length] // exists. Otherwise must check that _data[_length] exists. ...
false
false
false
false
false
0
WriteDataToDisk(const char *applicationDirectory) { char fullPath[512]; unsigned i,j; for (i=0; i < fileList.Size(); i++) { strcpy(fullPath, applicationDirectory); FixEndingSlash(fullPath); strcat(fullPath,fileList[i].filename.C_String()); // Security - Don't allow .. in the filename anywhere...
false
false
false
false
false
0
notifier_add_vio(struct hvc_struct *hp, int data) { struct port *port; port = find_port_by_vtermno(hp->vtermno); if (!port) return -EINVAL; hp->irq_requested = 1; resize_console(port); return 0; }
false
false
false
false
false
0
ReadFileTable() /* * FUNCTION: Reads the file table from the cabinet file * RETURNS: * Status of operation */ { ULONG i; ULONG Status; ULONG BytesRead; PCFFILE_NODE File; DPRINT(MAX_TRACE, ("Reading file table at absolute offset (0x%X).\n", (UINT)CABHeader.FileTableOffset)); /*...
false
false
false
false
false
0
ZmodF_inverse_butterfly_2exp(ZmodF_t* a, ZmodF_t* b, ZmodF_t* z, unsigned long s, unsigned long n) { FLINT_ASSERT(s < n*FLINT_BITS); FLINT_ASSERT(*a != *b); FLINT_ASSERT(*b != *z); FLINT_ASSERT(*a != *z); unsigned long bits = s & (FLINT_BITS - 1); if (bits) // ...
false
false
false
false
false
0
get_modulename(const char *filename) { int i; if(strncmp(filename, MODULEPREFIX, MODULEPREFIXLEN) != 0) return NULL; filename += MODULEPREFIXLEN; for(i = 0; filename[i] && filename[i] != '.'; i++); if(strcmp(filename + i, ".so") != 0) return NULL; return av_strndup(filen...
false
false
false
false
false
0
acpi_cpufreq_blacklist(struct cpuinfo_x86 *c) { /* Intel Xeon Processor 7100 Series Specification Update * http://www.intel.com/Assets/PDF/specupdate/314554.pdf * AL30: A Machine Check Exception (MCE) Occurring during an * Enhanced Intel SpeedStep Technology Ratio Change May Cause * Both Processor Cores to Loc...
false
false
false
false
false
0
udp_encap_report(struct transport *t) { struct udp_transport *u = (struct udp_transport *)t; char *src, *dst; in_port_t sport, dport; if (sockaddr2text(u->src, &src, 0)) goto ret; sport = sockaddr_port(u->src); if (!u->dst || sockaddr2text(u->dst, &dst, 0)) dst = 0; dport = dst ? sockaddr_port(u->dst) : 0...
false
false
false
false
false
0
mark_jump_label (rtx x, rtx insn, int in_mem) { RTX_CODE code = GET_CODE (x); int i; const char *fmt; switch (code) { case PC: case CC0: case REG: case CONST_INT: case CONST_DOUBLE: case CLOBBER: case CALL: return; case MEM: in_mem = 1; break; case SY...
false
false
false
false
false
0
year() const { if( m_year ) return YearPtr::staticCast( m_year ); else return Meta::YearPtr( new DefaultYear() ); }
false
false
false
false
false
0
setHTML() { QString text; // the cyclist... text += QString("<center><h3>Cyclist: \"%1\"</h3></center><br>").arg(home.dirName()); // version info text += "<center><h3>Version Info</h3></center>"; text += versionHTML(); // metric log... text += "<center><h3>Metric Log</h3></center>"; ...
false
false
false
false
false
0
_Destroy_GCIO ( GCExportFileH** hGXT, int delFile ) { if( delFile && GetGCMode_GCIO(*hGXT)==vWriteAccess_GCIO ) { VSIFClose(GetGCHandle_GCIO(*hGXT)); SetGCHandle_GCIO(*hGXT, NULL); VS...
false
false
false
false
false
0
search_result_remove_item(SearchData *sd, MatchFileData *mfd, GtkTreeIter *iter) { GtkTreeModel *store; if (!mfd || !iter) return; store = gtk_tree_view_get_model(GTK_TREE_VIEW(sd->result_view)); tree_view_move_cursor_away(GTK_TREE_VIEW(sd->result_view), iter, TRUE); gtk_list_store_remove(GTK_LIST_STORE(store)...
false
false
false
false
false
0
html_safe ( gchar * text ) { gboolean start = 1; if ( ! text || ! strlen(text)) return; for ( ; * text; text ++ ) { switch ( * text ) { case ' ': if ( start ) fprintf ( html_out, "&nbsp;" ); else fprintf ( html_out, "%c", *text ); break; case '&': fprintf ( html_out...
false
false
false
false
false
0
line_contents(const unicode_char *txt, size_t txt_size, void *arg) { while (txt_size--) putchar(*txt++); return 0; }
false
false
false
false
false
0
store_summary_schedule_save (CamelStoreSummary *summary) { g_return_if_fail (CAMEL_IS_STORE_SUMMARY (summary)); if (summary->priv->scheduled_save_id != 0) g_source_remove (summary->priv->scheduled_save_id); summary->priv->scheduled_save_id = g_timeout_add_seconds (5, store_summary_save_timeout, summary); }
false
false
false
false
false
0
clear_hash_tab_next (tab, def) struct ident_tab_header *tab; struct tab *def; { if (!def->count) { text = def->name; error_message (6003); } if ((0 == def->l_value_flag) && (0 != def->count)) { text = def->name; error_message (6006); } #if 0 free (def->name); #endif...
false
false
false
false
false
0
disconnect_if_dead(struct connectdata *conn, struct SessionHandle *data) { size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size; if(!pipeLen && !conn->inuse) { /* The check for a dead socket makes sense only if there are no handles in pipeline and the connection i...
false
false
false
false
false
0
ich6_gpio_request(struct gpio_chip *chip, unsigned nr) { /* * Fixups for bits 16 and 17 are necessary on the Intel ICH6/3100 * bridge as they are controlled by USE register bits 0 and 1. See * "Table 704 GPIO_USE_SEL1 register" in the i3100 datasheet for * additional info. */ if (nr == 16 || nr == 17) nr...
false
false
false
false
false
0
freeRotationAllowed(Qt::KeyboardModifiers modifiers) { Q_UNUSED(modifiers); //if ((modifiers & altOrMetaModifier()) == 0) return false; if (!isSelected()) return false; if (this->moveLock()) return false; return rotation45Allowed(); }
false
false
false
false
false
0
division_activated ( GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * col, gpointer userdata ) { GtkTreeIter iter; GtkTreeModel *model; gint no_division, no_sub_division; model = gtk_tree_view_get_model(treeview); if ( gtk_tree_model_get_iter ( model, &iter, ...
false
false
false
false
false
0
tm_workspace_recreate_tags_array(void) { guint i, j; TMWorkObject *w; TMTagAttrType sort_attrs[] = { tm_tag_attr_name_t, tm_tag_attr_file_t , tm_tag_attr_scope_t, tm_tag_attr_type_t, tm_tag_attr_arglist_t, 0}; #ifdef TM_DEBUG g_message("Recreating workspace tags array"); #endif if ((NULL == theWorkspace) || (N...
false
false
false
false
false
0
authdrive() { int i; for (i=0;i < 5;i++) Key1.b[i] = LUkey1[i]; for (i=0;i < 32;i++) { CryptKey1(i,Challenge,&KeyCheck); if (!memcmp(KeyCheck.b,Key1.b,5)) { varient = i; // bitch(BITCHINFO,"Drive authenticated using varient %d",i); return 1; } } bitch(BITCHWARNING,"Unable to determine varient");...
false
false
false
false
false
0
test_entity_instantiation_from_room_id (void) { TplEntity *entity; entity = tpl_entity_new_from_room_id ("my-room-id"); g_assert_cmpstr (tpl_entity_get_identifier (entity), ==, "my-room-id"); g_assert (tpl_entity_get_entity_type (entity) == TPL_ENTITY_ROOM); g_assert_cmpstr (tpl_entity_get_alias (entity), =...
false
false
false
false
false
0
ToWebOOGL(QvState *state) { float x = width.value / 2.0, y = height.value / 2.0, z = depth.value / 2.0; int i; ANNOUNCE(QvCube); OOGLout("# VRML Cube"); OOGLout("{ = OFF"); OOGLout("8 6 12"); for(i = 0; i < 8; i++) { sprintf(out, "%g %g %g", i&1 ? -x : x, i&2 ? -y : y, i&4 ? -z : z); OOGL...
false
false
false
false
false
0
cx25821_initdev(struct pci_dev *pci_dev, const struct pci_device_id *pci_id) { struct cx25821_dev *dev; int err = 0; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (NULL == dev) return -ENOMEM; err = v4l2_device_register(&pci_dev->dev, &dev->v4l2_dev); if (err < 0) goto fail_free; /* pci init */ dev->...
false
false
false
false
false
0
store_current_governor(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { char gov_name[CPUIDLE_NAME_LEN]; int ret = -EINVAL; size_t len = count; struct cpuidle_governor *gov; if (!len || len >= sizeof(gov_name)) return -EINVAL; memcpy(gov_name, buf, len); ...
true
true
false
false
false
1
rc_pair_foreach_source_that_alpha_reads( struct rc_pair_instruction * pair, void * data, rc_pair_foreach_src_fn cb) { unsigned int i; const struct rc_opcode_info * info = rc_get_opcode_info(pair->Alpha.Opcode); for(i = 0; i < info->NumSrcRegs; i++) { pair_foreach_source_callback(pair, data, cb, GET_SWZ...
false
false
false
false
false
0
execute(VM &vm) const { if (vm.overridingStyle) vm.sp[-1] = new (*vm.interp) OverriddenStyleObj((BasicStyleObj *)vm.sp[-1], vm.overridingStyle); return next_.pointer(); }
false
false
false
false
false
0
make_delete_mask(struct arpt_entry *fw) { /* Establish mask for comparison */ unsigned int size; struct arptables_match *m; unsigned char *mask, *mptr; size = sizeof(struct arpt_entry); for (m = arptables_matches; m; m = m->next) { if (!m->used) continue; size += ARPT_ALIGN(sizeof(struct arpt_entry_match...
false
false
false
false
false
0