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_subjectKeyIdentifier(hx509_validate_ctx ctx, struct cert_status *status, enum critical_flag cf, const Extension *e) { SubjectKeyIdentifier si; size_t size; int ret; status->haveSKI = 1; check_Null(ctx, status, cf, e); ret = decode_SubjectKeyIdentifier(e->extnValue.data,...
false
false
false
false
false
0
ptr_assrecv(const struct nihdr *ni, struct remote *rp) { USHORT act = ntohs(ni->code); Hashspq *jp; Hashspptr *pp; struct spr_req rq; struct sp_omsg orq; READ_SOCK(rp, orq); if (!(pp = ver_remptr(ntohl(orq.spr_jpslot), (ULONG) orq.spr_netid))) return; rq.spr_mtype = MT_SCHED; rq.spr_un.o.spr_act = ...
false
false
false
false
false
0
find_corners (pixel_outline_type pixel_outline, fitting_opts_type *fitting_opts, at_exception_type * exception) { unsigned p, start_p, end_p; index_list_type corner_list = new_index_list (); start_p = 0; end_p = O_LENGTH(pixel_outline) - 1; if (pixel_outline.open) { if (end_p <= fitting...
false
false
false
false
true
1
intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) { Q_UNUSED(doc); Q_UNUSED(posInDocument) const QTextCharFormat charFormat = format.toCharFormat(); return IconsetFactory::iconPixmap(charFormat.stringProperty(TextIconFormat::IconName)).size(); }
false
false
false
false
false
0
bng_ff(t_bng *x) { if(x->x_gui.x_fsf.x_rcv_able) pd_unbind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); clock_free(x->x_clock_lck); clock_free(x->x_clock_brk); clock_free(x->x_clock_hld); gfxstub_deleteforkey(x); }
false
false
false
false
false
0
sl811h_timer(unsigned long _sl811) { struct sl811 *sl811 = (void *) _sl811; unsigned long flags; u8 irqstat; u8 signaling = sl811->ctrl1 & SL11H_CTL1MASK_FORCE; const u32 mask = USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE | USB_PORT_STAT_LOW_SPEED; spin_lock_irqsave(&sl811->lock, flags); /* stop...
false
false
false
false
false
0
DisabledEventHandler(event) XEvent *event; { switch(event->type) { case EnterNotify: if (event->xcrossing.window == window) WindowCrossed(TRUE); break; case LeaveNotify: if(event->xcrossing.window == window) WindowCrossed(FALSE); break; case Expose: if (event->xexpose.windo...
false
false
false
false
false
0
DeleteGroup(unsigned int group) { if (group >= m_Groups.GetCount()) return; FileGroups* fg = m_Groups[group]; delete fg; m_Groups.Remove(fg); }
false
false
false
false
false
0
Pad( std::streamsize nBytes) { const std::streamsize bufSize = 1024; static char buf[ bufSize]; SizeT nBuf = nBytes / bufSize; std::streamsize lastBytes = nBytes % bufSize; if( fStream != NULL) { for( SizeT i=0; i<nBuf; ++i) fStream->write( buf, bufSize); if( lastBytes > 0) fStream->write( buf, l...
false
false
false
false
false
0
mark_set_regs (reg, setter, data) rtx reg; rtx setter ATTRIBUTE_UNUSED; void *data ATTRIBUTE_UNUSED; { int regno, endregno, i; enum machine_mode mode = GET_MODE (reg); if (GET_CODE (reg) == SUBREG) { rtx inner = SUBREG_REG (reg); if (GET_CODE (inner) != REG || REGNO (inner) >= FIRS...
false
false
false
false
false
0
unity_webapps_application_collector_search_app_folder (UnityWebappsApplicationCollector *collector, const gchar *app_folder) { gint i; gchar *manifest_path; gboolean ret; UNITY_WEBAPPS_NOTE (APPLICATION_REPOSITORY, "Application collector searching application folder: %s", app_folder); manifest_...
false
false
false
false
false
0
writeBytes(const uint8_t* b, const int32_t length) { if ( length < 0 ) _CLTHROWA(CL_ERR_IllegalArgument, "IO Argument Error. Value must be a positive value."); int32_t bytesLeft = BUFFER_SIZE - bufferPosition; // is there enough space in the buffer? if (bytesLeft >= length) { // we add the data to t...
false
false
false
false
false
0
parse_features (const char *name G_GNUC_UNUSED, const char *arg, gpointer data, GError **error G_GNUC_UNUSED) { shape_options_t *shape_opts = (shape_options_t *) data; char *s = (char *) arg; char *p; shape_opts->num_features = 0; g_free (shape_opts->features); shape_opts->...
false
false
false
false
false
0
parse_lease_time (cfile, timep) struct parse *cfile; TIME *timep; { const char *val; enum dhcp_token token; u_int32_t num; token = next_token (&val, (unsigned *)0, cfile); if (token != NUMBER) { parse_warn (cfile, "Expecting numeric lease time"); skip_to_semi (cfile); return; } convert_num(cfile, (unsig...
false
false
false
false
false
0
parse_file_blocks (int file, BlockFunc block_func, GkmSecret *login, gpointer user_data) { gchar header[FILE_HEADER_LEN]; GkmDataResult res; EggBuffer buffer; guint32 block; guint32 length; gsize offset; g_assert (file != -1); g_assert (block_func); /* Zero length file is valid */ if (!read_all_bytes (file,...
false
false
false
false
false
0
find_sym(void *user_data, const char *name, address_t value) { regex_t *find_preg = (regex_t *)user_data; if (!regexec(find_preg, name, 0, NULL, 0)) printc("0x%04x: %s\n", value, name); return 0; }
false
false
false
false
false
0
slapi_sdn_isempty(const Slapi_DN *sdn) { const char *dn = NULL; if (sdn) { dn = slapi_sdn_get_dn(sdn); } return (dn==NULL || dn[0]=='\0'); }
false
false
false
false
false
0
disp_class_buttons() { enum { BUTTON_X=14, BUTTON_WIDTH=146, CLASS_BUTTON_Y=14, CLASS_BUTTON_Y_SPACING=30, SUBCLASS_BUTTON_Y=236, SUBCLASS_TOP_BORDER=3, BUTTON_Y_SPACING=31 }; int subClassId = sub_class_id_array[main_class_id-1]; if( main_class_id != ENCYC_FRYHTANS ) { vga_back.put_bitmap(12, SUBCLASS_BUTTON...
false
false
false
false
false
0
isns_commit_registration(isns_db_t *db, isns_object_t *key_obj, isns_object_list_t *list) { unsigned int i; /* * If there are any Portal Groups in this registration, build * the relationship handle: * * 3.4 * A new PG object can only be registered by referencing * its associated iSCSI Storage Node or Po...
false
false
false
false
false
0
c_promoting_integer_type_p (const_tree t) { switch (TREE_CODE (t)) { case INTEGER_TYPE: return (TYPE_MAIN_VARIANT (t) == char_type_node || TYPE_MAIN_VARIANT (t) == signed_char_type_node || TYPE_MAIN_VARIANT (t) == unsigned_char_type_node || TYPE_MAIN_VARIANT (t) == short_integer_typ...
false
false
false
false
false
0
Definition (ostream& out) { if(!dot_format()) { out << script_name() << "(" ; Attributes(out); out << ")"; return out.good(); } else { int init=0; NodeComp* comp = (NodeComp*) GetSubject(); const char* selftext = comp->nodename(); #if 0 if (selftex...
false
false
false
false
false
0
get_shared_index(ScmObj obj) { scm_hash_entry *ent; if (l_write_ss_ctx) { ent = hash_lookup(&l_write_ss_ctx->seen, obj, 0, HASH_FIND); if (ent) { if (ent->datum == DEFINING_DATUM) { ent->datum = l_write_ss_ctx->next_index++; return -(ent->datum); ...
false
false
false
false
false
0
ocfs2_write_info(struct super_block *sb, int type) { handle_t *handle; int status = 0; struct ocfs2_mem_dqinfo *oinfo = sb_dqinfo(sb, type)->dqi_priv; status = ocfs2_lock_global_qf(oinfo, 1); if (status < 0) goto out; handle = ocfs2_start_trans(OCFS2_SB(sb), OCFS2_QINFO_WRITE_CREDITS); if (IS_ERR(handle)) { ...
false
false
false
false
false
0
mode(int bits, int fullscreen) { int was_showing = is_showing; hide(); int olddepth = _depth; _depth = bits; if(_depth != olddepth) reload(); _fullscreen = fullscreen; if(was_showing) show(); }
false
false
false
false
false
0
strrepl (wchar_t *s, wchar_t search, wchar_t replace) { ACE_TRACE ("ACE::strrepl"); size_t replaced = 0; for (size_t i = 0; s[i] != '\0'; i++) if (s[i] == search) { s[i] = replace; ++replaced; } return replaced; }
false
false
false
false
false
0
ml_gdome_n_cloneNode(value self, value p_deep) { CAMLparam2(self, p_deep); GdomeException exc_; GdomeNode* res_; res_ = gdome_n_cloneNode(Node_val(self), Bool_val(p_deep), &exc_); if (exc_ != 0) throw_exception(exc_, "Node.cloneNode"); g_assert(res_ != NULL); CAMLreturn(Val_Node(res_)); }
false
false
false
false
false
0
uniform(void) /* Purpose ======= This routine returns a uniform random number between 0.0 and 1.0. Both 0.0 and 1.0 are excluded. This random number generator is described in: Pierre l'Ecuyer Efficient and Portable Combined Random Number Generators Communications of the ACM, Volume 31, Number 6, June 1988, pages 742-...
false
false
false
false
false
0
unit_list_compare(const void *a, const void *b) { const struct unit *punit1 = *(struct unit **)a; const struct unit *punit2 = *(struct unit **)b; if (unit_transport_get(punit1) == unit_transport_get(punit2)) { /* For units with the same transporter or no transporter: sort by id. */ /* Perhaps we should s...
false
false
false
false
false
0
iwl_get_single_channel_number(struct iwl_priv *priv, enum ieee80211_band band) { struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band]; struct iwl_rxon_context *ctx; int i; for (i = 0; i < sband->n_channels; i++) { bool busy = false; for_each_context(priv, ctx) { busy = sband->channels...
false
false
false
false
false
0
PGTYPESdate_from_asc(char *str, char **endptr) { date dDate; fsec_t fsec; struct tm tt, *tm = &tt; int dtype; int nf; char *field[MAXDATEFIELDS]; int ftype[MAXDATEFIELDS]; char lowstr[MAXDATELEN + 1]; char *realptr; char **ptr = (endptr != NULL) ? endptr : &realptr; bool EuroDates =...
true
true
false
false
false
1
AllocateFor(vtkThreadedStreamingPipeline *exec) { if (exec->GetAlgorithm()->IsA("vtkThreadedImageAlgorithm")) { vtkThreadedImageAlgorithm::SafeDownCast(exec->GetAlgorithm()) ->SetNumberOfThreads(this->NumberOfThreads); } }
false
false
false
false
false
0
BIO_open_with_default(const char *file, const char *mode, FILE *default_fp) { return file == NULL ? BIO_new_fp(default_fp, BIO_NOCLOSE) : BIO_new_file(file, mode); }
false
false
false
false
false
0
UpdatePointsRectangle(GtkWidget * widget, int x1, int y1, int x2, int y2) { GdkRectangle updateRect; int x, y, dx = 0, dy = 0; if (bitmap.type != GN_BMP_StartupLogo) { dx = PREVIEWJUMPX; dy = PREVIEWJUMPY; } if (x1 > x2) { x = x1; x1 = x2; x2 = x; } if (y1 > y2) { y = y1; y1 = y2; y2 = y; } ...
false
false
false
false
false
0
update_nmea_rmc(void) { g_string_assign(nmea_rmc, "$GPRMC"); add_nmea_time(nmea_rmc); if (get_fixstatus() > 1) { g_string_append_c(nmea_rmc, ','); g_string_append_c(nmea_rmc, 'A'); } else { g_string_append_c(nmea_rmc, ','); g_string_append_c(nmea_rmc, 'V'); } add_nmea_latitude(nmea_rmc); add_nmea_lon...
false
false
false
false
false
0
Picture_Entry_View_Button_Pressed (GtkTreeView *treeview, GdkEventButton *event, gpointer data) { if (event->type == GDK_BUTTON_PRESS && event->button == 1) { if (event->window == gtk_tree_view_get_bin_window (treeview)) { if (!gtk_tree_view_get_path_at_pos (treeview, event->x, event...
false
false
false
false
false
0
HandleAuraModRoot(bool apply, bool Real) { // only at real add/remove aura if (!Real) return; Unit* target = GetTarget(); if (apply) { // Frost root aura -> freeze/unfreeze target if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_FROST) target->ModifyA...
false
false
false
false
true
1
zipimporter_is_package(PyObject *obj, PyObject *args) { ZipImporter *self = (ZipImporter *)obj; char *fullname; enum zi_module_info mi; if (!PyArg_ParseTuple(args, "s:zipimporter.is_package", &fullname)) return NULL; mi = get_module_info(self, fullname); if (m...
false
false
false
false
false
0
removeBlockItem(BlockItem* blockItem) { // remove the Bonus Items for (int i = 0; i < m_game->getArena()->getNbRows(); ++i) { for (int j = 0; j < m_game->getArena()->getNbColumns(); ++j) { if (m_blockItems[i][j] != NULL && m_blockItems[i][j] == blockItem) { ...
false
false
false
false
true
1
xen_find_free_area(phys_addr_t size) { unsigned mapcnt; phys_addr_t addr, start; struct e820entry *entry = xen_e820_map; for (mapcnt = 0; mapcnt < xen_e820_map_entries; mapcnt++, entry++) { if (entry->type != E820_RAM || entry->size < size) continue; start = entry->addr; for (addr = start; addr < start + ...
false
false
false
false
false
0
GSqsortcmp(GopherObj **gs1, GopherObj **gs2) { if (GSgetTitle(*gs1) == NULL) return(1); if (GSgetTitle(*gs2) == NULL) return(-1); /** No numbering set on either entry, or both numbered entries have the same number **/ if (GSgetNum(*gs1) == GSgetNum(*gs2)) return(strcoll(GS...
false
false
false
false
false
0
insert_cb(Fl_Widget*, void *v) { Fl_Native_File_Chooser fnfc; fnfc.title("Insert file"); fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE); if ( fnfc.show() ) return; EditorWindow *w = (EditorWindow *)v; load_file(fnfc.filename(), w->editor->insert_position()); }
false
false
false
false
false
0
free_vars( VariableList &context, VariableList &vars ) const { for( TermList::const_iterator ti = terms_.begin(); ti != terms_.end(); ++ti ) if( is_variable( *ti ) ) { VariableList::const_iterator vi; // check whether variable is in context for( vi = context.begin(); vi != context.end(); ++vi ) if( *...
false
false
false
false
false
0
uih_setperiodicity(uih_context * c, int periodicity) { c->fcontext->periodicity = periodicity; uih_updatemenus(c, "periodicity"); }
false
false
false
false
false
0
pkinit_identity_prompt(krb5_context context, pkinit_plg_crypto_context plg_cryptoctx, pkinit_req_crypto_context req_cryptoctx, pkinit_identity_opts *idopts, pkinit_identity_crypto_context id_cryptoctx, krb...
false
false
false
false
false
0
gitg_shell_run_sync_with_input_and_outputva (gboolean preserve_line_endings, const gchar *input, gchar ***output, va_list ap, ...
false
false
false
false
false
0
IsExcluded(cmLocalGenerator* root, cmTarget& target) { if(target.GetPropertyAsBool("EXCLUDE_FROM_ALL")) { // This target is excluded from its directory. return true; } else { // This target is included in its directory. Check whether the // directory i...
false
false
false
false
false
0
gsd_wacom_osd_window_adjust_cairo (GsdWacomOSDWindow *osd_window, cairo_t *cr) { double scale, twidth, theight; GdkRectangle *tablet_area = &osd_window->priv->tablet_area; GdkRectangle *screen_area = &osd_window->priv->screen_area; GdkRectangle *monitor_area...
false
false
false
false
false
0
destroy_cb(GtkObject *object, gpointer data) { struct CloseBookWindow *cbw; cbw = g_object_get_data(G_OBJECT(object), "CloseBookWindow"); if (cbw->component_manager_id) { gnc_unregister_gui_component(cbw->component_manager_id); cbw->component_manager_id = 0; } }
false
false
false
false
false
0
makeform() { if (message_form) { message_form->size(410,103); return message_form; } // make sure that the dialog does not become the child of some // current group Fl_Group *previously_current_group = Fl_Group::current(); Fl_Group::current(0); // create a new top level window Fl_Window *w = message_form ...
false
false
false
false
false
0
forget(const output::pointer &op) { for (size_t j = 0; j < ncolumns; ++j) { column_ty *cp = &column[j]; if (cp->content_filter == op) cp->clear(); } while (ncolumns > 0 && !column[ncolumns - 1].content_filter) --ncolumns; }
false
false
false
false
false
0
H5SL_remove(H5SL_t *slist, const void *key) { H5SL_node_t *x; /* Current node to examine */ uint32_t hashval = 0; /* Hash value for key */ void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5SL_remove) /* Check ...
false
false
false
true
false
1
NsTclRegisterFilterObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsInterp *itPtr = arg; int lobjc; Tcl_Obj **lobjv; int when, i; static CONST char *wopt[] = { "prequeue", "preauth", "postauth", "trace", NULL }; enum { PQIdx, PRIdx, ...
false
false
false
false
false
0
make_ber_error_term(ErlNifEnv* env, unsigned int return_code, unsigned int err_pos) { ERL_NIF_TERM reason; ERL_NIF_TERM t; switch (return_code) { case ASN1_TAG_ERROR: reason = enif_make_atom(env, "invalid_tag"); break; case ASN1_LEN_ERROR: case ASN1_INDEF_LEN_ERROR: reason = enif_make_...
false
false
false
false
false
0
_send_msg(struct block_device *block) { if (!block->cntrl) { log_debug("Missing cntrl for dev: %s. Not sending anything.", strstr(block->sysfs_path, "host")); return; } if (block->timestamp != timestamp) { if (block->ibpi != IBPI_PATTERN_FAILED_DRIVE) { log_info("CHANGE %s: from '%s' to '%s'.", bl...
false
false
false
false
false
0
debugctc ( losig_list *headlosig, int niveau ) { losig_list *scanlosig; chain_list *scanctc; chain_list *scanctc2; loctc_list *ptctc; /* Boucle de debuggage */ for( scanlosig = headlosig ; scanlosig ; scanlosig = scanlosig->NEXT ) { if( ! scanlosig->PRCN ...
false
false
false
false
false
0
monthsDifference(const QDate &fromDate, const QDate &toDate) const { if (toDate < fromDate) { return 0 - monthsDifference(toDate, fromDate); } if (toDate == fromDate) { return 0; } int fromYear = q->year(fromDate); int toYear = q->year(toDate); int fromMonth = q->month(from...
false
false
false
false
false
0
category_should_monitor(gpointer key, gpointer value, gpointer user_data) { const scanner_category_t *sc = value; struct scanner_should_monitor_data *data = user_data; if (data->should_monitor) return; if (scanner_category_allows_path(sc->dirs, data->mountpoint)) { data->should_monitor...
false
false
false
false
false
0
PMI_Get_clique_ranks( int ranks[], int length ) { char *env; if (pmi_debug) fprintf(stderr, "In: PMI_Get_clique_ranks\n"); if (ranks == NULL) return PMI_ERR_INVALID_ARG; if (pmi_init == 0) return PMI_FAIL; /* Simple operation without srun */ if ((pmi_jobid == 0) && (pmi_stepid == 0)) { if (length < 1) ...
false
false
false
false
false
0
_copyDropPLangStmt(DropPLangStmt *from) { DropPLangStmt *newnode = makeNode(DropPLangStmt); COPY_STRING_FIELD(plname); COPY_SCALAR_FIELD(behavior); COPY_SCALAR_FIELD(missing_ok); return newnode; }
false
false
false
false
false
0
NewPropertyC ( const Char * name, Int narg, const Char * nams, ObjFunc hdlr ) { Obj getter; Obj setter; Obj tester; Int flag1; Int flag2; Obj ...
false
false
false
false
false
0
str_invert_revert(unsigned char *b, int len) { int i; for (i = 0; i < len; i++) b[i] = invert_revert(b[i]); }
false
false
false
false
false
0
trash_retrieve_files_to_restore_finish (NautilusFileUndoInfoTrash *self, GAsyncResult *res, GError **error) { GHashTable *retval = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (res)); if (retval == NULL) { g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error); } ...
false
false
false
false
false
0
checkDicomFile(const OFFilename &filename, const OFFilename &directory, const OFBool checkFilename) { /* define fileformat object for the DICOM file to be loaded */ DcmFileFormat fileformat; /* call the "real" functi...
false
false
false
false
false
0
char_compare(x, y) object x, y; { int i, j; i = char_code(x); j = char_code(y); if (isLower(i)) i -= 'a' - 'A'; if (isLower(j)) j -= 'a' - 'A'; if (i < j) return(-1); else if (i == j) return(0); else return(1); }
false
false
false
false
false
0
e_cal_backend_store_set_default_timezone (ECalBackendStore *store, icaltimezone *zone) { ECalBackendStoreClass *class; g_return_val_if_fail (E_IS_CAL_BACKEND_STORE (store), FALSE); g_return_val_if_fail (zone != NULL, FALSE); class = E_CAL_BACKEND_STORE_GET_CLASS (store); ...
false
false
false
true
false
1
start_record() { DLOG("\n"); if (running()) { if (is_recording) return; else { stop(); is_record = true; is_recording = true; on_start_record(); return; } } else { is_recording = true; on_start_record(); } }
false
false
false
false
false
0
jas_matrix_destroy(jas_matrix_t *matrix) { if (matrix->data_) { assert(!(matrix->flags_ & JAS_MATRIX_REF)); jas_free(matrix->data_); matrix->data_ = 0; } if (matrix->rows_) { jas_free(matrix->rows_); matrix->rows_ = 0; } jas_free(matrix); }
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); FileProgressDialog *_t = static_cast<FileProgressDialog *>(_o); switch (_id) { case 0: _t->cancel(); break; case 1: _t->...
false
false
false
false
false
0
RegisterEngine(XmppEngine* engine) { if (NULL == engine || NULL != engine_) return XMPP_RETURN_BADARGUMENT; engine->AddStanzaHandler(&stanza_handler_); engine_ = engine; return XMPP_RETURN_OK; }
false
false
false
false
false
0
snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_dev *pci) { if (dmab->area) snd_dma_free_pages(dmab); }
false
false
false
false
false
0
cache_dump_cache(struct mapent_cache *mc) { struct mapent *me; unsigned int i; for (i = 0; i < mc->size; i++) { me = mc->hash[i]; if (me == NULL) continue; while (me) { logmsg("me->key=%s me->multi=%p dev=%ld ino=%ld", me->key, me->multi, me->dev, me->ino); me = me->next; } } }
false
false
false
false
false
0
remove_dup_nonsys_dirs (pfile, head_ptr, end) cpp_reader *pfile; struct search_path **head_ptr; struct search_path *end; { int sysdir = 0; struct search_path *prev = NULL, *cur, *other; for (cur = *head_ptr; cur; cur = cur->next) { if (cur->sysp) { sysdir = 1; for (other = *head_p...
false
false
false
false
false
0
get_clock_event_time(Bit8u cnum) { if (cnum>MAX_COUNTER) { BX_ERROR(("Counter number incorrect in 82C54 read_GATE")); return 0; } return counter[cnum].next_change_time; }
false
false
false
false
false
0
is_in_bounds(glui32 x1, glui32 y1, glui32 width1, glui32 height1, glui32 x2, glui32 y2, glui32 width2, glui32 height2) { return (x1 >= x2 && y1 >= y2 && x1 + width1 <= x2 + width2 && y1 + height1 <= y2 + height2); }
false
false
false
false
false
0
execute(char *args) { int j = 1; for (list<string>::iterator i = queue.begin(); i != queue.end(); i++) { printf("%d: %s\n", j++, i->c_str()); } return 0; }
false
false
false
false
false
0
semantic(Loc loc, Scope *sc) { //printf("TypeAArray::semantic() %s index->ty = %d\n", toChars(), index->ty); if (deco) return this; this->loc = loc; this->sc = sc; if (sc) sc->setNoFree(); // Deal with the case where we thought the index was a type, but // in reality it was...
false
false
false
false
false
0
send_layoutget(struct pnfs_layout_hdr *lo, struct nfs_open_context *ctx, struct pnfs_layout_range *range, gfp_t gfp_flags) { struct inode *ino = lo->plh_inode; struct nfs_server *server = NFS_SERVER(ino); struct nfs4_layoutget *lgp; struct pnfs_layout_segment *lseg; loff_t i_size; dprintk("--> %s\n",...
false
false
false
false
false
0
config_set_rootdn( const char *attrname, char *value, char *errorbuf, int apply ) { int retVal = LDAP_SUCCESS; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); if ( config_value_is_null( attrname, value, errorbuf, 0 )) { return LDAP_OPERATIONS_ERROR; } if ( apply ) { CFG_LOCK_WRITE(sla...
false
false
false
false
false
0
nvkm_memx_fini(struct nvkm_memx **pmemx, bool exec) { struct nvkm_memx *memx = *pmemx; struct nvkm_pmu *pmu = memx->pmu; struct nvkm_subdev *subdev = &pmu->subdev; struct nvkm_device *device = subdev->device; u32 finish, reply[2]; /* flush the cache... */ memx_out(memx); /* release data segment access */ fin...
false
false
false
false
true
1
pwhilest (void) { int wi, ei, si; wi = Cnew (C_WHILE); Lgtok (); GTOKIFEQ (L_LP); ei = pexpr (); Csetfp (wi, ei); GTOKIFEQ (L_RP); si = pstmt (); Csetnext (ei, si); return wi; }
false
false
false
false
false
0
ZombifyFace (eFace* f) { tControlledPTR< eFace > keep( f ); RemoveFace(f); f->Unlink(); return keep; }
false
false
false
false
false
0
flam3_b_spline_filter(double t) { /* box (*) box (*) box (*) box */ double tt; if(t < 0) t = -t; if(t < 1) { tt = t * t; return((.5 * tt * t) - tt + (2.0 / 3.0)); } else if(t < 2) { t = 2 - t; return((1.0 / 6.0) * (t * t * t)); } return(0.0); }
false
false
false
false
false
0
p_float_lt_reif(FlatZincSpace& s, const ConExpr& ce, AST::Node*) { FloatVar x = s.arg2FloatVar(ce[0]); FloatVar y = s.arg2FloatVar(ce[1]); BoolVar b = s.arg2BoolVar(ce[2]); BoolVar b0(s,0,1); BoolVar b1(s,0,1); rel(s, b == (b0 && !b1)); rel(s, x, FRT_LQ, y, b0); rel(s, x,...
false
false
false
false
false
0
handle_onhook_message(struct skinny_req *req, struct skinnysession *s) { struct skinny_device *d = s->device; struct skinny_line *l; struct skinny_subchannel *sub; int instance; int reference; instance = letohl(req->data.onhook.instance); reference = letohl(req->data.onhook.reference); if (instance && referen...
false
false
false
false
false
0
webauth_token_decode(struct webauth_context *ctx, enum webauth_token_type type, const char *token, const struct webauth_keyring *ring, struct webauth_token **decoded) { size_t length; void *input; if (token == NULL) { wai_error_set(ctx,...
false
false
false
false
false
0
mca_spml_yoda_set_remote_context(void** spml_context, void* spml_remote_context) { mca_spml_yoda_context_t * yoda_context; yoda_context = *(spml_context); if (NULL == yoda_context) { yoda_context = (mca_spml_yoda_context_t*) malloc(sizeof(*yoda_context)); }...
false
false
false
false
false
0
gdl_dock_detach (GdlDockObject *object, gboolean recursive) { GdlDock *dock = GDL_DOCK (object); /* detach children */ if (recursive && dock->priv->root) { gdl_dock_object_detach (dock->priv->root, recursive); } }
false
false
false
false
false
0
invert() { qSwap( d_lowerBound, d_upperBound ); for ( int i = 0; i < NTickTypes; i++ ) { QList<double>& ticks = d_ticks[i]; const int size = ticks.count(); const int size2 = size / 2; for ( int i = 0; i < size2; i++ ) qSwap( ticks[i], ticks[size - 1 - i] ); ...
false
false
false
false
false
0
hsPutPixel( int x, int y, uint32 color ) { if ( x < 0 || x >= surface->getWidth() || y < 0 || y >= surface->getHeight() ) return; SDL_Surface *sdl_surf = surface->getSdlSurface(); int bpp; uint8 *p; /* Get destination format */ bpp = sdl_surf->format->BytesPerPixel; p = (uint8 *)sdl_surf->pixels + y * sdl_s...
false
false
false
false
false
0
gt_splitfasta_option_parser_new(void *tool_arguments) { SplitfastaArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *targetsize_option, *splitdesc_option, *o, *numfiles_option; gt_assert(arguments); op = gt_option_parser_new("[option ...] fastafile","Split the supplied fasta " ...
false
false
false
false
false
0
dxf_appid_free ( DxfAppid *dxf_appid /*!< DXF \c APPID entity. */ ) { #if DEBUG DXF_DEBUG_BEGIN #endif if (dxf_appid->next != NULL) { fprintf (stderr, (_("Error in %s () pointer to next DxfAppid was not NULL.\n")), __FUNCTION_...
false
false
false
false
false
0
search(Loc loc, Identifier *ident, int flags) { Dsymbol *s = Dsymbol::search(loc, ident, flags); if (!s && type) { s = type->toDsymbol(NULL); if (s) s = s->search(loc, ident, flags); } return s; }
false
false
false
false
false
0
init_inet6addr(struct sockaddr_in6 *name, const char *hostname, int port) { struct hostent *hostinfo; name->sin6_family = AF_INET6; name->sin6_port = htons(port); hostinfo = gethostbyname(hostname); if (hostinfo == NULL) { fprintf (stderr, "Unknown host %s.\n", hostname); exit(EXIT_FAIL...
false
false
false
false
false
0
remove_wifi_devices(void) { unsigned int i; struct device *dev = NULL; for (i=0; i < ARRAY_SIZE(devices); i++) { dev = devices[i]; if (!dev) break; if (!dev->registered) continue; dev->ops->remove(dev, i); } }
false
false
false
false
false
0
explain_buffer_errno_dup_explanation(explain_string_buffer_t *sb, int errnum, int fildes) { (void)fildes; switch (errnum) { case EBADF: explain_buffer_ebadf(sb, fildes, "fildes"); break; case EBUSY: explain_string_buffer_puts(sb, "a race condition was detected"); ...
false
false
false
false
false
0
merge_profile_summaries (struct lto_file_decl_data **file_data_vec) { struct lto_file_decl_data *file_data; unsigned int j; gcov_unsigned_t max_runs = 0; struct cgraph_node *node; struct cgraph_edge *edge; /* Find unit with maximal number of runs. If we ever get serious about roundoff errors, we migh...
false
false
false
true
false
1
group_size_2(int r_idx) { monster_race *r_ptr = &r_info[r_idx]; int total, extra = 0; /* Start small */ total = 1; /* Easy monsters, large groups */ if (r_ptr->level < p_ptr->depth) { extra = 2 * (p_ptr->depth - r_ptr->level); extra = randint1(extra); } /* Modify the group size */ total += extra; /*...
false
false
false
false
false
0
file_close(int fd) { fde *F = &fd_table[fd]; PF *read_callback; assert(fd >= 0); assert(F->flags.open); if ((read_callback = F->read_handler)) { F->read_handler = NULL; read_callback(-1, F->read_data); } if (F->flags.write_daemon) { #if defined(_SQUID_WIN32_) || defined(_SQUID_OS2_) /* ...
false
false
false
false
false
0
next_token(scanner_t *s) { const char *t = s->fmt; s->column++; /* skip space and ignored chars */ while(*t == ' ' || *t == '\t' || *t == '\n' || *t == ',' || *t == ':') { if(*t == '\n') { s->line++; s->column = 1; } else s->column++; ...
false
false
false
false
false
0
generate_os(const int nOS, const int fHeader, const int fCompress, const int fGammon, const int nHashSize, bearoffcontext * pbc, FILE * output) { int i; int n; unsigned short int aus[64]; xhash h; FILE *pfTmp = NULL; unsigned int npos; char *tmpfile; int fTTY = isatty(STDERR...
true
true
false
false
true
1