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
ext2_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct inode *inode = file_inode(vma->vm_file); struct ext2_inode_info *ei = EXT2_I(inode); int ret; if (vmf->flags & FAULT_FLAG_WRITE) { sb_start_pagefault(inode->i_sb); file_update_time(vma->vm_file); } down_read(&ei->dax_sem); ret = __da...
false
false
false
false
false
0
walk_component(struct nameidata *nd, int flags) { struct path path; struct inode *inode; unsigned seq; int err; /* * "." and ".." are special - ".." especially so because it has * to be able to know about the current root directory and * parent relationships. */ if (unlikely(nd->last_type != LAST_NORM)) {...
false
false
false
false
false
0
glade_gtk_widget_string_from_value (GladeWidgetAdaptor *adaptor, GladePropertyClass *klass, const GValue *value, GladeProjectFormat fmt) { if (klass->pspec->value_type == GLADE_TYPE_ACCEL_GLIST) return glade_accels_make_string (g_value_get_boxed (value)); else return GWA_GET_CLASS ...
false
false
false
false
false
0
bin_to_bcd(Bit8u value, bx_bool is_binary) { if (is_binary) return value; else return ((value / 10) << 4) | (value % 10); }
false
false
false
false
false
0
grab_cancelled_check (gpointer data) { ECanvas *canvas = data; if (GNOME_CANVAS (canvas)->grabbed_item == NULL) { canvas->grab_cancelled_cb = NULL; canvas->grab_cancelled_check_id = 0; canvas->grab_cancelled_time = 0; canvas->grab_cancelled_data = NULL; return FALSE; } if (gtk_grab_get_current ()) { g...
false
false
false
false
false
0
semantic(Scope *sc) { if (exp) { //printf("ExpStatement::semantic() %s\n", exp->toChars()); #if 0 // Doesn't work because of difficulty dealing with things like a.b.c!(args).Foo!(args) // See if this should be rewritten as a TemplateMixin if (exp->op == TOKdeclaration) { Dec...
false
false
false
false
false
0
lstnalloc(char *name, int pri, int retry, int retry_time_first, int retry_time_last, int domain, int type, int protocol, int r_namelen, void *l_nameinfo, int (*l_namefunc) (), int (*l_regfunc) (), void (*acptfunc) (), void *acb) { struct lstn *p = (struct lstn *) balloc(sizeof(*p)); if (name == (char *) (0)) n...
false
false
false
false
false
0
open_wmemstream (bufloc, sizeloc) wchar_t **bufloc; _IO_size_t *sizeloc; { struct locked_FILE { struct _IO_FILE_wmemstream fp; #ifdef _IO_MTSAFE_IO _IO_lock_t lock; #endif struct _IO_wide_data wd; } *new_f; wchar_t *buf; new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE)...
false
false
false
false
false
0
perf_workqueue_init(void) { perf_wq = create_singlethread_workqueue("perf"); WARN(!perf_wq, "failed to create perf workqueue\n"); return perf_wq ? 0 : -1; }
false
false
false
false
false
0
TransformOne(const int16_t* in, uint8_t* dst) { int C[4 * 4], *tmp; int i; tmp = C; for (i = 0; i < 4; ++i) { // vertical pass const int a = in[0] + in[8]; // [-4096, 4094] const int b = in[0] - in[8]; // [-4095, 4095] const int c = MUL(in[4], kC2) - MUL(in[12], kC1); // [-3783, 3783] ...
false
false
false
false
false
0
diva_dadapter_request( \ ENTITY IDI_CALL_ENTITY_T *e) { IDI_SYNC_REQ *syncReq = (IDI_SYNC_REQ *)e; if (e->Req) { /* We do not process it, also return error */ e->Rc = OUT_OF_RESOURCES; DBG_ERR(("Can't process async request, Req=%02x", e->Req)) return; } /* So, we process sync request */ switch (e->Rc) ...
false
false
false
false
false
0
parse_dumpvg_opts(dump_info_t *dumpvg_opts, intn *curr_arg, intn argc, char *argv[]) { intn ret_value = SUCCEED; /* traverse the command and process each option */ #if defined(WIN386) || defined(DOS386) while ((*curr_arg < argc) && ((argv[*curr_arg][0]...
false
false
false
false
false
0
VectorBondDerivative(double *pos_i, double *pos_j, double *force_i, double *force_j) { double ij[3]; VectorSubtract(pos_i, pos_j, ij); double rij = VectorLength(ij); if (rij < 0.1) { // atoms are too close to each other vector3 vij; vij.randomUn...
false
false
false
false
false
0
py_gc_skin_pixmap_load(PyObject* self, PyObject* args) { char* pixmapfile; GdkPixbuf* result; PyObject* pyresult; /* Parse arguments */ if(!PyArg_ParseTuple(args, "s:gc_skin_pixmap_load", &pixmapfile)) return NULL; /* Call the corresponding C function */ result = gc_skin_pixmap_load(pixmapfile); ...
false
false
false
false
false
0
getSubmatrix2x2( int i0, int j0 ) const { Matrix2f out; for( int i = 0; i < 2; ++i ) { for( int j = 0; j < 2; ++j ) { out( i, j ) = ( *this )( i + i0, j + j0 ); } } return out; }
false
false
false
false
false
0
Scalar(Glib::ustring const &label, Glib::ustring const &tooltip, Glib::ustring const &suffix, Glib::ustring const &icon, bool mnemonic) : Labelled(label, tooltip, new Gtk::SpinButton(), suffix, icon, mnemonic), setProgrammatically(false) { static_cast<Gtk::Spin...
false
false
false
false
false
0
fmt_convert_to_s20(int32_t *dest, void *src_v, int n, enum WavSampleFormat fmt) { int i, v; if(fmt == WAV_SAMPLE_FMT_U8) { uint8_t *src = src_v; for(i=0; i<n; i++) { dest[i] = (src[i] - 128) << 12; } } else if(fmt == WAV_SAMPLE_FMT_S16) { int16_t *src = src_v; ...
false
false
false
false
false
0
emit_vpiputv_evtrmsg(struct net_t *np, struct teputv_t *tepvp, int32 nbi) { int32 wid; word32 *ap, *bp; byte *sbp; char ts1[RECLEN], ts2[IDLEN], ts3[RECLEN], ts4[RECLEN]; if (np->n_isarr) { sprintf(ts3, "array word32 %s[%d]", np->nsym->synam, __unnormalize_ndx(np, nbi)); wid = np->nwid; } else if...
true
true
false
false
false
1
mts_transfer_done( struct urb *transfer ) { MTS_INT_INIT(); context->srb->result &= MTS_SCSI_ERR_MASK; context->srb->result |= (unsigned)(*context->scsi_status)<<1; mts_transfer_cleanup(transfer); }
false
false
false
false
false
0
cx23885_risc_databuffer(struct pci_dev *pci, struct cx23885_riscmem *risc, struct scatterlist *sglist, unsigned int bpl, unsigned int lines, unsigned int lpi) { u32 instructions; __le32 *rp; /* estimate risc mem: worst case is one write per page border + one write per scan line + syn...
false
false
false
false
false
0
find_new_referenced_vars_1 (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) { tree t = *tp; if (TREE_CODE (t) == VAR_DECL && !var_ann (t)) { add_referenced_var (t); mark_sym_for_renaming (t); } if (IS_TYPE_OR_DECL_P (t)) *walk_subtrees = 0; return NULL; }
false
false
false
false
false
0
exsltDateDifferenceFunction (xmlXPathParserContextPtr ctxt, int nargs) { xmlChar *ret, *xstr, *ystr; if (nargs != 2) { xmlXPathSetArityError(ctxt); return; } ystr = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt)) return; xstr = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt...
false
false
false
false
false
0
er_paf_get_matching_item (struct er_paf_config * paf_configuration, const char * this_pro_catg) { struct er_paf_config_item * config_item = NULL; unsigned int item; cpl_msg_indent_more(); /* Loop through the config pro catg regular expressions */ for(item = 0; item < paf_conf...
false
false
false
false
false
0
trySemantic3(Scope *sc2) { // extracted to a function to allow windows SEH to work without destructors in the same function static int nest; if (++nest > 300) { global.gag = 0; // ensure error message gets printed error("recursive expansion"); fatal(); } semant...
false
false
false
false
false
0
_gcry_cipher_gcm_initiv (gcry_cipher_hd_t c, const byte *iv, size_t ivlen) { memset (c->u_mode.gcm.aadlen, 0, sizeof(c->u_mode.gcm.aadlen)); memset (c->u_mode.gcm.datalen, 0, sizeof(c->u_mode.gcm.datalen)); memset (c->u_mode.gcm.u_tag.tag, 0, GCRY_GCM_BLOCK_LEN); c->u_mode.gcm.datalen_over_limits = 0; c->u_mo...
false
false
false
false
false
0
WriteSystemExclusiveEvent ( const MIDITimedBigMessage &m ) { ENTER ( "void MIDIFileWrite::WriteSystemExclusiveEvent()" ); WriteDeltaTime ( m.GetTime() ); WriteCharacter ( m.GetStatus() ); // write System Exclusive Event type (0xF0 or 0xF7) IncrementCounters ( 1 ); int len = m.GetSysEx()->GetLength...
false
false
false
false
false
0
assign_fixed_resource_on_bus(struct pci_bus *b, struct resource *r) { int i; struct resource *parent_r; unsigned long mask = IORESOURCE_IO | IORESOURCE_MEM | IORESOURCE_PREFETCH; pci_bus_for_each_resource(b, parent_r, i) { if (!parent_r) continue; if ((r->flags & mask) == (parent_r->flags & mask) &...
false
false
false
false
false
0
PromoteIntRes_VAARG(SDNode *N) { SDValue Chain = N->getOperand(0); // Get the chain. SDValue Ptr = N->getOperand(1); // Get the pointer. EVT VT = N->getValueType(0); DebugLoc dl = N->getDebugLoc(); EVT RegVT = TLI.getRegisterType(*DAG.getContext(), VT); unsigned NumRegs = TLI.getNumRegisters(*DAG.getContex...
false
false
false
false
false
0
switch_to_user (const char *cvs_username, const char *username) { struct passwd *pw; #ifdef HAVE_PAM int retval; char *pam_stage = "open session"; if (pamh) { retval = pam_open_session (pamh, 0); if (retval == PAM_SUCCESS) { pam_stage = "get pam user"; ...
false
false
false
false
false
0
wheelEvent( QWheelEvent * e ) { if( e->orientation() == Qt::Vertical && vScrollBar && vScrollBar->isVisible() ) QApplication::sendEvent( vScrollBar, e ); }
false
false
false
false
false
0
runcpsav(runcxdef *ctx, uchar *noreg *cp, objnum obj, prpnum prop) { uint ofs; VARUSED(prop); /* get offset from start of object */ ofs = *cp - mcmobjptr(ctx->runcxmem, (mcmon)obj); /* clear the pointer so the caller knows the object is unlocked */ *cp = 0; /* unlock the ...
false
false
false
false
false
0
r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO) { struct cmd_obj *ph2c; struct DisconnectCtrlEx_param *param; struct cmd_priv *pcmdpriv = &adapter->cmdpriv; ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC); if (ph2c == NULL) return _FAIL; ...
false
false
false
false
false
0
push_or_pop_chat_roster(int push_or_pop) { static dialogue_option LocalChatRoster[MAX_DIALOGUE_OPTIONS_IN_ROSTER]; if (push_or_pop == PUSH_ROSTER) { memcpy(LocalChatRoster, ChatRoster, sizeof(dialogue_option) * MAX_DIALOGUE_OPTIONS_IN_ROSTER); int i; for (i = 0; i < MAX_DIALOGUE_OPTIONS_IN_ROSTER; i++) clea...
false
false
false
false
false
0
SetFileToHash() { #ifdef __WXMSW__ wxString browseroot; LPITEMIDLIST pidl; HRESULT hr = SHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &pidl); if (SUCCEEDED(hr)) { if (!SHGetPathFromIDList(pidl, wxStringBuffer(browseroot, MAX_PATH))) { browseroot = wxFileName::GetHomeDir(); } } else { browseroot = wxFil...
false
false
false
false
false
0
EventPlayerLoggedOut(Player* player) { // player is correct pointer, it is checked in WorldSession::LogoutPlayer() m_OfflineQueue.push_back(player->GetObjectGuid()); m_Players[player->GetObjectGuid()].OfflineRemoveTime = sWorld.GetGameTime() + MAX_OFFLINE_TIME; if (GetStatus() == STATUS_IN_PROGRESS) ...
false
false
false
false
false
0
track_extend(smf_track_t *track, const int length) { void *buf; assert(track->smf); buf = smf_extend(track->smf, length); if (buf == NULL) return (NULL); track->file_buffer_length += length; if (track->file_buffer == NULL) track->file_buffer = buf; return (buf); }
false
false
false
false
false
0
temp_from_u16_adt7461(struct lm90_data *data, u16 val) { if (data->flags & LM90_FLAG_ADT7461_EXT) return (val - 0x4000) / 64 * 250; else return temp_from_s16(val); }
false
false
false
false
false
0
AddTextAndSave(PIXA *pixa, PIX *pixs, l_int32 newrow, L_BMF *bmf, const char *textstr, l_int32 location, l_uint32 val) { l_int32 n, ovf; PIX *pixt; pixt = pixAddSingleTextblock(pixs, b...
false
false
false
false
false
0
util_exec (const char *cmd) { char **argv; int argc; #ifndef WIN32 int pid; int fd; #endif if (my_poptParseArgvString (cmd, &argc, &argv) != 0) return -1; #ifndef WIN32 pid = fork (); if (pid == -1) return -1; if (pid == 0) { /* Now close all open file descriptors except stdin, stdout and stderr */ f...
false
false
false
false
true
1
delete_group_member_from_group(Group_definition *gd, char *jurisdiction, char *name) { Group_member *gm, *gm_prev; gm_prev = NULL; for (gm = gd->group_member_head; gm != NULL; gm = gm->next) { if (name_eq(gm->jurisdiction, jurisdiction, DACS_NAME_CMP_CONFIG) && name_eq(gm->name, name, DACS_NAME_CMP_...
false
false
false
false
false
0
flst_validate( /*==========*/ const flst_base_node_t* base, /*!< in: pointer to base node of list */ mtr_t* mtr1) /*!< in: mtr */ { ulint space; ulint zip_size; const flst_node_t* node; fil_addr_t node_addr; fil_addr_t base_addr; ulint len; ulint i; mtr_t mtr2; ut_ad(base); ut_ad(mtr_memo_con...
false
false
false
false
false
0
sumo_program_power_level(struct radeon_device *rdev, struct sumo_pl *pl, u32 index) { struct sumo_power_info *pi = sumo_get_pi(rdev); int ret; struct atom_clock_dividers dividers; u32 ds_en = RREG32(DEEP_SLEEP_CNTL) & ENABLE_DS; ret = radeon_atom_get_clock_dividers(rdev, COMPUTE_ENGINE_PLL_PARAM, ...
false
false
false
false
false
0
get_format_from_mode(dc1394video_mode_t mode, uint32_t *format) { dc1394error_t err=DC1394_SUCCESS; if ((mode>=DC1394_VIDEO_MODE_FORMAT0_MIN)&&(mode<=DC1394_VIDEO_MODE_FORMAT0_MAX)) { *format=DC1394_FORMAT0; } else if ((mode>=DC1394_VIDEO_MODE_FORMAT1_MIN)&&(mode<=DC1394_VIDEO_MODE_FORMAT1_MAX)...
false
false
false
false
false
0
plugin_search(const char *search_string, int case_sense, struct search_result **sr) { GList *records; GList *temp_list; buf_rec *br; struct MyExpense mexp; int num, count; char *line; jp_logf(JP_LOG_DEBUG, "Expense: plugin_search\n"); records = NULL; *sr = NULL; /* This function take...
false
false
false
false
false
0
XbaeMatrixRowColToXY(w, row, column, x, y) Widget w; int row; int column; int *x; int *y; { XbaeMatrixWidget mw; if (!XtIsSubclass(w, xbaeMatrixWidgetClass)) return False; mw = (XbaeMatrixWidget)w; xbaeRowColToXY(mw, row, column, x, y); return True; }
false
false
false
false
false
0
icmYxy2XYZ(double *out, double *in) { double Y = in[0]; double x = in[1]; double y = in[2]; double z = 1.0 - x - y; double sum; if (y < 1e-9) { out[0] = out[1] = out[2] = 0.0; } else { sum = Y/y; out[0] = x * sum; out[1] = Y; out[2] = z * sum; } }
false
false
false
false
false
0
temp_label(struct adt7462_data *data, int which) { switch (which) { case 0: return "local"; case 1: if (data->pin_cfg[0] & ADT7462_DIODE1_INPUT) return "remote1"; break; case 2: return "remote2"; case 3: if (data->pin_cfg[0] & ADT7462_DIODE3_INPUT) return "remote3"; break; } return "N/A"; }
false
false
false
false
false
0
list_find_next_playable(GList * list) { ListItem *item; GList *iter; for (iter = list; iter != NULL; iter = g_list_next(iter)) { item = (ListItem *) iter->data; if (item != NULL) { if (item->played == FALSE && item->play == TRUE) { // printf("next playable is %s\...
false
false
false
false
false
0
clock_cooling_get_frequency(struct clock_cooling_device *ccdev, unsigned long level) { int ret = 0; unsigned long freq; ret = clock_cooling_get_property(ccdev, level, &freq, GET_FREQ); if (ret) return 0; return freq; }
false
false
false
false
false
0
SendData(Session* session, const DataMediaChannel::SendDataParams& params, const std::string& data) { DataChannel* data_channel = GetDataChannel(session); if (!data_channel) { LOG(LS_WARNING) << "Could not send data: no data channel."; return; } data_channel->Sen...
false
false
false
false
false
0
rest_of_handle_reorder_blocks (void) { basic_block bb; /* Last attempt to optimize CFG, as scheduling, peepholing and insn splitting possibly introduced more crossjumping opportunities. */ cfg_layout_initialize (CLEANUP_EXPENSIVE); if ((flag_reorder_blocks || flag_reorder_blocks_and_partition) /* ...
false
false
false
false
false
0
getSettingsFileName( char *inSettingName ) { char **pathSteps = new char*[1]; pathSteps[0] = mStaticMembers.mDirectoryName; char *fileName = new char[ strlen( inSettingName ) + 10 ]; sprintf( fileName, "%s.ini", inSettingName ); File *settingsFile = new File( new Path( pathSteps, 1, false ),...
false
false
false
false
false
0
fold_real_zero_addition_p (tree type, tree addend, int negate) { if (!real_zerop (addend)) return false; /* Don't allow the fold with -fsignaling-nans. */ if (HONOR_SNANS (TYPE_MODE (type))) return false; /* Allow the fold if zeros aren't signed, or their sign isn't important. */ if (!HONOR_SIGNED...
false
false
false
false
false
0
handleLoops(bool ExitUseAllowed, BasicBlock *LoopEnd) { RegionNode *Node = Order.back(); BasicBlock *LoopStart = Node->getEntry(); if (!Loops.count(LoopStart)) { wireFlow(ExitUseAllowed, LoopEnd); return; } if (!isPredictableTrue(Node)) LoopStart = needPrefix(tru...
false
false
false
false
false
0
pilMsgSetRecipeName(const char *name) { if (strlen(name) >= MAX_RECIPE_NAME) { strncpy(recipeName, name, MAX_RECIPE_NAME); recipeName[MAX_RECIPE_NAME-1] = '\0'; } else { strcpy(recipeName, name); } }
false
false
false
false
false
0
generate_multisetlimit_function(symmetryclass& symmetry) { if (already_generated_multisetlimit_function) return; else already_generated_multisetlimit_function = TRUE; if (strcmp(mu_name,"mu_0_boolean")!=0) fprintf(codefile, "void %s::MultisetLimit(PermSet& Perm)\n" "{ Error.Error(\"Intern...
false
false
false
false
false
0
main (int argc, char **argv) { rtx defn; int pattern_lineno, next_insn_code = 0; progname = argv[0]; if (argc <= 1) fatal ("no input file name"); if (init_md_reader_args_cb (argc, argv, parse_option) != SUCCESS_EXIT_CODE) return FATAL_EXIT_CODE; while ((defn = read_md_rtx (&pattern_lineno, &next_i...
false
false
false
false
false
0
blank() const { for( unsigned i = 0; i < sblock_vector.size(); ++i ) if( sblock_vector[i].status() != Sblock::non_tried ) return false; return true; }
false
false
false
false
false
0
quad_division_check(struct quaddata *data, int kmax) /* Checks if DATA needs to be divided. If data->points is empty, returns -1; if its not empty but there aren't enough points in DATA for division returns 0. Othervise (if its not empty and there are too many points) returns 1. Called by MT_insert() */ { ...
false
false
false
false
false
0
check_fig2sxd () { char cmd[20]; FILE *xfile; char myname[10]; have_fig2sxd = 0; snprintf (cmd,20, "fig2sxd 2>&1"); xfile = popen (cmd, "r"); if (!xfile) return; fscanf (xfile, "%s", myname); pclose (xfile); if (!strncmp(myname,"fig2sxd",7)) have_fig2sxd = 1; }
true
true
false
false
true
1
niu_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data) { struct niu *np = netdev_priv(dev); u32 offset, len, val; offset = eeprom->offset; len = eeprom->len; if (offset + len < offset) return -EINVAL; if (offset >= np->eeprom_len) return -EINVAL; if (offset + len > np->eeprom_...
false
false
false
false
false
0
CreatePaiol (format,ident,mode,blk,flg) char format; char *ident; char mode,blk,flg; { elt *tmp_elt; if (ind_tab_ident >= GNP_MAXTAB_IDENT) Erreur ("too mutch declared identifiers"); tmp_elt = SymbAlloc(ident,hash_paiol); racine_paiol = pat_addpaiol(racine_paiol, ...
false
false
false
false
false
0
mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event->buttons() == Qt::RightButton && (state() == VIEW || state() == ROTATED)) { this->setChildWidetVisibility(false); d->mPropertyAnimationForRotation->start(); AbstractDesktopWidget::mousePressEvent(event); //QGraphicsItem::mo...
false
false
false
false
false
0
match_appl_version(const void *data, const char *appl_version) { unsigned minor; if(sscanf(appl_version, "KADM0.%u", &minor) != 1) return 0; /*XXX*/ *(unsigned*)(intptr_t)data = minor; return 1; }
false
false
false
false
false
0
png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) { png_error(png_ptr, "Out of place tEXt"); info_ptr = info_ptr; /* To quiet some compiler warnings */ } #ifdef PNG_MAX_MALLOC_...
false
false
false
false
false
0
findNearestPoly(const float* center, const float* extents, const dtQueryFilter* filter, dtPolyRef* nearestRef, float* nearestPt) const { dtAssert(m_nav); *nearestRef = 0; // Get nearby polygons from proximity grid. dtPolyRef polys[128]; int polyCount = 0; if (queryPolygons(center, extents...
false
false
false
false
false
0
_eio_file_xattr_setup_get(Eio_File_Xattr *async, const char *path, const char *attribute, Eio_Error_Cb error_cb, const void *data) { async->path = eina_stringshare_add(path); async->attribute = eina_stringshare_add(attribute); async->set = EINA_FALSE; if (!eio_file_set(&async->common, ...
false
false
false
false
false
0
fuse_prepare_release(struct fuse_file *ff, int flags, int opcode) { struct fuse_conn *fc = ff->fc; struct fuse_req *req = ff->reserved_req; struct fuse_release_in *inarg = &req->misc.release.in; spin_lock(&fc->lock); list_del(&ff->write_entry); if (!RB_EMPTY_NODE(&ff->polled_node)) rb_erase(&ff->polled_node, &...
false
false
false
false
false
0
ttm_to_type(int flags, enum ttm_caching_state cstate) { enum pool_type type = IS_UNDEFINED; if (flags & TTM_PAGE_FLAG_DMA32) type |= IS_DMA32; if (cstate == tt_cached) type |= IS_CACHED; else if (cstate == tt_uncached) type |= IS_UC; else type |= IS_WC; return type; }
false
false
false
false
false
0
_scan_block(void) { void *dir = scan_dir(SYSFS_CLASS_BLOCK); if (dir) { list_for_each(dir, _block_add); list_fini(dir); } return STATUS_SUCCESS; }
false
false
false
false
false
0
smp_fetch_sc_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw) { struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw); if (!stkctr) return 0; smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; s...
false
false
false
false
false
0
removeItems(const QList<QOrganizerItemId>& organizeritemIds) { d->m_errorMap.clear(); if (organizeritemIds.isEmpty()) { d->m_error = QOrganizerManager::BadArgumentError; return false; } d->m_error = QOrganizerManager::NoError; return d->m_engine->removeItems(organizeritemIds, &d->m_...
false
false
false
false
false
0
invertCharField (struct charField * cf) { int i; for (i=0; i < CFCLEN; i++) cf->content[i] = ~cf->content[i]; }
false
false
false
false
false
0
setStaticAndUpdate( bool bStatic ) { //We were dirty but didn't update bounds. Do it now. if( mKeepStatic && mBoundsDirty ) mCreator->_addDirtyBatch( this ); mKeepStatic = bStatic; if( mKeepStatic ) { //One final update, since there will be none from ...
false
false
false
false
false
0
cavan_usb_write_data(struct cavan_usb_descriptor *desc, const void *buff, size_t size) { ssize_t writelen; struct cavan_usb_data_header hdr = { .data_length = size, .data_check = ~size }; writelen = cavan_usb_bluk_write(desc, &hdr, sizeof(hdr)); if (writelen < (ssize_t) sizeof(hdr)) { pr_red_pos(); retu...
false
false
false
false
false
0
mif_load(const gchar *filename, G_GNUC_UNUSED GwyRunType mode, GError **error) { GwyContainer *container = NULL; guchar *buffer = NULL; gsize size = 0; GError *err = NULL; MIFFile mfile; GwyDataField *dfield; guint i; if (!gwy_file_get_contents(filename, &buffer, &size...
false
false
false
false
false
0
lpfc_sli_abort_iotag_issue(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, struct lpfc_iocbq *cmdiocb) { struct lpfc_vport *vport = cmdiocb->vport; struct lpfc_iocbq *abtsiocbp; IOCB_t *icmd = NULL; IOCB_t *iabt = NULL; int ring_number; int retval; unsigned long iflags; /* * There are certain comma...
false
false
false
false
false
0
virtualHelpString(int x_,int y_) { int row,col; if (x_>=0&&y_>=0) { y_-=panner()->y_origin(); x_-=panner()->x_origin(); col=(x_<fixedColumnPixelWidth())? xToColumn(x_-labelWidth()): xToColumn(x_-labelWidth())+firstColumn(); row=yToRow(y_-headingsHeight())+firstRow(); ...
false
false
false
false
false
0
gkm_data_der_write_private_pkcs8_crypted (gcry_sexp_t skey, const gchar *password, gsize n_password) { gcry_error_t gcry; gcry_cipher_hd_t cih; GNode *asn = NULL; GBytes *key, *data; guchar *raw; gsize n_raw, n_key; gsize block =...
false
false
false
false
false
0
UpdateTable(const mettable * pmt, /*lint -e{818} */ float met[MAXSCORE][MAXSCORE], const metinfo * pmi, const unsigned int nRows, const unsigned int nCols, const int fInvert) { unsigned int i, j; char sz[9]; /* set labels */ gtk_label_set_text(GTK_LABEL(pmt->pwName), (char *) ...
false
false
false
false
false
0
fc_lport_enter_reset(struct fc_lport *lport) { FC_LPORT_DBG(lport, "Entered RESET state from %s state\n", fc_lport_state(lport)); if (lport->state == LPORT_ST_DISABLED || lport->state == LPORT_ST_LOGO) return; if (lport->vport) { if (lport->link_up) fc_vport_set_state(lport->vport, FC_VPORT_INITIALIZ...
false
false
false
false
false
0
amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser, int error, bool backoff) { struct amdgpu_fpriv *fpriv = parser->filp->driver_priv; unsigned i; if (!error) { amdgpu_vm_move_pt_bos_in_lru(parser->adev, &fpriv->vm); /* Sort the buffer list from the smallest to largest buffer, * which affects the order o...
false
false
false
false
false
0
butTbin_create(ButWin *win, int layer, int flags, const char *text) { But *but; Tbin *tb; TbinLoc tbinLoc; tb = wms_malloc(sizeof(Tbin)); MAGIC_SET(tb); but = but_create(win, tb, &action); but->layer = layer; but->flags = flags; if (text == NULL) text = ""; tb->cTimer = NULL; tb...
false
false
false
false
false
0
draw(Renderer* renderer, flagName geometry_type, int body_id, int direction, bool is_first_loop) { if ( isIntraLayerBoundary() ) { //drawMode = DM_INTRA_LAYER; } Body* bd = model->getBodyById(body_id); int layer; if ( body_id == modelData->parent1Id ) layer = modelData->parent1Layer; else if ( bod...
false
false
false
false
false
0
SetPrototypeProperty(Handle<JSFunction> func, Handle<JSObject> value) { CALL_HEAP_FUNCTION_VOID(func->SetPrototype(*value)); }
false
false
false
false
false
0
unity_webapps_service_shutdown (UnityWebappsService *service) { GError *error; g_return_if_fail (UNITY_WEBAPPS_IS_SERVICE (service)); error = NULL; unity_webapps_gen_service_call_shutdown_sync (service->priv->service_proxy, NULL /* Cancellable */, &error); if (error != NULL) { ...
false
false
false
false
false
0
find_player_socket(PSNET_SOCKET_RELIABLE sock) { int i; for (i = 0; i < MAX_PLAYERS; i++ ) { if ( !MULTI_CONNECTED(Net_players[i])){ continue; } if(sock == Net_players[i].reliable_socket){ return i; } } // couldn't find the player return -1; }
false
false
false
false
false
0
cnf_rmall( id ) int id; { int sock; char mapid[MAP_LEN] ; u_short this_op = TSH_RMALL; sng_map *link_pt; tsh_get_it out; tsh_get_ot1 in1; this_op = htons(this_op) ; link_pt = handles[id]; if ((sock = get_socket()) == -1) { perror("cnf_tsget: get_socket error\n") ; close(sock);...
false
false
false
false
false
0
main(int argc, char **argv) { Real8 cutoffradian = 30.0*Pi/180.0; char * fin=0,*fout=0,*fgeom=0; verbosity = 2; int ok=0,i=0; if (argc >= 3) { fin=argv[1]; fout=argv[2]; ok= !access(fin,R_OK) && (access(fout,F_OK) || !access(fout,W_OK)) ; } for (i=3;i<argc && ok ;i+=2) if (...
false
false
false
false
true
1
mix_colors(void) { short i, j; char *t; extern char *po_color[]; for (i = 0; i < POTIONS; i++) { strcpy(id_potions[i].title, po_color[i]); /* by Yahsa */ /* id_potions[i].title = po_color[i];*/ } for (i = 0; i < POTIONS; i++) { j = get_rand(i, POTIONS - 1); swap_string(id_potions[i].title, ...
false
true
false
false
false
1
symbol_bd_get_autocomp_from_cache(gchar *cache_str, gchar *cache_completion, const gchar *symbol_prefix) { GString *result=NULL; /* Autocompletion optimization: * we store last text typed and we compare with actual text. If current text typed * refine last search we take that search and remove words that ...
false
false
false
false
false
0
SetTextTags(cmsHPROFILE hProfile, const wchar_t* Description) { cmsMLU *DescriptionMLU, *CopyrightMLU; cmsBool rc = FALSE; cmsContext ContextID = cmsGetProfileContextID(hProfile); DescriptionMLU = cmsMLUalloc(ContextID, 1); CopyrightMLU = cmsMLUalloc(ContextID, 1); if (DescriptionMLU ...
false
false
false
false
false
0
modeSwitch (const int action, int & selectedGame, int & selectedLevel) { // If editing, check that the user has saved changes. // Note: KGoldrunner::setEditMenu disables/enables SAVE_GAME, PAUSE, // HIGH_SCORE, KILL_HERO, HINT and INSTANT_REPLAY, so they are not relevant // her...
false
false
false
false
false
0
mpfr_mul_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode) { int res; if (u >= 0) res = mpfr_mul_ui (y, x, u, rnd_mode); else { res = -mpfr_mul_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode)); MPFR_CHANGE_SIGN (y); } return res; }
false
false
false
false
false
0
compress_deflate_zlib(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned& out_size, int compression_level, int strategy, int mem_level) { z_stream stream; stream.next_in = const_cast<unsigned char*>(in_data); stream.avail_in = in_size; stream.next_out = out_data; stream.avail_out = ...
false
false
false
false
false
0
intel_fbc_flush(struct drm_i915_private *dev_priv, unsigned int frontbuffer_bits, enum fb_op_origin origin) { struct intel_fbc *fbc = &dev_priv->fbc; if (!fbc_supported(dev_priv)) return; if (origin == ORIGIN_GTT || origin == ORIGIN_FLIP) return; mutex_lock(&fbc->lock); fbc->busy_bits &= ~frontbuffe...
false
false
false
false
false
0
regTestWritePixAndCheck(L_REGPARAMS *rp, PIX *pix, l_int32 format) { char namebuf[256]; PROCNAME("regTestWritePixAndCheck"); if (!rp) return ERROR_INT("rp not defined", procName, 1); if (!pix) { rp->success = FALSE; ...
false
false
false
false
false
0
error_idle_func (void * unused) { pthread_mutex_lock (& error_mutex); char * message; while ((message = g_queue_pop_head (& error_queue))) { pthread_mutex_unlock (& error_mutex); if (current_interface && PLUGIN_HAS_FUNC (current_interface, show_error)) current_interface->sh...
false
false
false
false
false
0
ng_dsp_init(struct ng_devstate *dev, char *device, int record) { struct list_head *item; struct ng_dsp_driver *drv; void *handle; int err = ENODEV; /* check all dsp drivers */ list_for_each(item,&ng_dsp_drivers) { drv = list_entry(item, struct ng_dsp_driver, list); if (record && NULL =...
false
false
false
false
true
1
PathExists(const std::string& path) { if (path.empty()) { return false; } #if defined(__CYGWIN__) // Convert path to native windows path if possible. char winpath[MAX_PATH]; if (SystemTools::PathCygwinToWin32(path.c_str(), winpath)) { return (GetFileAttributesA(winpath) != INVALID_FILE_ATTRIBUTES); ...
false
false
false
false
false
0