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
guilddb_txt_sync_sub(void *key, void *data, va_list ap) { char line[16384]; FILE *fp; guild_tostr(line, (struct guild *)data); fp = va_arg(ap, FILE *); fprintf(fp, "%s" NEWLINE, line); return 0; }
false
false
false
false
false
0
nemo_uninhibit_power_manager (gint cookie) { GDBusConnection *connection; GVariant *result; GError *error = NULL; g_return_if_fail (cookie > 0); connection = get_dbus_connection (); if (connection == NULL) { return; } result = g_dbus_connection_call_sync (connection, GSM_NAME, GSM_PA...
false
false
false
false
false
0
dbaltop(DBPROCESS * dbproc, int computeid, int column) { TDSCOLUMN *curcol; tdsdump_log(TDS_DBG_FUNC, "dbaltop(%p, %d, %d)\n", dbproc, computeid, column); CHECK_PARAMETER(dbproc, SYBENULL, -1); if ((curcol=dbacolptr(dbproc, computeid, column, 0)) == NULL) return -1; return curcol->column_operator; }
false
false
false
false
false
0
spi_xcomm_txrx_bufs(struct spi_xcomm *spi_xcomm, struct spi_device *spi, struct spi_transfer *t) { int ret; if (t->tx_buf) { spi_xcomm->buf[0] = SPI_XCOMM_CMD_WRITE; memcpy(spi_xcomm->buf + 1, t->tx_buf, t->len); ret = i2c_master_send(spi_xcomm->i2c, spi_xcomm->buf, t->len + 1); if (ret < 0) return ret;...
false
true
false
false
false
1
ms_sensors_reset(void *cli, u8 cmd, unsigned int delay) { int ret; struct i2c_client *client = cli; ret = i2c_smbus_write_byte(client, cmd); if (ret) { dev_err(&client->dev, "Failed to reset device\n"); return ret; } usleep_range(delay, delay + 1000); return 0; }
false
false
false
false
false
0
tracker_store_sparql_update_data_free (gpointer _data) { TrackerStoreSparqlUpdateData* _data_; _data_ = _data; #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-store.vala" _g_free0 (_data_->sparql); #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-store.vala" _g_free0 (_data_->client_i...
false
false
false
false
false
0
setup_git_directory_gently_1(int *nongit_ok) { const char *work_tree_env = getenv(GIT_WORK_TREE_ENVIRONMENT); const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT); static char cwd[PATH_MAX+1]; const char *gitdirenv; const char *gitfile_dir; int len, offset, ceil_offset; dev_t current_device = 0...
false
false
false
false
false
0
key_file_get_value (GKeyFile *kf, const gchar *name, GValue *value, GError **error) { GError *err = NULL; gchar *group; gchar *key; get_key_and_group_from_property_name (name, &group, &key); switch (G_TYPE_FUNDAMENTAL (G_VALUE_TY...
false
false
false
false
false
0
pvr2_debugifc_docmd(struct pvr2_hdw *hdw,const char *buf, unsigned int count) { unsigned int bcnt = 0; int ret; while (count) { for (bcnt = 0; bcnt < count; bcnt++) { if (buf[bcnt] == '\n') break; } ret = pvr2_debugifc_do1cmd(hdw,buf,bcnt); if (ret < 0) return ret; if (bcnt < count) bcnt++; buf +...
false
false
false
false
false
0
http11_best_content_language(const char *libdir, const char *acc_lang) { size_t naccept=parse_accept_string(acc_lang, 0, 0); char **languages=malloc(naccept ? sizeof(char *)*naccept:1); double *weights=malloc(naccept ? sizeof(double)*naccept:1); DIR *p; struct dirent *de; size_t i; #if 0 double missweight=1; #endif cha...
false
false
false
false
true
1
cuddTestInteract( DdManager * table, int x, int y) { int posn, word, bit, result; if (x > y) { int tmp = x; x = y; y = tmp; } #ifdef DD_DEBUG assert(x < y); assert(y < table->size); assert(x >= 0); #endif posn = ((((table->size << 1) - x - 3) * x) >> 1) + y - 1; word = posn ...
false
false
false
false
false
0
mailimap_date_month_parse(mailstream * fd, MMAPString * buffer, size_t * indx, int * result) { size_t cur_token; int month; cur_token = * indx; month = mailimap_month_get_token_value(fd, buffer, &cur_token); if (month == -1) return MAILIMAP_ERROR_PARSE; * result = month; * indx = cur_token...
false
false
false
false
false
0
views_cache_build_view_list(viewEntry **pViews) { int ret = SLAPI_PLUGIN_SUCCESS; Slapi_PBlock *pSuffixSearch = 0; Slapi_Entry **pSuffixList = 0; Slapi_Attr *suffixAttr; struct berval **suffixVals; char *attrType = 0; char *attrs[2]; int suffixIndex = 0; int valIndex = 0; slapi_log_error(SLAPI_LOG_TRACE, VIE...
true
true
false
false
false
1
discoverer_collect (GstDiscoverer * dc) { GST_DEBUG ("Collecting information"); /* Stop the timeout handler if present */ if (dc->priv->timeoutid) { g_source_remove (dc->priv->timeoutid); dc->priv->timeoutid = 0; } if (dc->priv->streams) { /* FIXME : Make this querying optional */ if (TRUE) ...
false
false
false
false
false
0
evas_common_font_instance_descent_get(RGBA_Font_Int *fi) { int val; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } val = -(int)fi->src->ft.face->size-...
false
false
false
false
false
0
tracker_tags_view_show_error_dialog (TrackerTagsView* self, const gchar* action, GError* e) { Block1Data* _data1_; const gchar* _tmp0_ = NULL; GError* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; gchar* str = NULL; const gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; const gchar* _tmp8_ = NULL; GtkMessageDialog* _t...
false
false
false
false
false
0
ShortBreaks() { cout << " ["; for (PkgIterator I = Sim.PkgBegin(); I.end() == false; ++I) { if (Sim[I].InstBroken() == true) { if (Flags[I->ID] == 0) cout << I.FullName(false) << ' '; /* else cout << I.Name() << "! ";*/ } } cout << ']' << endl; }
false
false
false
false
false
0
LUKS_generate_masterkey(int keylength) { struct luks_masterkey *mk=LUKS_alloc_masterkey(keylength, NULL); if(NULL == mk) return NULL; int r = getRandom(mk->key,keylength); if(r < 0) { LUKS_dealloc_masterkey(mk); return NULL; } return mk; }
false
false
false
false
false
0
ai_reset_defense_mode() { if(ai_status!=CAMP_IN_DEFENSE) return; //------------------------------------------------------------// // reset defense mode if all soldiers are dead //------------------------------------------------------------// DefenseUnit *defPtr = defense_array; Unit *unitPtr; int found=0; f...
false
false
false
false
false
0
slapi_rdn_get_num_components(Slapi_RDN *rdn) { int i= 0; char **rdns= slapi_rdn_get_rdns(rdn); if(rdns!=NULL) { for(i=0; rdns[i]!=NULL; i++); } return i; }
false
false
false
false
false
0
dup_tl_data(krb5_tl_data *tl) { krb5_tl_data *n; n = (krb5_tl_data *) malloc(sizeof(krb5_tl_data)); if (n == NULL) return NULL; n->tl_data_contents = malloc(tl->tl_data_length); if (n->tl_data_contents == NULL) { free(n); return NULL; } memcpy(n->tl_data_contents, tl...
false
false
false
false
false
0
drawRectangle(const ::WPXPropertyList &propList) { m_outputSink << "<svg:rect "; m_outputSink << "x=\"" << doubleToString(72*propList["svg:x"]->getDouble()) << "\" y=\"" << doubleToString(72*propList["svg:y"]->getDouble()) << "\" "; m_outputSink << "width=\"" << doubleToString(72*propList["svg:width"]->getDouble(...
false
false
false
false
false
0
CheckBundle(char *name,char *type) { struct Bundle *bp; char output[CF_BUFSIZE]; const char *reserved[] = { "sys", "const", "mon", "edit", "match", "mon", "this", NULL }; Debug("Checking for bundle (%s,%s)\n",name,type); if (IsStrIn(name,reserved)) { snprintf(output,CF_BUFSIZE,"Use of a reserved context ...
true
true
false
false
false
1
set_device (const Ekiga::AudioInputDevice & device) { if ( ( device.type == DEVICE_TYPE ) && ( device.source == DEVICE_SOURCE) && ( device.name == DEVICE_NAME) ) { PTRACE(4, "GMAudioInputManager_null\tSetting Device " << device); current_state.device = device; return true; } return ...
false
false
false
false
false
0
guestfs_session_tar_in(GuestfsSession *session, const gchar *tarfile, const gchar *directory, GuestfsTarIn *optargs, GCancellable *cancellable, GError **err) { /* Check we haven't already been cancelled */ if (g_cancellable_set_error_if_cancelled (cancellable, err)) return FALSE; guestfs_h *g = session->priv...
false
false
false
false
false
0
source_config_set_original_source (ESourceConfig *config, ESource *original_source) { g_return_if_fail (config->priv->original_source == NULL); if (original_source != NULL) g_object_ref (original_source); config->priv->original_source = original_source; }
false
false
false
false
false
0
duplicate(double testv[3]) const { int i; double pt[3]; int npts = this->regionPts->GetNumberOfPoints(); for (i=0; i<npts; i++) { this->regionPts->GetPoint(i, pt); if ( (pt[0] == testv[0]) && (pt[1] == testv[1]) && (pt[2] == testv[2])) { return 1; } } return 0; }
false
false
false
false
false
0
addvpndeclgen( Figure, Atom, Base ) vpnfig_list *Figure; vexexpr *Atom; unsigned char Base; { vpndecl_list *Generic; char *Name; if ( ! IsVexNodeAtom( Atom ) ) Name = getvexarrayname( Atom ); else Name = GetVexAtomValue( Atom ); Generic = searchvpndeclall...
false
false
false
false
false
0
gk104_aux_stat(struct nvkm_i2c *i2c, u32 *hi, u32 *lo, u32 *rq, u32 *tx) { struct nvkm_device *device = i2c->subdev.device; u32 intr = nvkm_rd32(device, 0x00dc60); u32 stat = nvkm_rd32(device, 0x00dc68) & intr, i; for (i = 0, *hi = *lo = *rq = *tx = 0; i < 8; i++) { if ((stat & (1 << (i * 4)))) *hi |= 1 << i; i...
false
false
false
false
false
0
gtc_visit (tree t1, tree t2, struct sccs *state, VEC(type_pair_t, heap) **sccstack, struct pointer_map_t *sccstate, struct obstack *sccstate_obstack) { struct sccs *cstate = NULL; type_pair_t p; void **slot; tree leader1, leader2; /* Check first for the obvious case of pointer identity. */ ...
false
false
false
false
false
0
gfarm_iobuffer_get_read_x(struct gfarm_iobuffer *b, void *data, int len, int just) { char *p; int rv, residual, tmp, *justp = just ? &tmp : NULL; for (p = data, residual = len; residual > 0; residual -= rv, p += rv) { if (IOBUFFER_IS_EMPTY(b)) { tmp = residual; gfarm_iobuffer_read(b, justp); } rv =...
false
false
false
false
false
0
NextHeader(p) register char *p; { for ( ; (p = strchr(p, '\n')) != NULL; p++) { if (ISWHITE(p[1])) continue; *p = '\0'; return p + 1; } return NULL; }
false
false
false
false
false
0
m_painting(GtkWidget *, cchar *) { using namespace painting_names; int painting_dialog_event(zdialog *zd, cchar *event); void * painting_thread(void *); zfuncs::F1_help_topic = "painting"; // v.10.8 EFpainting.funcname = "painting"; EFpainting.Farea = 2; ...
false
false
false
false
false
0
openFile(char *name, char *mode) { FILE *fp; char *modestr; fp = fopen(name, mode); if (!fp) { if (*mode == 'r') modestr = "reading"; else modestr = "writing"; fprintf(stderr, "gvpack: could not open file %s for %s\n", name, modestr); exit(1); } return (fp); }
false
false
false
false
false
0
pwm_put(struct pwm_device *pwm) { if (!pwm) return; mutex_lock(&pwm_lock); if (!test_and_clear_bit(PWMF_REQUESTED, &pwm->flags)) { pr_warn("PWM device already freed\n"); goto out; } if (pwm->chip->ops->free) pwm->chip->ops->free(pwm->chip, pwm); pwm->label = NULL; module_put(pwm->chip->ops->owner); ...
false
false
false
false
false
0
createPreviewImage(unsigned long maxWidth, unsigned long maxHeight, OFBool clipMode) { OFCondition result = EC_IllegalCall; if ((currentImage != NULL) && (maxWidth > 0) && (maxHeight > 0)) { deletePreviewIm...
false
false
false
false
false
0
diodon_file_clipboard_item_real_equals (DiodonIClipboardItem* base, DiodonIClipboardItem* item) { DiodonFileClipboardItem * self; gboolean result = FALSE; gboolean equals = FALSE; DiodonIClipboardItem* _tmp0_ = NULL; self = (DiodonFileClipboardItem*) base; equals = FALSE; _tmp0_ = item; if (G_TYPE_CHECK_INSTANC...
false
false
false
false
false
0
Realize(gw, valueMask, attr) XSetWindowAttributes *attr; XtValueMask *valueMask; Widget gw; { CanvasWidget w = (CanvasWidget) gw; /* look if we have an idle-cursor set in the resources, and if so, tell the window we create about it. */ if ((attr->cursor = w->canvas.idle_cursor) != None) *valueMask |= CWCursor...
false
false
false
false
false
0
collectGradientProperties() const { LinearGradientAttributes attributes; HashSet<const SVGGradientElement*> processedGradients; bool isLinear = true; const SVGGradientElement* current = this; while (current) { if (!attributes.hasSpreadMethod() && current->hasAttribute(SVGNames::spreadMetho...
false
false
false
false
false
0
add_a68g_standenv (BOOL_T portable, int a, NODE_T * n, char *c, MOID_T * m, int p, GPROC * q) { #define INSERT_TAG(l, n) {\ NEXT (n) = *(l);\ *(l) = (n);\ } TAG_T *new_one = new_tag (); PROCEDURE_LEVEL (INFO (n)) = 0; USE (new_one) = A68_FALSE; HEAP (new_one) = HEAP_SYMBOL; TAG_TABLE (new_one) = a68g_st...
false
false
false
false
false
0
createEditor(QWidget* parent, const QStyleOptionViewItem &option, const QModelIndex &index) const { GamesListModel* glm = GetGamesListModel(index); if (glm != NULL && index.column() == glm->GetColIx(GamesListModel::COL_DELETE)) { ButtonsCell* editor; if (glm->GetId() != GamesListModel::MOD...
false
false
false
false
false
0
block_has_assign_acc_or_io(Block *block) { Pe_statement *pe_stm; Statement *stm; Quadruple *q; for (pe_stm = block->pre_head; pe_stm != NULL; pe_stm = pe_stm->next) { for (stm = pe_stm->stm_head; stm != NULL; stm = stm->next) { if (stm->ope == OPE_READ || stm->ope ==...
false
false
false
false
false
0
update_assocs_in_resvs(void) { slurmctld_resv_t *resv_ptr = NULL; ListIterator iter = NULL; if (!resv_list) error("No reservation list given for updating associations"); iter = list_iterator_create(resv_list); if (!iter) fatal("malloc: list_iterator_create"); while ((resv_ptr = list_next(iter))) { _set_a...
false
false
false
false
false
0
LookupExplicitNamespace(const char *nspname, bool missing_ok) { Oid namespaceId; AclResult aclresult; /* check for pg_temp alias */ if (strcmp(nspname, "pg_temp") == 0) { if (OidIsValid(myTempNamespace)) return myTempNamespace; /* * Since this is used only for looking up existing objects, there is ...
false
false
false
false
false
0
wb_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd) { wb_file_t *file = NULL; wb_local_t *local = NULL; uint64_t tmp_file = 0; call_stub_t *stub = NULL; wb_request_t *request = NULL; int32_t ret = -1; int op_errno =...
false
false
false
true
false
1
png_read_png(png_structp png_ptr, png_infop info_ptr, int transforms, voidp params) { int row; if (png_ptr == NULL) return; #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED /* Invert the alpha channel from opacity to transparency */ if (transforms & PNG...
false
false
false
false
false
0
operator<<(double) { Tracer et("MatrixInput"); bool dummy = true; if (dummy) // get rid of warning message Throw(ProgramException("Cannot use list read with a BandMatrix")); return MatrixInput(0, 0); }
false
false
false
false
false
0
elementtoenum(Arc::XMLNode pnode,const char* ename,int& val,const char* const opts[],Arc::Logger* logger) { std::string v = ename?pnode[ename]:pnode; if(v.empty()) return true; // default for(int n = 0;opts[n];++n) { if(v == opts[n]) { val = n; return true; }; }; return false; }
false
false
false
false
false
0
GetFirstPlugin(const wxString & type) { if (!mConfig) { return wxEmptyString; } wxString path; mCurrentIndex = -1; do { path.Printf(wxT("/%s/%d"), type.c_str(), ++mCurrentIndex); if (!mConfig->HasGroup(path)) { return wxEmptyString; } mConfig->SetPath(path); ...
false
false
false
false
false
0
builtin_security_function(DBusConnection *conn, const char *action, gboolean interaction, GDBusPendingReply pending) { struct builtin_security_data *data; data = g_new0(struct builtin_security_data, 1); data->conn = conn; data->pending = pending; if (polkit_check_authorization(conn, action, int...
false
false
false
false
false
0
chain_clear_(FLAC__Metadata_Chain *chain) { FLAC__Metadata_Node *node, *next; FLAC__ASSERT(0 != chain); for(node = chain->head; node; ) { next = node->next; node_delete_(node); node = next; } if(0 != chain->filename) free(chain->filename); chain_init_(chain); }
false
false
false
false
false
0
PIT_StompThing(mobj_t * thing) { fixed_t blockdist; if (!(thing->flags & MF_SHOOTABLE)) return true; blockdist = thing->radius + tmthing->radius; if (abs(thing->x - tmx) >= blockdist || abs(thing->y - tmy) >= blockdist) return true; // didn't hit it if (thing == tmthing...
false
false
false
false
false
0
create_symbols () { if(verbose) cout << __FUNCTION__ << " register memory size = " << register_memory_size() << '\n'; for(unsigned int i = 0; i<register_memory_size(); i++) { switch (registers[i]->isa()) { case Register::SFR_REGISTER: //if(!symbol_table.find((char *)registers[i]->name().c_str(...
false
false
false
false
false
0
qh_printhashtable(FILE *fp) { facetT *facet, *neighbor; int id, facet_i, facet_n, neighbor_i= 0, neighbor_n= 0; vertexT *vertex, **vertexp; FOREACHfacet_i_(qh hash_table) { if (facet) { FOREACHneighbor_i_(facet) { if (!neighbor || neighbor == qh_MERGEridge || neighbor == qh_DUPLICATEridge) ...
false
false
false
false
true
1
convert_invokestatic(struct parse_context *ctx) { struct vm_method *invoke_target; struct statement *stmt; int err; invoke_target = resolve_invoke_target(ctx, CAFEBABE_CLASS_ACC_STATIC); if (!invoke_target) return warn("unable to resolve invocation target"), -EINVAL; stmt = invoke_stmt(ctx, STMT_INVOKE, invok...
false
false
false
false
false
0
DeepCopy(vtkDataObject *obj) { vtkGraph *g = vtkGraph::SafeDownCast(obj); if (!g) { vtkErrorMacro("Can only shallow copy from vtkGraph subclass."); return; } bool valid = this->IsStructureValid(g); if (valid) { this->CopyInternal(g, true); } else { vtkErrorMacro("Invalid gr...
false
false
false
false
false
0
multiple_search_cb (GrlSource *source, guint search_id, GrlMedia *media, guint remaining, gpointer user_data, const GError *error) { GRL_DEBUG (__FUNCTION__); struct MultipleSearchData *msd; gboolean emit; gboolean operation_done = FALSE; struct ResultCount *rc; msd = (struct...
false
false
false
false
false
0
dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid) { int lock_size = sizeof(struct dlm_rcom) + sizeof(struct rcom_lock); int stop, reply = 0, names = 0, lookup = 0, lock = 0; uint32_t status; uint64_t seq; switch (rc->rc_type) { case DLM_RCOM_STATUS_REPLY: reply = 1; break; case DLM_RCOM_N...
false
false
false
false
false
0
unserialize_hash(struct attribute_hash *hash, const void *data, size_t data_length) { int entries, i, dummy; struct data_in din; attribute_hash_clear(hash); dio_input_init(&din, data, data_length); dio_get_uint32(&d...
false
false
false
false
false
0
boot_allocate (irfboot *b, const GRETL_VAR *v) { int n = v->neqns * effective_order(v); b->rtmp = gretl_matrix_alloc(n, v->neqns); b->ctmp = gretl_matrix_alloc(n, v->neqns); b->rE = gretl_matrix_alloc(v->T, v->neqns); b->resp = gretl_matrix_alloc(b->horizon, BOOT_ITERS); b->sample = malloc(v->T...
false
false
false
false
false
0
skip_wscomments (char *p) { do { while (isspace (*p)) p++; while (in_comment && p[0]) { while (p[0] && (p[0] != '*')) p++; if (p[0]) { if (p[1] == '/') { in_comment = FALSE; p += 2; ...
false
false
false
false
false
0
get_room_contents (string room) { v2string rv; string objname; for (uint i = 0; i < state.objs.size(); i ++) if (state.objs[i].parent == room) { objname = state.objs[i].name; if (!has_obj_property (objname, "invisible") && !has_obj_property (objname, "hidden")) { vstring tmp; string...
false
false
false
false
false
0
getTypeIOParam(HeapTuple typeTuple) { Form_pg_type typeStruct = (Form_pg_type) GETSTRUCT(typeTuple); /* * Array types get their typelem as parameter; everybody else gets their * own type OID as parameter. */ if (OidIsValid(typeStruct->typelem)) return typeStruct->typelem; else return HeapTupleGetOid(type...
false
false
false
false
false
0
GetAbsolutePath() const { if (scheme == FUUri::FILE) { if (GetHostname().empty()) { #ifdef WIN32 // Check if we have a drive letter if (path[0] == '/' && path[3] == '/') { fstring absolutePath; fstring uri = path; // Replace all '/' by '\\' to be compliant with Windows path ...
false
false
false
false
false
0
get_unit_tile_pillage_base_set(const struct tile *ptile) { bv_bases tgt_ret; BV_CLR_ALL(tgt_ret); unit_list_iterate(ptile->units, punit) { if (punit->activity == ACTIVITY_PILLAGE && punit->activity_target == S_LAST && punit->activity_base != BASE_NONE) { fc_assert(punit->activity_base <...
false
false
false
false
false
0
ario_tray_icon_finalize (GObject *object) { ARIO_LOG_FUNCTION_START; ArioTrayIcon *tray; g_return_if_fail (object != NULL); g_return_if_fail (IS_ARIO_TRAY_ICON (object)); tray = ARIO_TRAY_ICON (object); g_return_if_fail (tray->priv != NULL); if (tray->priv->to...
false
false
false
false
false
0
fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot, uint8 newValue, uint8 minValue) { Buffer buf; Page page; int newslot = -1; buf = fsm_readbuf(rel, addr, true); LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE); page = BufferGetPage(buf); if (fsm_set_avail(page, slot, newValue)) MarkBufferDirty...
false
false
false
false
false
0
allocate_mission_text(int size) { Assert( size > 0 ); if (size <= Mission_text_size) return; static ubyte parse_atexit = 0; if (!parse_atexit) { atexit(stop_parse); parse_atexit = 1; } if (Mission_text != NULL) { vm_free(Mission_text); Mission_text = NULL; } if (Mission_text_raw != NULL) { vm_...
false
false
false
false
false
0
make_stderr_overlay_window (saver_screen_info *ssi) { saver_info *si = ssi->global; unsigned long transparent_pixel = 0; Visual *visual = get_overlay_visual (ssi->screen, &transparent_pixel); if (visual) { int depth = visual_depth (ssi->screen, visual); XSetWindowAttributes attrs; XWindowA...
false
false
false
false
false
0
mergeBoardSvg(QString & svg, ItemBase * board, int res, bool flip, LayerList & viewLayerIDs) { QString boardSvg = getBoardSvg(board, res, viewLayerIDs); LayerList outlineLayerIDs = ViewLayer::outlineLayers(); RenderThing renderThing; renderThing.printerScale = GraphicsUtils::SVGDPI; renderThing.blackOnly...
false
false
false
false
false
0
initLoadAvg( struct SensorModul* sm ) { if ( updateLoadAvg() < 0 ) { LoadAvgOK = -1; return; } else LoadAvgOK = 1; registerMonitor( "cpu/system/loadavg1", "float", printLoadAvg1, printLoadAvg1Info, sm ); registerMonitor( "cpu/system/loadavg5", "float", printLoadAvg5, printLoadAvg5Info, sm ); regi...
false
false
false
false
false
0
QueryParser(const TCHAR* f, Analyzer* a) : _operator(OR_OPERATOR), lowercaseExpandedTerms(true),useOldRangeQuery(false),allowLeadingWildcard(false),enablePositionIncrements(false), analyzer(a),field(NULL),phraseSlop(0),fuzzyMinSim(FuzzyQuery::defaultMinSimilarity), fuzzyPrefixLength(FuzzyQuery::defaultPrefixLengt...
false
false
false
false
false
0
validate_blob (ValidateContext *ctx, guint32 offset, GError **error) { GITypelib *typelib = ctx->typelib; CommonBlob *common; if (typelib->len < offset + sizeof (CommonBlob)) { g_set_error (error, G_TYPELIB_ERROR, G_TYPELIB_ERROR_INVALID, "The buffer is t...
false
false
false
false
false
0
au_lkup_neg(struct dentry *dentry, aufs_bindex_t bindex, int wh) { int err; struct dentry *parent, *h_parent, *h_dentry; struct au_branch *br; parent = dget_parent(dentry); h_parent = au_h_dptr(parent, bindex); br = au_sbr(dentry->d_sb, bindex); if (wh) h_dentry = au_whtmp_lkup(h_parent, br, &dentry->d_name);...
false
false
false
false
false
0
test_mgr_compress() { int num_errs = 0; /* Output message about test being performed */ MESSAGE(5, printf("Testing Multi-file Raster Compression Functions\n");); /* Test compression functions on GZIP compressed image */ num_errs = num_errs + test_mgr_compress_a(); /* Test compression function...
false
false
false
false
false
0
sys_io_cancel(struct tcb *tcp) { if (entering(tcp)) { #ifdef HAVE_LIBAIO_H struct iocb iocb; #endif tprintf("%lu, ", tcp->u_arg[0]); #ifdef HAVE_LIBAIO_H if (umove(tcp, tcp->u_arg[1], &iocb) == 0) { tprintf("{%p, %u, %hu, %hu, %d}, ", iocb.data, iocb.key, iocb.aio_lio_opcode, iocb.aio_reqprio, ioc...
false
false
false
false
false
0
sb16_set_dma_hw(sb_devc * devc) { int bits; if (devc->dma8 != 0 && devc->dma8 != 1 && devc->dma8 != 3) { printk(KERN_ERR "SB16: Invalid 8 bit DMA (%d)\n", devc->dma8); return 0; } bits = (1 << devc->dma8); if (devc->dma16 >= 5 && devc->dma16 <= 7) bits |= (1 << devc->dma16); sb_setmixer(devc, DMA_NR, bi...
false
false
false
false
false
0
streams_sh_update(void) { int channel,i; if (Machine->sample_rate == 0) return; /* update all the output buffers */ for (channel = 0;channel < MIXER_MAX_CHANNELS;channel += stream_joined_channels[channel]) { if (stream_buffer[channel]) { int newpos; int buflen; newpos = SAMPLES_TH...
false
false
false
false
false
0
gst_play_sink_convert_bin_remove_elements (GstPlaySinkConvertBin * self) { if (self->conversion_elements) { g_list_foreach (self->conversion_elements, (GFunc) gst_play_sink_convert_bin_remove_element, self); g_list_free (self->conversion_elements); self->conversion_elements = NULL; } if (self-...
false
false
false
false
false
0
sky2_vpd_write(struct sky2_hw *hw, int cap, const void *data, u16 offset, unsigned int length) { unsigned int i; int rc = 0; for (i = 0; i < length; i += sizeof(u32)) { u32 val = *(u32 *)(data + i); sky2_pci_write32(hw, cap + PCI_VPD_DATA, val); sky2_pci_write32(hw, cap + PCI_VPD_ADDR, offset | PCI_VPD_...
false
false
false
false
false
0
mlx5_core_query_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, struct mlx5_query_srq_mbox_out *out) { if (!dev->issi) return query_srq_cmd(dev, srq, out); else if (srq->common.res == MLX5_RES_XSRQ) return query_xrc_srq_cmd(dev, srq, out); else return query_rmp_cmd(dev, srq, out); }
false
false
false
false
false
0
searchlabel(char *name) { register struct label *q; register int r; register char *s; extern int segment; s=localname; if ( name[0]=='.' ) { sprintf(s,"%d",segment); while (*s) s++; }; while (s-localname < LABLEN) if (*name) *s++= toupper(*name++); else *s++= 0; s=localname; q = lroo...
false
false
false
false
false
0
_file_index_id_save_entries (gpointer * _key, GstFileIndexId * ii, gchar * prefix) { GError *err; gchar *path; GIOChannel *chan; if (!ii->array) return; err = NULL; path = g_strdup_printf ("%s/%d", prefix, ii->id); chan = g_io_channel_new_file (path, "w", &err); g_free (path); if (err) g...
false
false
false
false
false
0
HandleLootReleaseOpcode(WorldPacket& recv_data) { DEBUG_LOG("WORLD: CMSG_LOOT_RELEASE"); // cheaters can modify lguid to prevent correct apply loot release code and re-loot // use internal stored guid recv_data.read_skip<uint64>(); // guid; if (ObjectGuid lootGuid = GetPla...
false
false
false
false
false
0
cms_DigestedData_create(const EVP_MD *md) { CMS_ContentInfo *cms; CMS_DigestedData *dd; cms = CMS_ContentInfo_new(); if (!cms) return NULL; dd = M_ASN1_new_of(CMS_DigestedData); if (!dd) goto err; cms->contentType = OBJ_nid2obj(NID_pkcs7_digest); cms->d.digestedData = dd; dd->version = 0; dd->encapCo...
false
false
false
false
false
0
gray16_to_rgba( FL_IMAGE * im ) { unsigned short *gray = im->gray[ 0 ]; unsigned char *r, *g, *b; float scale = ( FL_PCMAX + 0.001 ) / im->gray_maxval; int i, npix; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; for ( i = 0, npix...
false
false
false
false
false
0
ec2_get_flush(sge_evc_class_t *thiz, ev_event event) { int ret = EV_NO_FLUSH; sge_evc_t *sge_evc = (sge_evc_t *) thiz->sge_evc_handle; DENTER(EVC_LAYER, "ec2_get_flush"); PROF_START_MEASUREMENT(SGE_PROF_EVENTCLIENT); if (sge_evc->ec == NULL) { ERROR((SGE_EVENT, MSG_EVENT_UNINITIALIZED_EC)); ...
false
false
false
false
false
0
sq() { if(sp<1) return(STUNDERFLOW); stack[sp-1].value*=stack[sp-1]; return(OKAY); }
false
false
false
false
false
0
skip_special(P *p) { int to, s; switch (s = pgetc(p)) { case '"': do { if ((s = pgetc(p)) == '\\') { pgetc(p); s = pgetc(p); } } while (s != NO_MORE_DATA && s != '"'); if (s == '"') return -2; break; case '\'': if ((s = pgetc(p)) == '\\') { pgetc(p); s = pgetc(p); } if (s == '\...
false
false
false
false
false
0
next_runtime_01_initialize (void) { tree type; #ifdef OBJCPLUS /* For all NeXT objc ABIs -fobjc-call-cxx-cdtors is on by default. */ if (!global_options_set.x_flag_objc_call_cxx_cdtors) global_options.x_flag_objc_call_cxx_cdtors = 1; #endif /* Set up attributes to be attached to the meta-data so tha...
false
false
false
false
false
0
base_name (fname) char *fname; { char *s = fname; char *p; #if defined (__MSDOS__) || defined (_WIN32) if (isalpha (s[0]) && s[1] == ':') s += 2; #endif #ifdef VMS if ((p = strrchr (s, ':'))) s = p + 1; /* Skip device. */ if ((p = strrchr (s, ']'))) s = p + 1; /* Skip directory. */ if ((p = strrchr (...
false
false
false
false
false
0
efi_snp_hii_random_guid ( EFI_GUID *guid ) { uint8_t *byte = ( ( uint8_t * ) guid ); unsigned int i; for ( i = 0 ; i < sizeof ( *guid ) ; i++ ) *(byte++) = random(); }
false
false
false
false
false
0
_gd2ReadChunk (int offset, char *compBuf, int compSize, char *chunkBuf, uLongf * chunkLen, gdIOCtx * in) { int zerr; if (gdTell (in) != offset) { GD2_DBG (printf ("Positioning in file to %d\n", offset)); gdSeek (in, offset); } else { GD2_DBG (printf ("Already Positioned in file to %d\n", offset...
false
false
false
false
false
0
gf_png_user_read_data(png_structp png_ptr, png_bytep data, png_size_t length) { GFpng *ctx = (GFpng*)png_get_io_ptr(png_ptr); if (ctx->pos + length > ctx->size) { png_error(png_ptr, "Read Error"); } else { memcpy(data, (char*) ctx->buffer + ctx->pos, length); ctx->pos += length; } }
false
false
false
false
false
0
be_mcc_compl_is_new(struct be_mcc_compl *compl) { if (compl->flags != 0) { compl->flags = le32_to_cpu(compl->flags); WARN_ON((compl->flags & CQE_FLAGS_VALID_MASK) == 0); return true; } else return false; }
false
false
false
false
false
0
zxid_sp_dig_oauth_sso_a7n(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses) { //if (!zxid_chk_sig(cf, cgi, ses, &resp->gg, resp->Signature, resp->Issuer, 0, "Response")) return 0; //p = zxid_http_get(cf, url, &lim); ERR("*** process JWT %d", 0); //a7n = zxid_dec_a7n(cf, resp->Assertion, resp->EncryptedAssertion...
false
false
false
false
false
0
evaluate (JoinPointLoc &jpl, PointCutContext &context, Binding &binding, Condition &cond) { // 'within' matches only code join points if (!(jpl.type () & (int)JoinPointLoc::Code)) return false; JPL_Code &jpl_code = (JPL_Code&)jpl; // accept pseudo method calls if (jpl_code...
false
false
false
false
false
0
redraw_win_later(wp, type) win_T *wp; int type; { if (wp->w_redr_type < type) { wp->w_redr_type = type; if (type >= NOT_VALID) wp->w_lines_valid = 0; if (must_redraw < type) /* must_redraw is the maximum of all windows */ must_redraw = type; } }
false
false
false
false
false
0
init_lua() { char fpath[2048]; int i; dialog_lua_state = lua_open(); luaL_openlibs(dialog_lua_state); config_lua_state = lua_open(); luaL_openlibs(config_lua_state); for (i = 0; lfuncs[i].name != NULL; i++) { lua_pushcfunction(dialog_lua_state, lfuncs[i].func); lua_setglobal(dialog_lua_state, lfuncs[i].nam...
true
true
false
false
false
1
atl1_tx_queue(struct atl1_adapter *adapter, u16 count, struct tx_packet_desc *ptpd) { struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; struct atl1_buffer *buffer_info; struct tx_packet_desc *tpd; u16 j; u32 val; u16 next_to_use = (u16) atomic_read(&tpd_ring->next_to_use); for (j = 0; j < count; j++) ...
false
true
false
false
false
1