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
fill(unsigned char value) { GMonitorLock lock(monitor()); for(unsigned int y=0; y<rows(); y++) { unsigned char* bm_y = (*this)[y]; for(unsigned int x=0; x<columns(); x++) bm_y[x] = value; } }
false
false
false
false
false
0
_dxfReRef(Array oldArray, int *map) { Array newArray; Type type; Category cat; int rank, shape[32]; int *oldPtr, *newPtr; int i, itemSize; int nElements; if (! DXGetArrayInfo(oldArray, &nElements, &type, &cat, &rank, shape)) return NULL; if (type != TYPE_INT || cat != CATEGO...
false
false
false
false
false
0
ekg_draw_descr(const int status) { const char *value; char file[100]; char var[100]; variable_t *v; if (EKG_STATUS_IS_NA(status)) { /* or maybe == NA ? */ xstrcpy(var, ("quit_reason")); xstrcpy(file, "quit.reasons"); } else if (status == EKG_STATUS_AVAIL) { xstrcpy(var, ("back_reason")); xstrcpy(file, "...
false
false
false
false
false
0
nc_inq_path(int ncid, size_t *pathlen, char *path) { NC* ncp; int stat = NC_NOERR; if ((stat = NC_check_id(ncid, &ncp))) return stat; if(ncp->path == NULL) { if(pathlen) *pathlen = 0; if(path) path[0] = '\0'; } else { if (pathlen) *pathlen = strlen(ncp->path); if (path) strcpy(path,...
false
true
false
false
false
1
PerlIO_clone_list(pTHX_ PerlIO_list_t *proto, CLONE_PARAMS *param) { PerlIO_list_t *list = NULL; if (proto) { int i; list = PerlIO_list_alloc(aTHX); for (i=0; i < proto->cur; i++) { SV *arg = proto->array[i].arg; #ifdef sv_dup if (arg && param) arg = sv_dup(arg, param); #else PERL_UNUSED_ARG...
false
false
false
false
false
0
SiS_TVEnabled(struct SiS_Private *SiS_Pr) { if((SiS_GetReg(SiS_Pr->SiS_Part2Port,0x00) & 0x0f) != 0x0c) return true; if(SiS_Pr->SiS_VBType & VB_SISYPBPR) { if(SiS_GetReg(SiS_Pr->SiS_Part2Port,0x4d) & 0x10) return true; } return false; }
false
false
false
false
false
0
gap_story_free_storyboard(GapStoryBoard **stb_ptr) { GapStoryBoard *stb; stb = *stb_ptr; if(stb) { if(stb->stb_section) { GapStorySection *stb_section; stb_section = stb->stb_section; while(stb_section != NULL) { GapStorySection *stb_section_next; stb_section_ne...
false
false
false
false
false
0
read_data_block(std::ifstream & stream, void_vector<UInt8> & data) { int count; count = stream.get(); if(!stream.good()) return -1; if(count == 0) return 0; data.resize(count); stream.read( reinterpret_cast< char * >(data.begin()), count); ...
false
false
false
false
false
0
RTreePickSeeds(struct PartitionVars *p) { int i, j, seed0 = 0, seed1 = 0; RectReal worst, waste, area[MAXCARD + 1]; for (i = 0; i < p->total; i++) area[i] = RTreeRectSphericalVolume(&BranchBuf[i].rect); worst = -CoverSplitArea - 1; for (i = 0; i < p->total - 1; i++) { for (j = i + 1; j < p->tota...
false
false
false
false
false
0
ajVdwresNew(ajuint n) { ajuint i = 0U; AjPVdwres vdwres = NULL; AJNEW0(vdwres); vdwres->Id3 = ajStrNew(); vdwres->N = n; if (n) { AJCNEW0(vdwres->Atm, n); for (i = 0U; i < n; i++) vdwres->Atm[i] = ajStrNew(); AJCNEW0(vdwres->Rad, n); } retur...
false
false
false
false
false
0
ccp_u_input(int unit,u_char *p,int len) { fsm *f = &ccp_fsm[unit]; int oldstate; /* * Check for a terminate-request so we can print a message. */ oldstate = f->state; fsm_input(f, p, len); if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED) syslog(LOG_NOTICE, "Compression d...
false
false
false
false
false
0
__ecereNameSpace__ecere__gui__Control_OnActivate(struct __ecereNameSpace__ecere__com__Instance * window, unsigned int active, struct __ecereNameSpace__ecere__com__Instance * previous, unsigned int * goOn, unsigned int direct) { if(active) { *goOn = 0x1; return 0x0; } return 0x1; }
false
false
false
false
false
0
rb_time_num_new(VALUE timev, VALUE off) { VALUE time = time_new_timew(rb_cTime, rb_time_magnify(v2w(timev))); if (!NIL_P(off)) { off = utc_offset_arg(off); validate_utc_offset(off); time_set_utc_offset(time, off); return time; } return time; }
false
false
false
false
false
0
_gadman_gadget_free(void *data __UNUSED__, void *obj) { E_Gadcon_Client *gcc = obj; Eina_List *l; int layer; Eina_Bool edit; layer = gcc->gadcon->id - ID_GADMAN_LAYER_BASE; // edje_object_part_unswallow(gcc->o_frame, gcc->o_base); if (gcc->cf) { Man->gadgets[layer] = eina_list_remove(M...
false
false
false
false
false
0
gss_init_sec_context_spnego(OM_uint32 *minor_status, const gss_cred_id_t initiator_cred_handle, gss_ctx_id_t *context_handle, const gss_name_t target_name, const gss_OID mech_type, OM_uint32 req_flags, OM_uint32 time_req, const gss_channel_bindings_t input_chan_bindings,...
false
false
false
false
false
0
InfoPacketsReceived() { // indicates that both Information Packets has been received // needed for actions, which process data from both packets wxASSERT ( m_byInfopacketsReceived == IP_BOTH ); m_byInfopacketsReceived = IP_NONE; if (m_bySupportSecIdent){ SendSecIdentStatePacket(); } }
false
false
false
false
false
0
intersectPoint(const G3D::Vector3& p, AreaInfo& info) const { if (!iModel) { #ifdef VMAP_DEBUG DEBUG_LOG("<object not loaded>"); #endif return; } // M2 files don't contain area info, only WMO files if (flags & MOD_M2) return; if (!...
false
false
false
false
false
0
SetFilteringDataTypesSupported( int nTypeCount, GDALDataType *paeTypes) { if( nTypeCount > (int) sizeof(sizeof(aeSupportedTypes)/sizeof(GDALDataType)) ) { CPLAssert( FALSE ); nTypeCount = (int) sizeof(sizeof(aeSuppor...
false
false
false
false
false
0
set_conf_enum(lList **alpp, lList **clpp, int fields[], const char *key, lListElem *ep, int name_nm, const char **enum_strings) { const char *str; u_long32 uval = 0; DENTER(CULL_LAYER, "set_conf_enum"); if(!(str=get_conf_value(fields?NULL:alpp, *clpp, CF_name, CF_value, key))) { D...
false
false
false
false
false
0
InvokeByIndex (int aIndex, const NPVariant *argv, uint32_t argc, NPVariant *_result) { TOTEM_LOG_INVOKE (aIndex, totemGMPPlaylist); switch (Methods (aIndex)) { case eAttributeName: /* AUTF8String attributeN...
false
false
false
false
false
0
assuan_set_log_stream (assuan_context_t ctx, FILE *fp) { if (ctx) { if (ctx->log_fp) fflush (ctx->log_fp); ctx->log_fp = fp; _assuan_set_default_log_stream (fp); } }
false
false
false
false
false
0
setMaxPartialPredictionSize (const std::string& size) { max_partial_prediction_size = Utility::toInt(size); logger << INFO << "MAX_PARTIAL_PREDICTION_SIZE: " << max_partial_prediction_size << endl; }
false
false
false
false
false
0
on_authorize_cb (GdmDBusWorker *proxy, GAsyncResult *res, gpointer user_data) { GdmSessionConversation *conversation = user_data; GdmSession *self; char *service_name; GError *error = NULL; gboolean worked; worked = gdm_dbus_work...
false
false
false
false
false
0
handle_authentication_req(enum authentication_type type, const char *message) { append_network_statusbar(message, TRUE); switch (type) { case AUTH_NEWUSER_FIRST: case AUTH_NEWUSER_RETRY: set_connection_state(NEW_PASSWORD_TYPE); return; case AUTH_LOGIN_FIRST: /* if w...
false
false
false
false
false
0
AddSorted(size_t value, size_t** out, size_t* outsize) { size_t i; ZOPFLI_APPEND_DATA(value, out, outsize); if (*outsize > 0) { for (i = 0; i < *outsize - 1; i++) { if ((*out)[i] > value) { size_t j; for (j = *outsize - 1; j > i; j--) { (*out)[j] = (*out)[j - 1]; } ...
false
false
false
false
false
0
memMeterSyncHWater(MemMeter * m) { assert(m); if (m->hwater_level < m->level) { m->hwater_level = m->level; m->hwater_stamp = squid_curtime; } }
false
false
false
false
false
0
B_Term_Map_Deleter(B_Term_map& Map) { for (B_Term_map::iterator j = Map.begin(); j != Map.end(); j++) delete (*j).second; }
false
false
false
false
false
0
limit_needed(Query *parse) { Node *node; node = parse->limitCount; if (node) { if (IsA(node, Const)) { /* NULL indicates LIMIT ALL, ie, no limit */ if (!((Const *) node)->constisnull) return true; /* LIMIT with a constant value */ } else return true; /* non-constant LIMIT */ } node = pa...
false
false
false
false
false
0
PortalListGetPrimaryStmt(List *stmts) { ListCell *lc; foreach(lc, stmts) { Node *stmt = (Node *) lfirst(lc); if (IsA(stmt, PlannedStmt)) { if (((PlannedStmt *) stmt)->canSetTag) return stmt; } else if (IsA(stmt, Query)) { if (((Query *) stmt)->canSetTag) return stmt; } else { ...
false
false
false
false
false
0
crm_ipc_prepare(uint32_t request, xmlNode * message, struct iovec ** result) { static int biggest = 0; struct iovec *iov; unsigned int total = 0; char *compressed = NULL; char *buffer = dump_xml_unformatted(message); struct crm_ipc_response_header *header = calloc(1, sizeof(struct crm_ipc_respo...
false
false
false
false
false
0
mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start, unsigned long end) { struct mlx5_ib_mr *mr; const u64 umr_block_mask = (MLX5_UMR_MTT_ALIGNMENT / sizeof(u64)) - 1; u64 idx = 0, blk_start_idx = 0; int in_block = 0; u64 addr; if (!umem || !umem->odp_data) { pr_err("invalidation called...
false
false
false
false
false
0
on_zoom_changed (GtkSpinButton *btn, gcp::Document *pDoc) { View *pView = pDoc->GetView (); if (pView) pView->Zoom (gtk_spin_button_get_value (btn) / 100.); }
false
false
false
false
false
0
Uninterpret (Command* cmd) { if (cmd->IsA(ARROW_CMD)) { ArrowLine* line = GetArrowLine(); if (line != nil) { _ArrowData* ad = (_ArrowData*) cmd->Recall(this); if (ad != nil) { line->SetArrows(ad->_head, ad->_tail); Notify(); } } } else { ...
false
false
false
false
false
0
bond_coeff() { if (domain->box_exist == 0) error->all(FLERR,"Bond_coeff command before simulation box is defined"); if (force->bond == NULL) error->all(FLERR,"Bond_coeff command before bond_style is defined"); if (atom->avec->bonds_allow == 0) error->all(FLERR,"Bond_coeff command when no bonds allowed...
false
false
false
true
false
1
afr_sh_create_entry_cbk (call_frame_t *frame, xlator_t *this, int child, int32_t op_ret, int32_t op_errno) { int call_count = 0; afr_local_t *local = NULL; local = frame->local; if (op_ret == -1) gf_log (this->name, GF_LOG_ERROR,...
false
false
false
false
false
0
http_async_remove(http_async_t *ha, http_errtype_t type, void *code) { http_async_check(ha); (*ha->error_ind)(ha, type, code); /* * Callback may decide to cancel/close the request on errors, which * will mark the request with the HA_F_FREED flag (the object being * collected asynchronously so still being acc...
false
false
false
false
false
0
ar5008_hw_set_channel_regs(struct ath_hw *ah, struct ath9k_channel *chan) { u32 phymode; u32 enableDacFifo = 0; if (AR_SREV_9285_12_OR_LATER(ah)) enableDacFifo = (REG_READ(ah, AR_PHY_TURBO) & AR_PHY_FC_ENABLE_DAC_FIFO); phymode = AR_PHY_FC_HT_EN | AR_PHY_FC_SHORT_GI_40 | AR_PHY_FC_SINGLE_HT_L...
false
false
false
false
false
0
npc_event_do(const char *name) { int c = 0; if(name[0] == ':' && name[1] == ':') { c = npc_event_doall(name+2); } else { struct event_data *ev = (struct event_data *)strdb_search(ev_db,name); if(ev && ev->nd) { run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id); c = 1; } } return c; }
false
false
false
false
false
0
slip_open(struct tty_struct *tty) { struct slip *sl; int err; if (!capable(CAP_NET_ADMIN)) return -EPERM; if (tty->ops->write == NULL) return -EOPNOTSUPP; /* RTnetlink lock is misused here to serialize concurrent opens of slip channels. There are better ways, but it is the simplest one. */ rtnl_l...
false
false
false
false
false
0
get_items_recursive_with_groups() const { type_list_const_items result; for(type_list_items::const_iterator iter = m_list_items.begin(); iter != m_list_items.end(); ++iter) { const sharedptr<const LayoutItem> item = *iter; //Add the item itself: result.push_back(item); sharedptr<const L...
false
false
false
false
false
0
isSection(const string& sectName) const { if (!isSection()) return false; // Skip whitespace at start of line const string::const_iterator send = sectName.end(); string::const_iterator x = p->text.begin(); string::const_iterator xend = p->text.end(); bool emptyLine = advanceWhitespace(x, xend); Assert(!e...
false
false
false
false
false
0
instantiation( const SubstitutionMap& subst, const problem_t& problem ) const { return( *new AssignmentEffect(assignment().instantiation( subst, problem ))); }
false
false
false
false
false
0
spmi_ext_register_writel(struct spmi_device *sdev, u16 addr, const u8 *buf, size_t len) { /* 4-bit Slave Identifier, 16-bit register address, up to 8 bytes */ if (len == 0 || len > 8) return -EINVAL; return spmi_write_cmd(sdev->ctrl, SPMI_CMD_EXT_WRITEL, sdev->usid, addr, buf, len); }
false
false
false
false
false
0
description() const { if (d->runnerDescription.isValid()) { return d->runnerDescription.property("Comment").toString(); } if (d->package) { return d->package->metadata().description(); } return objectName(); }
false
false
false
false
false
0
decode_heim_any(const unsigned char *p, size_t len, heim_any *data, size_t *size) { size_t len_len, length, l; Der_class thisclass; Der_type thistype; unsigned int thistag; int e; memset(data, 0, sizeof(*data)); e = der_get_tag (p, len, &thisclass, &thistype, &thistag, &l); if (e) re...
false
true
false
false
false
1
dca_subframe_footer(DCAContext * s) { int aux_data_count = 0, i; int lfe_samples; /* * Unpack optional information */ if (s->timestamp) get_bits(&s->gb, 32); if (s->aux_data) aux_data_count = get_bits(&s->gb, 6); for (i = 0; i < aux_data_count; i++) get_bits...
false
false
false
false
false
0
utime_read_time_arguments(utime_arguments *ua) { PyObject *times = NULL; PyObject *ns = NULL; char format[24]; char *kwlist[4]; char **kw = kwlist; utime_status return_value; int parse_result; *kw++ = ua->first_argument_name; *kw++ = "times"; *kw++ = "ns"; *kw = NULL; s...
true
true
false
false
false
1
sample_move_dither_rect_d16_sSs (char *dst, jack_default_audio_sample_t *src, unsigned long nsamples, unsigned long dst_skip, dither_state_t *state) { jack_default_audio_sample_t val; int16_t tmp; while (nsamples--) { val = (*src * SAMPLE_16BIT_SCALING) + fast_rand() / (float) UINT_MAX - 0.5f; float_16_s...
false
false
false
false
false
0
on_note_opened () { // Add here instead of in Initialize to avoid creating unopened // notes' windows/buffers. add_text_menu_item (new UnderlineMenuItem (this)); } }
false
false
false
false
false
0
_mmc_detect_card_removed(struct mmc_host *host) { int ret; if (host->caps & MMC_CAP_NONREMOVABLE) return 0; if (!host->card || mmc_card_removed(host->card)) return 1; ret = host->bus_ops->alive(host); /* * Card detect status and alive check may be out of sync if card is * removed slowly, when card dete...
false
false
false
false
false
0
opendst(hfsvol *vol, const char *dstname, const char *hint, const char *type, const char *creator) { hfsdirent ent; hfsfile *file; unsigned long cwd; if (hfs_stat(vol, dstname, &ent) != -1 && (ent.flags & HFS_ISDIR)) { cwd = hfs_getcwd(vol); if (hfs_setcwd(vol, ent.cnid) == -1) { ...
false
false
false
false
true
1
StopWalking(void) { itkDebugMacro("StopWalking"); m_Stop = true; this->InvokeEvent( EndEvent() ); }
false
false
false
false
false
0
bt_ctf_field_type_get_type_id( struct bt_ctf_field_type *type) { if (!type) { return CTF_TYPE_UNKNOWN; } return type->declaration->id; }
false
false
false
false
false
0
draw_icon(struct widget *pIcon, Sint16 start_x, Sint16 start_y) { pIcon->size.x = start_x; pIcon->size.y = start_y; if (get_wflags(pIcon) & WF_RESTORE_BACKGROUND) { refresh_widget_background(pIcon); } return draw_icon_from_theme(pIcon->theme, get_wstate(pIcon), pIcon->dst, pIcon->size.x, pIcon-...
false
false
false
false
false
0
adin_end(ADIn *a) { if (debug2_flag && a->input_side_segment) jlog("Stat: adin_end: skip\n"); if (a->input_side_segment == FALSE) { if (a->ad_end != NULL) return(a->ad_end()); } return TRUE; }
false
false
false
false
false
0
gsb_form_show ( gboolean show ) { gint origin; devel_debug_int (show); origin = gsb_form_get_origin (); /* show or hide the scheduler part */ switch (origin) { case ORIGIN_VALUE_OTHER: case ORIGIN_VALUE_HOME: return FALSE; break; case ORIGIN_VALUE_SCHEDULED: gsb_form_schedu...
false
false
false
false
false
0
CheckEitherSmi(Register first, Register second, Register scratch) { if (first.is(second)) { return CheckSmi(first); } if (scratch.is(second)) { andl(scratch, first); } else { if (!scratch.is(first)) { movl(scratc...
false
false
false
false
false
0
ct_connect(CS_CONNECTION * con, CS_CHAR * servername, CS_INT snamelen) { char *server; int needfree = 0; CS_CONTEXT *ctx; TDSCONNECTION *connection; tdsdump_log(TDS_DBG_FUNC, "ct_connect(%p, %s, %d)\n", con, servername ? servername : "NULL", snamelen); if (con->server_addr) { server = ""; } else if (snamelen...
false
true
false
false
false
1
getChildExtentsArea(void) const { Rect extents(0, 0, 0, 0); const size_t childCount = getChildCount(); if (childCount == 0) return extents; for (size_t i = 0; i < childCount; ++i) { const Window* const wnd = getChildAtIdx(i); const Rect area(wnd->getArea().asAbsolute(d_pixe...
false
false
false
false
false
0
ScaleArrows (float mag) { if (Head()) _head->Scale(mag, mag, _x0, _y0); if (Tail()) _tail->Scale(mag, mag, _x1, _y1); _arrow_scale = mag; invalidateCaches(); }
false
false
false
false
false
0
setIcon(const PsiIcon *i) { #ifndef WIDGET_PLUGIN iconStop(); if ( i ) icon = new PsiIcon(*i); iconStart(); #else Q_UNUSED(i); #endif }
false
false
false
false
false
0
msg_fddata_create(int fd) { MsgFDData *data; if (!(data = mem_new(MsgFDData))) return NULL; *data = fd; return data; }
false
false
false
false
false
0
pinctrl_bind_pins(struct device *dev) { int ret; dev->pins = devm_kzalloc(dev, sizeof(*(dev->pins)), GFP_KERNEL); if (!dev->pins) return -ENOMEM; dev->pins->p = devm_pinctrl_get(dev); if (IS_ERR(dev->pins->p)) { dev_dbg(dev, "no pinctrl handle\n"); ret = PTR_ERR(dev->pins->p); goto cleanup_alloc; } de...
false
false
false
false
false
0
mx_action_get_state_type (GAction *action) { MxAction *mx_action = MX_ACTION (action); if (mx_action->priv->state != NULL) return g_variant_get_type (mx_action->priv->state); else return NULL; }
false
false
false
false
false
0
rotateFace(SIDE face, bool dir, bool animate, bool add_move /* = true */){ int k; int factor = dir? 1:-1; int milisec = 5; // length of time to sleep, in miliseconds struct timespec req = {0}; req.tv_sec = 0; req.tv_nsec = milisec * 1000000L; float b = 1; if (animate){ for (k...
false
false
false
false
false
0
ComputeFileMD5(const char* source, char* md5out) { #if defined(CMAKE_BUILD_WITH_CMAKE) if(!cmSystemTools::FileExists(source)) { return false; } // Open files #if defined(_WIN32) || defined(__CYGWIN__) cmsys_ios::ifstream fin(source, cmsys_ios::ios::binary | cmsys_ios::ios::in); #else cmsys_ios::ifs...
false
false
false
false
false
0
soxr_output(soxr_t p, void * out, size_t len0) { size_t odone, odone0 = 0, olen = len0, osize, idone; size_t ilen = min(p->max_ilen, (size_t)ceil((double)olen *p->io_ratio)); void const * in = out; /* Set to !=0, so that caller may leave unset. */ bool was_flushing; if (!p || p->error) return 0; if (!out &...
false
false
false
false
false
0
__lambda17_ (MapTests* self, const gchar* x, const gchar* y, gint z) { gint result = 0; gint _tmp0_ = 0; g_return_val_if_fail (x != NULL, 0); g_return_val_if_fail (y != NULL, 0); _tmp0_ = z; result = _tmp0_ + 1; return result; }
false
false
false
false
false
0
mei_cl_bus_rx_event(struct mei_cl *cl) { struct mei_cl_device *cldev = cl->cldev; if (!cldev || !cldev->event_cb) return; if (!(cldev->events_mask & BIT(MEI_CL_EVENT_RX))) return; set_bit(MEI_CL_EVENT_RX, &cldev->events); schedule_work(&cldev->event_work); }
false
false
false
false
false
0
rndis_dump_station(struct wiphy *wiphy, struct net_device *dev, int idx, u8 *mac, struct station_info *sinfo) { struct rndis_wlan_private *priv = wiphy_priv(wiphy); struct usbnet *usbdev = priv->usbdev; if (idx != 0) return -ENOENT; memcpy(mac, priv->bssid, ETH_ALEN); rndis_fill_station_info(usbdev,...
false
false
false
false
false
0
messagev(const MessageOptions &options, const char *format, va_list args) { RecMutex::Guard guard = lock(); static bool dbg = getenv("SYNCEVOLUTION_DEBUG"); if (dbg) { // Let parent LogRedirect or utility function handle the ...
false
false
false
false
false
0
is_tm_pure (const_tree x) { unsigned flags; switch (TREE_CODE (x)) { case FUNCTION_DECL: case FUNCTION_TYPE: case METHOD_TYPE: break; default: if (TYPE_P (x)) return false; x = TREE_TYPE (x); if (TREE_CODE (x) != POINTER_TYPE) return false; /* FALLTHRU */ c...
false
false
false
false
false
0
getLastItemInHeiracy(void) const { const fl_AutoNum * pAuto = this; pf_Frag_Strux* pLastItem = NULL; bool bLoop = true; fl_AutoNum * pNext = NULL; UT_uint32 numLists = m_pDoc->getListsCount(); UT_uint32 i=0; while(bLoop) { pLastItem = pAuto->getLastItem(); ...
false
false
false
false
false
0
create_visor_device(struct visor_device *dev) { int rc = -1; u32 chipset_bus_no = dev->chipset_bus_no; u32 chipset_dev_no = dev->chipset_dev_no; POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, chipset_dev_no, chipset_bus_no, POSTCODE_SEVERITY_INFO); sema_init(&dev->visordriver_callback_lock, 1); /* unlocked */ dev...
false
false
false
false
false
0
input_conn_new(struct input_device *idev, const char *uuid, int timeout) { struct input_conn *iconn; iconn = g_new0(struct input_conn, 1); iconn->timeout = timeout; iconn->uuid = g_strdup(uuid); iconn->idev = idev; return iconn; }
false
false
false
false
false
0
pop_user(CONNECTION * con, char **pkt, USER ** user) { ASSERT(validate_connection(con)); ASSERT(pkt != 0 && *pkt != 0); ASSERT(user != 0); if(ISSERVER(con)) { char *ptr; if(**pkt != ':') { /* log_message_level( LOG_LEVEL_SERVER, "pop_user: (tag %d) server ...
false
false
false
false
false
0
queryFinished(const QHostInfo& info) { Query* query = static_cast<Query* >(sender()); openQueries.remove(query->hostName()); if (info.error() == QHostInfo::NoError) { dnsCache.insert(query->hostName(), new QPair<QHostInfo, QTime>(info, QTime::currentTime())); } query->deleteLater...
false
false
false
false
false
0
drm_lock_take(struct drm_lock_data *lock_data, unsigned int context) { unsigned int old, new, prev; volatile unsigned int *lock = &lock_data->hw_lock->lock; spin_lock_bh(&lock_data->spinlock); do { old = *lock; if (old & _DRM_LOCK_HELD) new = old | _DRM_LOCK_CONT; else { new = context | _DRM_LOCK_H...
false
false
false
false
false
0
update_frametailpos(WindowObject winobj, TupleTableSlot *slot) { WindowAggState *winstate = winobj->winstate; WindowAgg *node = (WindowAgg *) winstate->ss.ps.plan; int frameOptions = winstate->frameOptions; if (winstate->frametail_valid) return; /* already known for current row */ if (frameOptions & FRA...
false
false
false
false
false
0
KTraderParse_putSymbolInBrackets( char *_name ) { int l = strlen( _name )-1; char *p = (char *)malloc( l ); if (p != NULL) { strncpy( p, _name+1, l-1 ); p[l-1] = 0; } return p; }
false
true
false
false
false
1
ensSliceadaptorCacheInsert(EnsPSliceadaptor sla, EnsPSlice *Pslice) { ajint start = 0; ajint end = 0; ajint strand = 0; AjPStr ikey = NULL; AjPStr nkey = NULL; EnsPCoordsystem cs = NULL; EnsPSlice slice1 = NULL; EnsPSlice slice2 = NULL; if (!sla) return ajFalse; ...
false
false
false
false
false
0
hexchat_list_get (hexchat_plugin *ph, const char *name) { hexchat_list *list; list = malloc (sizeof (hexchat_list)); list->pos = NULL; switch (str_hash (name)) { case 0x556423d0: /* channels */ list->type = LIST_CHANNELS; list->next = sess_list; break; case 0x183c4: /* dcc */ list->type = LIST_DCC; ...
false
false
false
false
false
0
intel_fbc_hw_tracking_covers_screen(struct intel_crtc *crtc) { struct drm_i915_private *dev_priv = crtc->base.dev->dev_private; struct intel_fbc *fbc = &dev_priv->fbc; unsigned int effective_w, effective_h, max_w, max_h; if (INTEL_INFO(dev_priv)->gen >= 8 || IS_HASWELL(dev_priv)) { max_w = 4096; max_h = 4096; ...
false
false
false
false
false
0
makecache(char *directory, int recurse) { GDir *dir; GError *error = NULL; dir = g_dir_open (directory, 0, &error); if (!dir) { printf("Error opening %s: %s\n", directory, error->message); g_clear_error (&error); return; } while (TRUE) { const char *name =...
false
false
false
false
false
0
netsnmp_save_all_data_callback(int major, int minor, void *serverarg, void *clientarg) { netsnmp_data_list_saveinfo *info = (netsnmp_data_list_saveinfo *)clientarg; if (!clientarg) { snmp_log(LOG_WARNING, "netsnmp_save_all_data_callback called with no passed data"); ...
false
false
false
false
false
0
histogramCharacters( const char *string, int length, char hist[ 256 ], int init ) { int i; const char *c; if ( init ) for ( i = 0; i < 256; i++ ) hist[ i ] = 0; for ( c = string; c < &string[ length ]; c++ ) hist[ *( ( unsigned char * ) c ) ] |= 1; }
false
false
false
false
false
0
_Sample_Field(Field field, int n, Array grid) { Object pos, con; int reg; if (DXEmptyField(field)) return (Object)DXEndField(DXNewField()); con = DXGetComponentValue(field, "connections"); if (! con) con = DXGetComponentValue(field, "faces"); if (! con) con = DXGetCompo...
false
false
false
false
false
0
singleton_aspects (CTranslationUnit &tunit) { CSemDatabase &db = tunit.db (); for (int a = 0; a < db.AspectInfos (); a++) { ACAspectInfo *ai = db.AspectInfo (a); if (ai->is_abstract ()) continue; _code_weaver.singleton (ai); } }
false
false
false
false
false
0
unloadMap(uint32 mapId) { if (loadedMMaps.find(mapId) == loadedMMaps.end()) { // file may not exist, therefore not loaded DEBUG_FILTER_LOG(LOG_FILTER_MAP_LOADING, "MMAP:unloadMap: Asked to unload not loaded navmesh map %03u", mapId); return false; } ...
false
false
false
false
false
0
genbank_verify_accession() { int indi, /*index,*/ len, count, remainder; char temp[LONGTEXT]; /* char *Reallocspace(); */ /* void warning(); */ if(Cmpstr(data.gbk.accession, "No information\n")==EQ) return; len=Lenstr(data.gbk.accession); if((len % 7)!=0) { if(warning_out) ...
false
false
false
false
false
0
init_default_chset() { const char *old_locale=NULL; const char *chset=NULL; char *locale_cpy=NULL; char buf[sizeof(default_chset_buf)]; chset=getenv("MM_CHARSET"); if (chset == NULL) chset=getenv("CHARSET"); if (chset == NULL) { #if HAVE_LOCALE_H #if HAVE_SETLOCALE old_locale=setlocale(LC_ALL, ""); loc...
true
true
true
false
true
1
readFile(const string &filename) { // First clear existing data if (data.size() > 0) deleteList(); //cerr << "Will now read file: " << filename << std::endl; // Now read file FILE *istr = fopen(filename.c_str(), "r"); // FIXME: Do a lot of error checking here. if (!istr) { int errsv = errno...
false
false
false
false
false
0
sumo_enable_sclk_ds(struct radeon_device *rdev, bool enable) { if (enable) { u32 deep_sleep_cntl = RREG32(DEEP_SLEEP_CNTL); u32 deep_sleep_cntl2 = RREG32(DEEP_SLEEP_CNTL2); u32 t = 1; deep_sleep_cntl &= ~R_DIS; deep_sleep_cntl &= ~HS_MASK; deep_sleep_cntl |= HS(t > 4095 ? 4095 : t); deep_sleep_cntl2 |=...
false
false
false
false
false
0
gst_freeze_play (GstPad * pad, GstBuffer * buff) { GstFreeze *freeze; GstFlowReturn ret = GST_FLOW_OK; freeze = GST_FREEZE (gst_pad_get_parent (pad)); if (freeze->on_flush) { g_object_unref (freeze); return GST_FLOW_WRONG_STATE; } /* If it is working in push mode this function will be called by "...
false
false
false
false
false
0
php_array_user_key_compare(const void *a, const void *b TSRMLS_DC) /* {{{ */ { Bucket *f; Bucket *s; zval *key1, *key2; zval **args[2]; zval *retval_ptr = NULL; long result; ALLOC_INIT_ZVAL(key1); ALLOC_INIT_ZVAL(key2); args[0] = &key1; args[1] = &key2; f = *((Bucket **) a); s = *((Bucket **) b); if (f-...
false
false
false
false
false
0
add_file( FILE * fp, /* Open file pointer */ const char * src_dir, /* Directory of source */ const char * filename, /* Name of the file */ const char * fullname, /* Full path list */ int include_op...
false
false
false
false
false
0
inivec(int l, int u, real_t a[], real_t x) { for (; l<=u; l++) a[l]=x; }
false
false
false
false
false
0
gfarm_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, const char *where, const char *what) { int err = pthread_cond_wait(cond, mutex); if (err != 0) gflog_fatal(GFARM_MSG_1000216, "%s: %s cond wait: %s", where, what, strerror(err)); }
false
false
false
false
false
0
read_next(void) { int ch2, ch1, ch; char *p; /* read words until we find a sole "%" */ ch2 = ch1 = ch = ' '; while ((ch = fgetc(fh)) != EOF && !(ch1 == '%' && isspace(ch2) && isspace(ch))) { ch2 = ch1; ch1 = ch; } if (ch == EOF) { /* read error (could be EOF, then it's a format error)...
false
false
false
false
true
1
H5A_dense_btree2_corder_compare(const void *_bt2_udata, const void *_bt2_rec) { const H5A_bt2_ud_common_t *bt2_udata = (const H5A_bt2_ud_common_t *)_bt2_udata; const H5A_dense_bt2_corder_rec_t *bt2_rec = (const H5A_dense_bt2_corder_rec_t *)_bt2_rec; herr_t ret_value; /* Return value */ FUNC_E...
false
false
false
false
false
0