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
savegame_exists(const char *name) { struct dirent **eps = NULL; int n = find_saved_games(&eps); int exists = 0; int i; for (i = 0; i < n; i++) { if (strcmp(eps[i]->d_name, name) == 0) { exists = 1; break; } } for (i = 0; i <n; i++) free(eps[i]); free(eps); return exists; }
false
false
false
false
false
0
GetImageTransition( int index ) { switch( index ) { case 0: return new Tweenies(); case 1: return new GDKImageTransitionAdapter( new ImageTransitionChromaKeyBlue() ); case 2: return new GDKImageTransitionAdapter( new ImageTransitionChromaKeyGreen() ); } return NULL; }
false
false
false
false
false
0
math_setdigits(LEN newdigits) { LEN olddigits; if (newdigits < 0) { math_error("Setting illegal number of digits"); /*NOTREACHED*/ } olddigits = conf->outdigits; conf->outdigits = newdigits; return olddigits; }
false
false
false
false
false
0
ixgbe_ndo_set_vf_rss_query_en(struct net_device *netdev, int vf, bool setting) { struct ixgbe_adapter *adapter = netdev_priv(netdev); /* This operation is currently supported only for 82599 and x540 * devices. */ if (adapter->hw.mac.type < ixgbe_mac_82599EB || adapter->hw.mac.type >= ixgbe_mac_X550) ...
false
false
false
false
false
0
kona_peri_clk_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { struct kona_clk *bcm_clk = to_kona_clk(hw); struct clk_hw *current_parent; unsigned long parent_rate; unsigned long best_delta; unsigned long best_rate; u32 parent_count; long rate; u32 which; /* * If there is no other pare...
false
false
false
false
false
0
StartTransaction() { GetLayerDefn(); if (bInTransaction) { CPLError(CE_Failure, CPLE_AppDefined, "Already in transaction"); return OGRERR_FAILURE; } if (!poDS->IsReadWrite()) { CPLError(CE_Failure, CPLE_AppDefined, "Operation not available in read-only ...
false
false
false
false
false
0
parse_instruction_file(const char *filename, Signatures &sigs, ErrorHandler *errh) { String text = file_string(filename, errh); const char *s = text.data(); int pos = 0; int len = text.length(); while (pos < len) { int pos1 = pos; while (pos < len && s[pos] != '\n' && s[pos] != '\r') po...
false
false
false
false
false
0
InitVolumeBounds( int NBounds,int N,Geometry_t *RTElements ) { int i; VolumeBounds = (VolumeBounds_t *)calloc( 1,sizeof(VolumeBounds_t) ); VolumeBounds->n = N; VolumeBounds->Elements = (int *)malloc( N*sizeof(int) ); for( i=0;i<N; i++ ) VolumeBounds->Elements[i] = i; VolumeBBox( VolumeBounds,...
false
true
false
false
false
1
connected (struct board *board, short move) { short maxcon = 1; short px, py, connect; /* Check vertical */ connect = 1; px = move; py = board->stack[move] - 1; while (py >= 0 && board->square[ELM (px, py)] == board->turn) { connect++; py--; } maxcon = max (connect, maxcon); /* Check h...
false
false
false
false
false
0
hash_table_find_all (GHashTable *hash_table, GHRFunc predicate, gpointer user_data) { HashTableFindAllData *data; GList *list; data = g_new0 (HashTableFindAllData, 1); data->predicate = predicate; data->user_data = ...
false
false
false
false
false
0
rt2400pci_interrupt(int irq, void *dev_instance) { struct rt2x00_dev *rt2x00dev = dev_instance; u32 reg, mask; /* * Get the interrupt sources & saved to local variable. * Write register value back to clear pending interrupts. */ rt2x00mmio_register_read(rt2x00dev, CSR7, &reg); rt2x00mmio_register_write(rt2x...
false
false
false
false
false
0
addParserHandlers(void) { std::list<ArConfigSection *>::const_iterator it; std::list<ArConfigArg> *params; std::list<ArConfigArg>::iterator pit; if (!myParser.addHandlerWithError("section", &mySectionCB)) { IFDEBUG(ArLog::log(ArLog::Verbose, "%sCould not add section parser (probably ...
false
false
false
false
false
0
__generic_file_write_iter(struct kiocb *iocb, struct iov_iter *from) { struct file *file = iocb->ki_filp; struct address_space * mapping = file->f_mapping; struct inode *inode = mapping->host; ssize_t written = 0; ssize_t err; ssize_t status; /* We can write back this queue in page reclaim */ current->back...
false
false
false
false
false
0
get_site_from_url (const gchar *url) { gchar *p; if (g_str_has_prefix (url, "file://")) { return NULL; } p = strstr (url, "://"); if (!p) { return NULL; } else { p += 3; } while (*p != '/') p++; return g_strndup (url, p - url); }
false
false
false
false
false
0
crlf_load_attributes(struct crlf_attrs *ca, git_repository *repo, const char *path) { #define NUM_CONV_ATTRS 3 static const char *attr_names[NUM_CONV_ATTRS] = { "crlf", "eol", "text", }; const char *attr_vals[NUM_CONV_ATTRS]; int error; error = git_attr_get_many(attr_vals, repo, 0, path, NUM_CONV_ATTRS, att...
true
true
false
false
false
1
WriteEffectPassShader(FCDObject* object, xmlNode* parentNode) { FCDEffectPassShader* effectPassShader = (FCDEffectPassShader*)object; xmlNode* shaderNode = AddChild(parentNode, DAE_SHADER_ELEMENT); // Write out the compiler information and the shader's name/stage if (!effectPassShader->GetCompilerTarget()....
false
false
false
false
false
0
dispatch_prescan(clcb_pre_scan cb, cli_ctx *ctx, const char *filetype, bitset_t *old_hook_lsig_matches, void *parent_property, unsigned char *hash, size_t hashed_size, int *run_cleanup) { int res=CL_CLEAN; UNUSEDPARAM(parent_property); UNUSEDPARAM(hash); UNUSEDPARAM(hashed_size); *run_cleanup = 0;...
false
false
false
false
false
0
delPrefix(SPtr<TIPv6Addr> x) { SPtr<TAddrPrefix> ptr; PrefixLst.first(); while (ptr = PrefixLst.get()) { /// @todo: should we compare prefix length, too? if (*(ptr->get())==(*x)) { PrefixLst.del(); return true; } } return false; }
false
false
false
false
false
0
_k_prevTip() { database->prevTip(); tipText->setHtml( QString::fromLatin1( "<html><body>%1</body></html>" ) .arg( i18n( database->tip().toUtf8() ) ) ); }
false
false
false
false
false
0
flickcurl_photos_getCounts(flickcurl* fc, const char** dates_array, const char** taken_dates_array) { xmlDocPtr doc = NULL; xmlXPathContextPtr xpathCtx = NULL; int** counts = NULL; char* dates = NULL; char* taken_dates = NULL; flickcurl_init_params(f...
false
false
false
false
false
0
LM_add_test (MODEL *pmod, DATASET *dset, int *list, gretlopt opt, PRN *prn) { MODEL aux; int err; err = add_residual_to_dataset(pmod, dset); if (err) { gretl_model_init(&aux, dset); aux.errcode = err; return aux; } list[1] = dset->v - 1; aux = lsq(list, dset, OLS, OPT_A | OPT_...
false
false
false
false
false
0
gionbana_scrolly_w(int data) { if (gionbana_flipscreen) gionbana_scrolly1 = -2; else gionbana_scrolly1 = 0; if (gionbana_flipscreen) gionbana_scrolly2 = (data ^ 0xff) & 0xff; else gionbana_scrolly2 = (data - 1) & 0xff; }
false
false
false
false
false
0
alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, API_PARSE *msg) { word Info; byte ret; dbug(1, dprintf("alert_req")); Info = _WRONG_IDENTIFIER; ret = false; if (plci) { Info = _ALERT_IGNORED; if (plci->State != INC_CON_ALERT) { Info = _WRONG_STATE; if (plci->Stat...
false
false
false
false
false
0
AcpiRsStrcpy ( char *Destination, char *Source) { UINT16 i; ACPI_FUNCTION_ENTRY (); for (i = 0; Source[i]; i++) { Destination[i] = Source[i]; } Destination[i] = 0; /* Return string length including the NULL terminat...
false
false
false
false
false
0
writeValue( const Value &value ) { switch ( value.type() ) { case nullValue: pushValue( "null" ); break; case intValue: pushValue( valueToString( value.asInt() ) ); break; case uintValue: pushValue( valueToString( value.asUInt() ) ); break; case realValue: pus...
false
false
false
false
false
0
create_content_view (NautilusWindowSlot *slot, const char *view_id, GError **error_out) { NautilusWindow *window; NautilusView *view; GList *selection; gboolean ret = TRUE; GError *error = NULL; NautilusDirectory *old_directory, *new_directory; GFile *old_location; window = nautilus_window...
false
false
false
false
false
0
reallochook (__ptr_t ptr, size_t size, const __ptr_t caller) { if (size == 0) { freehook (ptr, caller); return NULL; } struct hdr *hdr; size_t osize; if (pedantic) mcheck_check_all (); if (size > ~((size_t) 0) - (sizeof (struct hdr) + 1)) { __set_errno (ENOMEM); retu...
false
false
false
false
false
0
_ecore_thread_kill(Ecore_Pthread_Worker *work) { if (work->cancel) { if (work->func_cancel) work->func_cancel((void *)work->data, (Ecore_Thread *)work); } else { if (work->func_end) work->func_end((void *)work->data, (Ecore_Thread *)work); } if (work->fe...
false
false
false
false
false
0
dpm_srv_inc_reqctr(magic, req_data, clienthost, thip) int magic; char *req_data; char *clienthost; struct dpm_srv_thread_info *thip; { int c; char func[19]; gid_t gid; gid_t *gids; char groups[256]; int nbgids; char *p; char *rbp; uid_t uid; char *user; strcpy (func, "dpm_srv_inc_reqctr"); rbp = req_data; ...
false
false
false
false
false
0
runOnMachineFunction(MachineFunction &MF) { STI = &static_cast<const X86Subtarget &>(MF.getSubtarget()); TII = STI->getInstrInfo(); TRI = STI->getRegisterInfo(); X86FL = STI->getFrameLowering(); bool Modified = false; for (MachineBasicBlock &MBB : MF) Modified |= ExpandMBB(MBB); return Modified; }
false
false
false
false
false
0
ie31200_init(void) { edac_dbg(3, "MC:\n"); /* Ensure that the OPSTATE is set correctly for POLL or NMI */ opstate_init(); return pci_register_driver(&ie31200_driver); }
false
false
false
false
false
0
sel_netport_insert(struct sel_netport *port) { unsigned int idx; /* we need to impose a limit on the growth of the hash table so check * this bucket to make sure it is within the specified bounds */ idx = sel_netport_hashfn(port->psec.port); list_add_rcu(&port->list, &sel_netport_hash[idx].list); if (sel_netpor...
false
false
false
false
false
0
Restart(void) { Item *item; CF.cur_input = NULL; CF.abs_cursor = CF.rel_cursor = 0; for (item = root_item_ptr; item != 0; item = item->header.next) {/* all items */ switch (item->type) { case I_INPUT: if (!CF.cur_input) CF.cur_input = item; /* save old input values in a recall ring...
false
false
false
false
false
0
fl_mode_capable( int mode, int warn ) { int cap; if ( mode < 0 || mode > 5 ) { M_err( "fl_mode_capable", "Bad mode = %d", mode ); return 0; } cap = fli_depth( mode ) >= FL_MINDEPTH && fli_visual( mode ); if ( ! cap && warn ) M_warn( "fl_mode_capable", ...
false
false
false
false
false
0
pkix_CertSelector_Match_ExtendedKeyUsage( PKIX_ComCertSelParams *params, PKIX_PL_Cert *cert, PKIX_Boolean *pResult, void *plContext) { PKIX_List *extKeyUsageList = NULL; PKIX_List *certExtKeyUsageList = NULL; PKIX_PL_OID *ekuOid = NULL; PKIX_Boolean isCont...
false
false
false
false
false
0
phm_set_power_state(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *pcurrent_state, const struct pp_hw_power_state *pnew_power_state) { struct phm_set_power_state_input states; PHM_FUNC_CHECK(hwmgr); states.pcurrent_state = pcurrent_state; states.pnew_state = pnew_power_state; if (phm_cap_en...
false
false
false
false
false
0
heap_fetch(Relation relation, Snapshot snapshot, HeapTuple tuple, Buffer *userbuf, bool keep_buf, Relation stats_relation) { ItemPointer tid = &(tuple->t_self); ItemId lp; Buffer buffer; Page page; OffsetNumber offnum; bool valid; /* * Fetch and pin the appropriate page of the rel...
false
false
false
false
false
0
_mx_style_invalidate_cache (MxStylable *stylable) { GObject *object = G_OBJECT (stylable); MxStylableCache *cache = g_object_get_qdata (object, MX_STYLE_CACHE); /* Reset the cache string */ if (cache) { g_free (cache->string); cache->string = NULL; } }
false
false
false
false
false
0
psk_client_callback(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len) { struct mosquitto *mosq; int len; mosq = SSL_get_ex_data(ssl, tls_ex_index_mosq); if(!mosq) return 0; snprintf(identity, max_identity_len, "%s", mosq->tls_psk_identity...
false
false
false
false
false
0
up_daemon_check_hibernate_swap (UpDaemon *daemon) { gfloat waterline; if (daemon->priv->kernel_can_hibernate) { waterline = up_backend_get_used_swap (daemon->priv->backend); if (waterline < UP_DAEMON_SWAP_WATERLINE) { g_debug ("enough swap to for hibernate"); return TRUE; } else { g_debug ("not enough...
false
false
false
false
false
0
find_mount_table_base(const char *mounts, struct mount_table *mtab, const char *text) { const char *p; int ret; p = find_mount_table_item(mounts, text); if (p == NULL) { return NULL; } ret = parse_mount_table_simple(p, mtab); if (ret < 0) { return NULL; } return p; }
false
false
false
false
false
0
do_copy (CopyData *copy_data) { GVfsJobCopy *job = copy_data->job; GVfsBackendAfp *afp_backend = G_VFS_BACKEND_AFP (job->backend); GFileInfo *info; GError *err = NULL; gboolean source_is_dir; gboolean dest_exists; gboolean dest_is_dir; info = g_vfs_afp_volume_get_filedir_parms_finish (afp_backend...
false
false
false
false
false
0
gretl_int_from_string (const char *s, int *err) { char *test; double x; int n = 0; if (s == NULL || *s == 0) { *err = E_DATA; return 0; } errno = 0; n = strtol(s, &test, 10); if (errno == ERANGE) { *err = E_DATA; errno = 0; return 0; } if (*test == '\0') { return n; ...
false
false
false
false
false
0
parse_line (guint8 * buffer, GstRTSPMessage * msg) { GstRTSPHeaderField field; gchar *line = (gchar *) buffer; gchar *value; if ((value = strchr (line, ':')) == NULL || value == line) goto parse_error; /* trim space before the colon */ if (value[-1] == ' ') value[-1] = '\0'; /* replace the colo...
false
false
false
false
false
0
queue_mwi_event(const char *mbx, const char *ctx, int urgent, int new, int old) { struct ast_event *event; char *mailbox, *context; mailbox = ast_strdupa(mbx); context = ast_strdupa(ctx); if (ast_strlen_zero(context)) { context = "default"; } if (!(event = ast_event_new(AST_EVENT_MWI, AST_EVENT_IE_MAILBOX...
false
false
false
false
false
0
is_solid(int x,int y) { return (!isok(x,y) || IS_STWALL(levl[x][y].typ)); }
false
false
false
false
false
0
brcmf_cfg80211_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, u16 frame_type, bool reg) { struct brcmf_cfg80211_vif *vif; u16 mgmt_type; brcmf_dbg(TRACE, "Enter, frame_type %04x, reg=%d\n", frame_type, reg); mgmt_type = (frame_type & IEEE80211_FCTL_STYPE) >> 4; vif = container_...
false
false
false
false
false
0
calculateSwappingTime(Job *job) { unsigned int swaptime = job->getMemoryConsumption() * properties.swapping_time; if (swaptime % 1024 > 0) swaptime++; return swaptime / 1024; }
false
false
false
false
false
0
fm_tx_set_region(struct fmdev *fmdev, u8 region) { u16 payload; int ret; if (region != FM_BAND_EUROPE_US && region != FM_BAND_JAPAN) { fmerr("Invalid band\n"); return -EINVAL; } /* Send command to set the band */ payload = (u16)region; ret = fmc_send_cmd(fmdev, TX_BAND_SET, REG_WR, &payload, sizeof(payl...
false
false
false
false
false
0
gic_iter(kadm5_server_handle_t handle, enum init_type init_type, krb5_ccache ccache, krb5_principal client, char *pass, char *svcname, char *realm, char *full_svcname, unsigned int full_svcname_len) { kadm5_ret_t code; krb5_context ctx; krb5_keytab kt; krb5_get_init_creds_opt *opt = NU...
false
false
false
false
false
0
e_cal_util_parse_ics_string (const gchar *string) { GString *comp_str = NULL; gchar *s; icalcomponent *icalcomp = NULL; g_return_val_if_fail (string != NULL, NULL); /* Split string into separated VCALENDAR's, if more than one */ s = g_strstr_len (string, strlen (string), "BEGIN:VCALENDAR"); if (s == NULL) r...
false
false
false
false
false
0
toggle_Magic(x) int x; { if (is_Magic(x)) return un_Magic(x); return Magic(x); }
false
false
false
false
false
0
deviceSetCurrent() { //scan the network using each plugin available (by broadcast for osc, by scan for CopperLan?) to find the devices std::map<std::string, Plugin*>::iterator itr = netPlugins->begin(); while( itr != netPlugins->end()){ if (itr->second != NULL) { itr->second->deviceSetCurrent(netDevices); } ...
false
false
false
false
false
0
aes_crypt_cbc( aes_context *ctx, int mode, int length, unsigned char iv[16], const unsigned char *input, unsigned char *output ) { int i; unsigned char temp[16]; #if defined(XYSSL_PADLOCK_C) && defined(XYSSL_HAV...
true
true
false
false
false
1
data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); QModelIndex source = mapToSource(index); if (role == Qt::DisplayRole) { switch (index.column()) { case PatientName: return d->patientName(source); case PatientDateOfBirth: return d->pat...
false
false
false
false
false
0
GFCDirsSeparateToggle(GWindow gw,struct gmenuitem *mi,GEvent *e) { GFileChooser *gfc = (GFileChooser *) (mi->ti.userdata); unichar_t *dir; if ( dir_placement!=dirs_separate ) { GGadgetSetVisible(&gfc->subdirs->g,true); GFCRemetric(gfc); } dir_placement = dirs_separate; dir = GFileChooserGetC...
false
false
false
false
false
0
libssh2_sftp_write(LIBSSH2_SFTP_HANDLE *hnd, const char *buffer, size_t count) { ssize_t rc; if(!hnd) return LIBSSH2_ERROR_BAD_USE; BLOCK_ADJUST(rc, hnd->sftp->channel->session, sftp_write(hnd, buffer, count)); return rc; }
false
false
false
false
false
0
cliInitHelp() { int commandslen = sizeof(commandHelp)/sizeof(struct commandHelp); int groupslen = sizeof(commandGroups)/sizeof(char*); int i, len, pos = 0; helpEntry tmp; helpEntriesLen = len = commandslen+groupslen; helpEntries = malloc(sizeof(helpEntry)*len); for (i = 0; i < groupslen; i...
false
false
false
false
false
0
add_value(struct hive *hdesc, int nkofs, char *name, int type) { struct nk_key *nk; int oldvlist = 0, newvlist, newvkofs; struct vk_key *newvkkey; char *blank=""; if (!name || !*name) return(NULL); nk = (struct nk_key *)(hdesc->buffer + nkofs); if (nk->id != 0x6b6e) { printf("add_value: Key pointer...
false
false
false
false
false
0
_update_node_filesystem(void) { acct_filesystem_data_t *fls; int rc = SLURM_SUCCESS; slurm_mutex_lock(&lustre_lock); rc = _read_lustre_counters(); fls = xmalloc(sizeof(acct_filesystem_data_t)); fls->reads = lustre_se.all_lustre_nb_reads; fls->writes = lustre_se.all_lustre_nb_writes; fls->read_size = (double)...
false
false
false
false
false
0
object_read_xml (AmitkObject * object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf) { AmitkSpace * space; xmlNodePtr children_nodes; GList * children; AmitkSelection i_selection; space = amitk_space_read_xml(nodes, "coordinate_space", &error_buf); amitk_space_copy_in_place(AMITK_SPACE(object)...
false
false
false
false
false
0
init_config_attrs(ConfigTable *ct) { int i, code; for (i=0; ct[i].name; i++ ) { if ( !ct[i].attribute ) continue; code = register_at( ct[i].attribute, &ct[i].ad, 1 ); if ( code ) { fprintf( stderr, "init_config_attrs: register_at failed\n" ); return code; } } return 0; }
false
false
false
false
false
0
create_window (GsdLocatePointerData *data, GdkScreen *screen) { GdkVisual *visual; GdkWindowAttr attributes; gint attributes_mask; visual = gdk_screen_get_rgba_visual (screen); if (visual == NULL) visual = gdk_screen_get_system_visual (screen); attributes_mask = GDK_WA_X | G...
false
false
false
false
false
0
storeurlStats(StoreEntry * sentry) { storeAppendPrintf(sentry, "Redirector Statistics:\n"); helperStats(sentry, storeurlors); if (Config.onoff.storeurl_bypass) storeAppendPrintf(sentry, "\nNumber of requests bypassed " "because all store url bypassers were busy: %d\n", n_bypassed); }
false
false
false
false
false
0
BigDecimal_div2(int argc, VALUE *argv, VALUE self) { ENTER(5); VALUE b,n; int na = rb_scan_args(argc,argv,"11",&b,&n); if(na==1) { /* div in Float sense */ Real *div=NULL; Real *mod; if(BigDecimal_DoDivmod(self,b,&div,&mod)) { return BigDecimal_to_i(ToValue(div)); } ...
false
false
false
false
false
0
do_graft(ir_rvalue **rvalue) { if (!*rvalue) return false; ir_dereference_variable *deref = (*rvalue)->as_dereference_variable(); if (!deref || deref->var != this->graft_var) return false; if (debug) { printf("GRAFTING:\n"); this->graft_assign->print(); printf("\n"); p...
false
false
false
false
false
0
pasteClipboardUrls(const QMimeData* mimeData, const KUrl& destDir, KIO::JobFlags flags = KIO::DefaultFlags) { const KUrl::List urls = KUrl::List::fromMimeData(mimeData, KUrl::List::PreferLocalUrls); if (!urls.isEmpty()) { const bool move = decodeIsCutSelection(mimeData); KIO::Job *job = 0; ...
false
false
false
false
false
0
SwLedOff(struct _adapter *padapter, struct LED_871x *pLed) { u8 LedCfg; if (padapter->bSurpriseRemoved || padapter->bDriverStopped) return; LedCfg = r8712_read8(padapter, LEDCFG); switch (pLed->LedPin) { case LED_PIN_GPIO0: break; case LED_PIN_LED0: LedCfg &= 0xf0; /* Set to software control.*/ r8712_wri...
false
false
false
false
false
0
fl_table(value_t *args, uint32_t nargs) { size_t cnt = (size_t)nargs; if (cnt & 1) lerror(ArgError, "table: arguments must come in pairs"); value_t nt; // prevent small tables from being added to finalizer list if (cnt <= HT_N_INLINE) { tabletype->vtable->finalize = NULL; nt ...
false
false
false
false
false
0
setVideoSurface(QAbstractVideoSurface *surface) { m_surface = surface; if (m_control) m_control.data()->setSurface(surface); }
false
false
false
false
false
0
_vg_commit_file_backup(struct format_instance *fid __attribute__((unused)), struct volume_group *vg, struct metadata_area *mda) { struct text_context *tc = (struct text_context *) mda->metadata_locn; if (test_mode()) { log_verbose("Test mode: Skipping committing %s metadata (%u)", vg->name, vg->...
false
false
false
false
false
0
camel_mime_parser_from_line (CamelMimeParser *m) { struct _header_scan_state *s = _PRIVATE (m); if (s->parts) return byte_array_to_string (s->parts->from_line); return NULL; }
false
false
false
false
false
0
synaptics_report_ext_buttons(struct psmouse *psmouse, const struct synaptics_hw_state *hw) { struct input_dev *dev = psmouse->dev; struct synaptics_data *priv = psmouse->private; int ext_bits = (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) + 1) >> 1; char buf[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; int i; if...
true
true
false
false
false
1
process(const LookupProcessor *lookupProcessor, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { if (LE_FAILURE(success)) { return 0; } le_uint16 elt = SWAPW(extensionLookupType); if (elt...
false
false
false
false
false
0
toStringList( const QString &serialized, bool base64Protection ) { if (!base64Protection) return serialized.split( Serializer::separator() ); QStringList toReturn; foreach( const QString &s, serialized.split(Serializer::separator()) ) { toReturn << QByteArray::fromBase64(s.toUtf8()); } ...
false
false
false
false
false
0
xmms_vis_read (xmms_xform_t *xform, xmms_sample_t *buf, gint len, xmms_error_t *error) { gint read, chan; g_return_val_if_fail (xform, -1); chan = xmms_xform_indata_get_int (xform, XMMS_STREAM_TYPE_FMT_CHANNELS); /* perhaps rework this later */ if (len > XMMSC_VISUALIZATION_WINDOW_SIZE * chan * si...
false
false
false
false
false
0
alarmtimer_nsleep_wakeup(struct alarm *alarm, ktime_t now) { struct task_struct *task = (struct task_struct *)alarm->data; alarm->data = NULL; if (task) wake_up_process(task); return ALARMTIMER_NORESTART; }
false
false
false
false
false
0
globus_callback_adjust_oneshot( globus_callback_handle_t callback_handle, const globus_reltime_t * new_delay) { if (globus_i_am_only_thread()) { return globus_callback_adjust_oneshot_nothreads( callback_handle, new_delay); } else ...
false
false
false
false
false
0
ExecGrant_Namespace(InternalGrant *istmt) { Relation relation; ListCell *cell; if (istmt->all_privs && istmt->privileges == ACL_NO_RIGHTS) istmt->privileges = ACL_ALL_RIGHTS_NAMESPACE; relation = heap_open(NamespaceRelationId, RowExclusiveLock); foreach(cell, istmt->objects) { Oid nspid = lfirst_oid(ce...
false
false
false
false
false
0
update_recv_order(rdpUpdate* update, STREAM* s) { uint8 controlFlags; stream_read_uint8(s, controlFlags); /* controlFlags (1 byte) */ switch (controlFlags & ORDER_CLASS_MASK) { case ORDER_PRIMARY_CLASS: update_recv_primary_order(update, s, controlFlags); break; case ORDER_SECONDARY_CLASS: update_rec...
false
false
false
false
false
0
setNonInheritedC(const Identifier *ident, ELObj *obj, const Location &loc, Interpreter &interp) { radical_ = obj->asSosofo(); if (!radical_ || !radical_->isCharacter()) { interp.setNextLocation(loc); interp.message(InterpreterMessages::invalidCharacteristicValue, StringMessageArg(ident->name(...
false
false
false
false
false
0
blk_mq_hw_queue_to_node(unsigned int *mq_map, unsigned int index) { int i; for_each_possible_cpu(i) { if (index == mq_map[i]) return cpu_to_node(i); } return NUMA_NO_NODE; }
false
false
false
false
false
0
file_chmodstr_to_mode(const char *modespec, mode_t *newmode) { mode_t m = 0; int i = 0, fct = 1; if(strlen(modespec) != 3) return 0; else { for(i = 2; i >= 0; i--) { char c = modespec[i]; if(!((c >= '0') && (c <= '7'))) return 0; else { m += fct * (c - '0'); } fct *= 8; } } *newmod...
false
false
false
false
false
0
sdma_send_txlist(struct sdma_engine *sde, struct iowait *wait, struct list_head *tx_list) { struct sdma_txreq *tx, *tx_next; int ret = 0; unsigned long flags; u16 tail = INVALID_TAIL; int count = 0; spin_lock_irqsave(&sde->tail_lock, flags); retry: list_for_each_entry_safe(tx, tx_next, tx_list, list...
false
false
false
false
false
0
pack_window_free_all(struct pack_backend *backend, struct pack_file *p) { while (p->windows) { struct pack_window *w = p->windows; assert(w->inuse_cnt == 0); backend->mapped -= w->window_map.len; backend->open_windows--; gitfo_free_map(&w->window_map); p->windows = w->next; free(w); } }
false
false
false
false
false
0
serve_thread_func(void *param) { struct mg_server *server = (struct mg_server *) param; printf("Listening on port %s\n", mg_get_option(server, "listening_port")); while (s_received_signal == 0) { mg_poll_server(server, 1000); } mg_destroy_server(&server); return NULL; }
false
false
false
false
false
0
execute() { static int before_symval = symbol_add("before"); ComValue beforev(stack_key(before_symval)); reset_stack(); if (editor()) { CreateMoveFrameCmd* cmd = new CreateMoveFrameCmd(editor(), beforev.is_false()); execute_log(cmd); ComValue retval(cmd->moveframecmd()->actualmotion(), ComVa...
false
false
false
false
false
0
StripParams(AVal *src) { AVal str; if (src->av_val) { str.av_val = calloc(src->av_len + 1, sizeof (char)); strncpy(str.av_val, src->av_val, src->av_len); str.av_len = src->av_len; char *start = str.av_val; char *end = start + str.av_len; char *ptr = start; while (ptr <...
false
false
false
false
false
0
GetFPPos( long *pnPos, long *pnFID ) { if( poSavedRecord != NULL ) *pnPos = nPreSavedPos; else *pnPos = nPostSavedPos; if( pnFID != NULL ) *pnFID = nSavedFeatureId; }
false
false
false
false
false
0
spell_cat_line(buf, line, maxlen) char_u *buf; char_u *line; int maxlen; { char_u *p; int n; p = skipwhite(line); while (vim_strchr((char_u *)"*#/\"\t", *p) != NULL) p = skipwhite(p + 1); if (*p != NUL) { /* Only worth concatenating if there is something else than spaces to *...
false
false
false
false
false
0
area(const Mpoint* const p) const{ Vec v1,v2,vA; float Tarea; //calculate v1=*_vertice[1]-*_vertice[0]; v2=*_vertice[2]-*_vertice[0]; Tarea=0.5*((v1*v2).norm()); //find appriopriate vector for (int i = 0; i<3; i++){ if (p==_vertice[i]){ vA=(this->centroid())-*_vertice[i]; } } vA=vA/v...
false
false
false
false
false
0
check_field_access (MonoMethod *caller, MonoClassField *field) { /* if get_reflection_caller returns NULL then we assume the caller has NO privilege */ if (caller) { MonoError error; MonoClass *klass; /* this check can occur before the field's type is resolved (and that can fail) */ mono_field_get_type_check...
false
false
false
false
false
0
cleanup() { if (this->any_added_) { // If any input files were added, close all the input files. // This is because the plugin may want to remove them, and on // Windows you are not allowed to remove an open file. close_all_descriptors(); } for (this->current_ = this->plugins_.begin...
false
false
false
false
false
0
VFilter16(uint8_t* p, int stride, int thresh, int ithresh, int hev_thresh) { __m128i t1; __m128i mask; __m128i p2, p1, p0, q0, q1, q2; // Load p3, p2, p1, p0 LOAD_H_EDGES4(p - 4 * stride, stride, t1, p2, p1, p0); MAX_DIFF1(t1, p2, p1, p0, mask); // Load q0, q1, q2, q3 LOAD_H_EDGE...
false
false
false
false
false
0
glade_xml_get_property_int (GladeXmlNode * node_in, const gchar * name, gint _default) { xmlNodePtr node = (xmlNodePtr) node_in; gint retval; gchar *value; if ((value = glade_xml_get_property (node, name)) == NULL) return _default; retval = g_ascii_strtoll (value, NULL, 10); ...
false
false
false
false
false
0
basic_test_cleanup(const struct testcase_t *testcase, void *ptr) { struct basic_test_data *data = ptr; if (testcase->flags & TT_NO_LOGS) event_set_log_callback(NULL); if (testcase->flags & TT_NEED_SOCKETPAIR) { if (data->pair[0] != -1) evutil_closesocket(data->pair[0]); if (data->pair[1] != -1) evutil_...
false
false
false
false
false
0
sequenceValidate( Syntax *syntax, struct berval *in ) { if ( in->bv_len < 2 ) return LDAP_INVALID_SYNTAX; if ( in->bv_val[0] != LBER_SEQUENCE ) return LDAP_INVALID_SYNTAX; return LDAP_SUCCESS; }
false
false
false
false
false
0
check_all(char *str) { G_message("\n"); if (start_cell->above != NULL) { G_fatal_error("Bad Start Cell\n"); } check(str, start_cell); return 0; }
false
false
false
false
false
0
decompress_contents (bfd_byte *compressed_buffer, bfd_size_type compressed_size, bfd_byte *uncompressed_buffer, bfd_size_type uncompressed_size) { z_stream strm; int rc; /* It is possible the section consists of several compressed buffers concatenated together, so we uncompress in a loo...
false
false
false
false
false
0
CanMakeExternal() { i::Handle<i::String> obj = Utils::OpenHandle(this); i::Isolate* isolate = obj->GetIsolate(); if (IsDeadCheck(isolate, "v8::String::CanMakeExternal()")) return false; if (isolate->string_tracker()->IsFreshUnusedString(obj)) { return false; } int size = obj->Size(); // Byte size of th...
false
false
false
false
false
0