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
qp_grp_destroy(struct usnic_ib_qp_grp *qp_grp) { struct usnic_ib_vf *vf = qp_grp->vf; WARN_ON(qp_grp->state != IB_QPS_RESET); spin_lock(&vf->lock); usnic_ib_qp_grp_destroy(qp_grp); spin_unlock(&vf->lock); }
false
false
false
false
false
0
cm_insert_remote_id(struct cm_timewait_info *timewait_info) { struct rb_node **link = &cm.remote_id_table.rb_node; struct rb_node *parent = NULL; struct cm_timewait_info *cur_timewait_info; __be64 remote_ca_guid = timewait_info->remote_ca_guid; __be32 remote_id = timewait_info->work.remote_id; while (...
false
false
false
false
false
0
wrap_load(PyObject *self, PyObject *args) { char *datapath; unsigned int shiori_handle = 0; if(!PyArg_ParseTuple(args, "s", &datapath)) return NULL; shiori_handle = TKawariShioriFactory::GetFactory().CreateInstance( string(datapath)); #if 0 if (shiori_handle == 0) { Py_INCREF(Py_False); return Py_False; ...
false
false
false
false
false
0
rt__valid_weeknum_p(VALUE y, VALUE w, VALUE d, VALUE f, VALUE sg) { VALUE nth, rjd2; int ry, rw, rd, rjd, ns; if (!valid_weeknum_p(y, NUM2INT(w), NUM2INT(d), NUM2INT(f), NUM2DBL(sg), &nth, &ry, &rw, &rd, &rjd, &ns)) return Qnil; encode_jd(nth, rjd, &rjd2); return rjd2; }
false
false
false
false
false
0
redo_some_events (GfsEvent * event, GfsSimulation * sim) { if (GFS_IS_ADAPT (event) || GFS_IS_INIT (event)) gfs_event_redo (event, sim); }
false
false
false
false
false
0
is_same_call(char *call1, char *call2) { if (!call1 || !call2) return 0; for (; *call1 && *call2; call1++, call2++) { if (*call1 == '-' || *call2 == '-') break; if (tolower(*call1 & 0xff) != tolower(*call2 & 0xff)) ...
false
false
false
false
false
0
fpm_hmacsha256_init(fpm_hmacsha256 *c, guchar *key, gint keylen) { guchar realkey[64], outerkey[64], innerkey[64]; GChecksum *keyc; gsize size = SHA256_DIGEST_LENGTH; gint i; memset(realkey, 0, sizeof(realkey)); if(keylen > 64) { keyc = g_checksum_new(G_CHECKSUM_SHA256); g_checksum_update(keyc, key...
false
true
false
false
false
1
brat(const DecayMode &, const Particle & p, double oldbrat) const { ParticleVector children = p.children(); if( children.size() != 3 || !p.data().widthGenerator() ) return oldbrat; // partial width for this mode Energy scale = p.mass(); Energy pwidth = partialWidth( make_pair(p.dataPtr(), s...
false
false
false
false
false
0
config_types(void) { bool has_drive = false; int drive; /* read drive info out of physical CMOS */ drive = 0; if (!UDP->cmos) UDP->cmos = FLOPPY0_TYPE; drive = 1; if (!UDP->cmos && FLOPPY1_TYPE) UDP->cmos = FLOPPY1_TYPE; /* FIXME: additional physical CMOS drive detection should go here */ for (drive = 0...
false
false
false
false
false
0
CreateOutputs( void ) { if( bIsCreatedOutputs( ) ) return; // Create and add output parameters m_oSbxOutputs.Create( this, ID_UNUSED, wxT(" Outputs "), wxPoint( 455, 5 ), wxSize( 110, 122 ) ); m_oCbxMag .Create( this, ID_CBX_MAG, wxT("Magnitude"), wxPo...
false
false
false
false
false
0
op_v1_remove_identity (GkdSshAgentCall *call) { GckBuilder builder = GCK_BUILDER_INIT; GckSession *session; GckAttributes *attrs; GckObject *key = NULL; gsize offset; offset = 5; if (!gkd_ssh_agent_proto_read_public_v1 (call->req, &offset, &builder)) { gck_builder_clear (&builder); return FALSE; } attrs...
false
false
false
false
false
0
getSparql() { UT_DEBUGMSG(("RDFModel_XMLIDLimited::getSparql()\n")); std::set< std::string > xmlids; xmlids.insert( m_writeID ); copy( m_readIDList.begin(), m_readIDList.end(), inserter( xmlids, xmlids.end() ) ); std::string sparql = PD_DocumentRDF::getSPARQL_LimitedToXMLIDList( xmlids ); return...
false
false
false
false
false
0
setAbsolutePos(Agraph_t * g, int maxrank) { Agnode_t *n; double hyp; double* ranksep; int i; ranksep = getRankseps (g, maxrank); if (Verbose) { fputs ("Rank separation = ", stderr); for (i = 0; i <= maxrank; i++) fprintf (stderr, "%.03lf ", ranksep[i]); fputs ("\n", stderr); } ...
false
false
false
false
false
0
map_to_source_cache_client(void * x) { int err = 0; Context * ctx = NULL; MapToSourceArgs * args = (MapToSourceArgs *)x; Channel * c = cache_channel(); ctx = id2ctx(args->id); if (ctx == NULL) err = ERR_INV_CONTEXT; else if (ctx->exited) err = ERR_ALREADY_EXITED; code_area_cnt = 0; ...
false
false
false
false
false
0
dhl_set_type (HyperlinkState *state, GType type) { GnmHLink *old = state->link; state->link = g_object_new (type, NULL); if (old != NULL) { gnm_hlink_set_target (state->link, gnm_hlink_get_target (old)); gnm_hlink_set_tip (state->link, gnm_hlink_get_tip (old)); g_object_unref (old); } dhl_setup_type (state)...
false
false
false
false
false
0
uca_mock_camera_start_recording(UcaCamera *camera, GError **error) { gboolean transfer_async = FALSE; UcaMockCameraPrivate *priv; g_return_if_fail(UCA_IS_MOCK_CAMERA(camera)); priv = UCA_MOCK_CAMERA_GET_PRIVATE(camera); /* TODO: check that roi_x + roi_width < priv->width */ priv->dummy_data = (...
false
false
false
false
false
0
archive_write_set_format_mtree(struct archive *_a) { struct archive_write *a = (struct archive_write *)_a; struct mtree_writer *mtree; if (a->format_destroy != NULL) (a->format_destroy)(a); if ((mtree = malloc(sizeof(*mtree))) == NULL) { archive_set_error(&a->archive, ENOMEM, ...
false
false
false
false
false
0
mono_counters_dump_section (int section, int variance, FILE *outfile) { MonoCounter *counter = counters; while (counter) { if ((counter->type & section) && (mono_counter_get_variance (counter) & variance)) dump_counter (counter, outfile); counter = counter->next; } }
false
false
false
false
false
0
gconf_client_notify_add (GConfClient* client, const gchar* namespace_section, GConfClientNotifyFunc func, gpointer user_data, GFreeFunc destroy_notify, GError** err) { guint cnxn_id = 0; g...
false
false
false
false
false
0
pg_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos) { struct pg *dev = filp->private_data; struct pg_write_hdr hdr; int hs = sizeof (hdr); if (dev->busy) return -EBUSY; if (count < hs) return -EINVAL; if (copy_from_user(&hdr, buf, hs)) return -EFAULT; if (hdr.magic != PG_MAGI...
false
false
false
false
false
0
mca_coll_hierarch_allreduce_tmp(void *sbuf, void *rbuf, int count, struct ompi_datatype_t *dtype, struct ompi_op_t *op, struct ompi_communicator_t *comm) { int ret; ret = mca_coll_hierarch_reduce_tmp ( sbuf, rbuf, count, dtype, op, 0, comm); if ( OMPI_SUCCESS != ret ) { return ...
false
false
false
false
false
0
drbg_fill_array(struct rng_alg *alg, const struct drbg_core *core, int pr) { int pos = 0; static int priority = 200; memcpy(alg->base.cra_name, "stdrng", 6); if (pr) { memcpy(alg->base.cra_driver_name, "drbg_pr_", 8); pos = 8; } else { memcpy(alg->base.cra_driver_name, "drbg_nopr_", 10); pos = 10; ...
false
false
false
false
false
0
findAndOpenG15() { int i; for (i=0; g15_devices[i].name !=NULL ;i++){ g15_log(stderr,G15_LOG_INFO,"Trying to find %s\n",g15_devices[i].name); if(keyboard_device = findAndOpenDevice(g15_devices[i],i)){ break; } else g15_log(stderr,G15_LOG_INFO,"%s not foun...
false
false
false
false
false
0
renamePlaylist( Playlists::PlaylistPtr playlist, const QString &newName ) { DEBUG_BLOCK playlist->setName( newName ); }
false
false
false
false
false
0
action(const QString& name) { Action* action = findChild< Action* >(name); if(! action) { action = new Action(this, name); #if 0 d->actioncollection->insert(action); //FIXME should we really remember the action? #endif } return action; }
false
false
false
false
false
0
get_default_center(int *default_center_x, int *default_center_y) { //-------------------- // Now the center of the object, what position in the png // file does it have? // // int default_center_x = 359; // int default_center_y = 436; // int default_center_x = 98; // int default_center_y = 167; *default_cente...
false
false
false
false
false
0
ShouldPrintAfterPass(const void *PassID) { return PrintAfterAll || ShouldPrintBeforeOrAfterPass(PassID, PrintAfter); }
false
false
false
false
false
0
list_style_sheets_texinfo (FILE * stream) { struct style_sheet * sheet; struct darray * entries; size_t i; version_t version_index, requirement; entries = pw_glob_on_suffix (job->common.path, SSH_SUFFIX); /* Sort them by name (not key) */ entries->cmp = (da_cmp_func_t) sheet_name_cmp; da_qsort (entrie...
false
false
false
false
false
0
siftUp(BinaryHeap h, int nodePos){ int parentPos; void **heap = h->heap; if (nodePos != 0) { parentPos = ParentPos(nodePos); if ((h->cmp)(heap[parentPos], heap[nodePos]) == 1) {/* if smaller than parent, swap */ swap(h, parentPos, nodePos); nodePos = siftUp(h, parentPos); } } retur...
false
false
false
false
false
0
wl1251_tx_flush(struct wl1251 *wl) { int i; struct sk_buff *skb; struct ieee80211_tx_info *info; /* TX failure */ /* control->flags = 0; FIXME */ while ((skb = skb_dequeue(&wl->tx_queue))) { info = IEEE80211_SKB_CB(skb); wl1251_debug(DEBUG_TX, "flushing skb 0x%p", skb); if (!(info->flags & IEEE80211_TX_...
false
false
false
false
false
0
read_entire_file (const char *mrl, ssize_t *file_size) { char *buf; struct stat statb; int fd; ssize_t size; if (!strncasecmp (mrl, "http://", 7)) return http_download (mrl, file_size); if (file_size) *file_size = 0; if (stat (mrl, &statb) < 0) { /*g_print (_("utils:...
false
false
false
false
false
0
findDescInTab(VimosTable *table, const char *name) { char modName[] = "findDescInTab"; if (table == NULL) { cpl_msg_debug(modName, "Invalid input table"); return(NULL); } return(findDescriptor(table->descs, name)); }
false
false
false
false
false
0
validUrl( const KDirLister *lister, const KUrl& url ) const { if ( !url.isValid() ) { if ( lister->d->autoErrorHandling ) { QString tmp = i18n("Malformed URL\n%1", url.prettyUrl() ); KMessageBox::error( lister->d->errorParent, tmp ); } return false; } if ( !KProtocolManager::support...
false
false
false
false
false
0
get_map_type(int operfunc, int *map_type, int *submap_type, int *remap_order) { switch ( operfunc ) { case REMAPCON: case GENCON: *map_type = MAP_TYPE_CONSERV; *remap_order = 1; break; case REMAPCON2: case GENCON2: *map_type = MAP_TYPE_CONSERV; *remap_order = 2; ...
false
false
false
false
false
0
test_attributes() { intn num_errs = 0; /* number of errors */ /* Output message about test being performed */ TESTING("various setting attribute features (tattributes.c)"); /* test when count is passed into SDsetattr as 0 */ num_errs = num_errs + test_count(); if (num_errs == 0) ...
false
false
false
false
false
0
complete_async_from_error (ConnectAsyncData *data, GError *error) { GSimpleAsyncResult *simple = data->simple; if (error == NULL) g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_PROXY_FAILED, "HTTP proxy server closed connection unexpectedly."); g_simple_async_result_set_from_error (data->simple...
false
false
false
false
false
0
isCleanupOnlySelector(EHSelectorInst *selector) { if (selector->getNumArgOperands() != 3) return false; ConstantInt *val = dyn_cast<ConstantInt>(selector->getArgOperand(2)); return (val && val->isZero()); }
false
false
false
false
false
0
GC_thr_init() { # ifndef GC_DARWIN_THREADS int dummy; # endif GC_thread t; if (GC_thr_initialized) return; GC_thr_initialized = TRUE; # ifdef HANDLE_FORK /* Prepare for a possible fork. */ pthread_atfork(GC_fork_prepare_proc, GC_fork_parent_proc, GC_fork_child_proc...
false
false
false
false
true
1
giraffe_model_fit(GiModel *self, cpl_matrix *x, cpl_matrix *y, cpl_matrix *sigma) { cxint ndata = 0; cx_assert(self != NULL); if (x == NULL || y == NULL) { return -128; } if (sigma == NULL) { return -128; } ndata = cpl_matrix_get_nrow(y); return _...
false
false
false
false
false
0
reset_view() { HOMDIM = web.sdim + 1; matcopy(transleft,identmat,HOMDIM,HOMDIM); matcopy(transdown,identmat,HOMDIM,HOMDIM); matcopy(transright,identmat,HOMDIM,HOMDIM); matcopy(transup,identmat,HOMDIM,HOMDIM); if ( SDIM > 2 ) { transright[1][HOMDIM-1] = .25; transleft[1][HOMDIM-1] = -.25; ...
false
false
false
false
false
0
handle_show_translation_path(struct ast_cli_args *a) { struct ast_format input_src_format; size_t len = 0; int i; const struct ast_format_list *format_list = ast_format_list_get(&len); struct ast_str *str = ast_str_alloca(1024); struct ast_translator *step; char tmp[256]; ast_format_clear(&input_src_format); ...
false
false
false
false
false
0
iwl_mvm_tof_clean(struct iwl_mvm *mvm) { struct iwl_mvm_tof_data *tof_data = &mvm->tof_data; if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TOF_SUPPORT)) return; memset(tof_data, 0, sizeof(*tof_data)); mvm->tof_data.active_range_request = IWL_MVM_TOF_RANGE_REQ_MAX_ID; }
false
false
false
false
false
0
xtra_dupuser(struct userrec *new, struct userrec *old, struct user_entry *e) { struct xtra_key *x1, *x2; for (x1 = e->u.extra; x1; x1 = x1->next) { x2 = user_malloc(sizeof(struct xtra_key)); x2->key = user_malloc(strlen(x1->key) + 1); strcpy(x2->key, x1->key); x2->data = us...
false
false
false
false
false
0
acpi_ec_query_init(void) { if (!ec_query_wq) { ec_query_wq = alloc_workqueue("kec_query", 0, ec_max_queries); if (!ec_query_wq) return -ENODEV; } return 0; }
false
false
false
false
false
0
advance_cursor(unsigned live_count, unsigned num_hosts) { if (live_count) { do { if (cursor == (helistptr+(num_hosts-1))) cursor = helistptr; /* Wrap round to beginning */ else cursor++; } while (!(*cursor)->live); } /* End If */ }
false
false
false
false
false
0
CheckDebugInfoIntrinsics(Module *M) { if (Function *FuncStart = M->getFunction("llvm.dbg.func.start")) { while (!FuncStart->use_empty()) { CallInst *CI = cast<CallInst>(FuncStart->use_back()); CI->eraseFromParent(); } FuncStart->eraseFromParent(); } if (Function *StopPoint = M->getFun...
false
false
false
false
false
0
anetListen(char *err, int s, struct sockaddr *sa, socklen_t len) { if (bind(s,sa,len) == -1) { anetSetError(err, "bind: %s", strerror(errno)); close(s); return ANET_ERR; } if (listen(s, 511) == -1) { /* the magic 511 constant is from nginx */ anetSetError(err, "listen: %s", s...
false
false
false
false
false
0
dobulkexistslrclfn(int argc, char **argv) { globus_result_t r; globus_list_t *al = NULL; globus_list_t *l; SHOW show; int n; bulk_input *in; if (!a2show(argv[0], &show)) return GLOBUS_SUCCESS; in = BULK_INIT(argc-1, argv+1, 1); n = 0; do { argv = BULK_NEXT(in); if (argv) { ...
false
false
false
false
false
0
hexec_warning(const char* str, ...) { if(log_out_fd == -1) return; int err = errno; va_list va; va_start(va, str); //dprintf(log_out_fd, "hexec: "); vdprintf(log_out_fd, str, va); va_end(va); errno = err; }
false
false
false
false
false
0
plugin_get_parent_descr ( const char *filepath, const char *mode) { char *descr = NULL; FILE *file = NULL; char buff[512]; char *file_content = NULL; char *file_content_tmp = NULL; int size = 0; if ( filepath != NULL ) { if ( (file = fopen ( filepath, "rb")) != NULL ) { while ( fgets ( buff, 512, file)...
true
true
false
false
true
1
restoreDoubleBonds(TEditedMolecule& sm, bool putEither/*, const std::vector<int>eqList*/) { bool hasStereoDouble=false; bool hasAcyclic=false; bool result=false; int i,j,an1,an2,bn1,bn2,n; for (i=0; i<sm.nBonds(); i++) { if (!sm.getBond(i)->bstereo_refs.empty()) hasStereoDouble = true; if (sm.getBond...
false
false
false
false
false
0
glade_eprop_attrs_populate_view (GladeEditorProperty *eprop, GtkTreeView *view) { GList *attributes, *list; GtkListStore *model = (GtkListStore *) gtk_tree_view_get_model (view); GtkTreeIter *iter; GladeAttribute *gattr; GladeProperty *property; gchar *text; property = glade_editor_property_get_propert...
false
false
false
false
false
0
phi_alternative (set, c) rtx set; int c; { rtvec phi_vec = XVEC (SET_SRC (set), 0); int v; for (v = GET_NUM_ELEM (phi_vec) - 2; v >= 0; v -= 2) if (INTVAL (RTVEC_ELT (phi_vec, v + 1)) == c) return &RTVEC_ELT (phi_vec, v); return NULL; }
false
false
false
false
true
1
ec_GF2m_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src) { int i; if (!BN_copy(&dest->field, &src->field)) return 0; if (!BN_copy(&dest->a, &src->a)) return 0; if (!BN_copy(&dest->b, &src->b)) return 0; dest->poly[0] = src->poly[0]; dest->poly[1] = src->poly[1]; dest->poly[2] = src->poly[2]; dest->poly[3...
false
false
false
false
false
0
getUniquePredecessor() { pred_iterator PI = pred_begin(this), E = pred_end(this); if (PI == E) return 0; // No preds. BasicBlock *PredBB = *PI; ++PI; for (;PI != E; ++PI) { if (*PI != PredBB) return 0; // The same predecessor appears multiple times in the predecessor list. // This is OK. }...
false
false
false
false
false
0
macb_set_features(struct net_device *netdev, netdev_features_t features) { struct macb *bp = netdev_priv(netdev); netdev_features_t changed = features ^ netdev->features; /* TX checksum offload */ if ((changed & NETIF_F_HW_CSUM) && macb_is_gem(bp)) { u32 dmacfg; dmacfg = gem_readl(bp, DMACFG); if (f...
false
false
false
false
false
0
db_connect(void) { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char *server = "localhost"; char *user = "sundar"; char *password = "test"; /* set me first */ char *database = "rpnet"; conn = mysql_init(NULL); /* Connect to database */ if (!mysql_real_connect(conn, server, user, password, database, 0, NU...
false
false
false
false
false
0
test_skiplist_greater(void) { H5SL_t *slist; /* Skip list created */ size_t u; /* Local index variable */ unsigned data[10]={ 10, 20, 15, 5, 50, 30, 31, 32, 80, 90}; /* unsigned sorted_data[10]={ 5, 10, 15, 20, 30, 31, 32, 50, 80, 90}; */ unsigned *found_item; /* Item found in skip...
false
false
false
false
false
0
vpn_service_watch_cb (GPid pid, gint status, gpointer user_data) { NMVPNService *service = NM_VPN_SERVICE (user_data); NMVPNServicePrivate *priv = NM_VPN_SERVICE_GET_PRIVATE (service); if (WIFEXITED (status)) { guint err = WEXITSTATUS (status); if (err != 0) { nm_log_warn (LOGD_VPN, "VPN service '%s' exited...
false
false
false
false
false
0
do_init_script(void) { unsigned int tick = gettick(); #ifndef TXT_ONLY // DB connection initialized if( script_config.sql_script_enable ) { sql_is_connect = sqldbs_connect(&mysql_handle_script, script_server_ip, script_server_id, script_server_pw, script_server_db, script_server_port, script_server_charset, scri...
false
false
false
false
false
0
mjpg_yuv_init(struct ng_video_fmt *out, void *priv) { struct mjpeg_compress *h; struct mjpeg_yuv_priv *c = priv; if (ng_debug > 1) fprintf(stderr,"mjpg_yuv_init\n"); h = mjpg_init(out); if (NULL == h) return NULL; h->mjpg_cinfo.input_components = 3; h->mjpg_cinfo.in_color_space = JC...
false
false
false
false
false
0
ibus_component_deserialize (IBusComponent *component, GVariant *variant) { gboolean retval; retval = IBUS_SERIALIZABLE_CLASS (ibus_component_parent_class)->deserialize ((IBusSerializable *)component, variant); g_return_val_if_fail (retval, 0); g_variant_get_child (...
false
false
false
false
false
0
wnck_selector_insert_window (WnckSelector *selector, WnckWindow *window) { GtkWidget *item; WnckScreen *screen; WnckWorkspace *workspace; int workspace_n; int i; screen = wnck_selector_get_screen (selector); workspace = wnck_window_get_workspace (window); if (!workspace &&...
false
false
false
false
false
0
histogram(WiggleIterator ** wigs, int count, int width) { Histogram * hist = calloc(1, sizeof(Histogram)); hist->count = count; hist->width = width; hist->values = calloc(count, sizeof(double*)); int row; for (row = 0; row < count; row++) { hist->values[row] = calloc(width, sizeof(double)); WiggleIterator * w...
false
false
false
false
false
0
qla2x00_wait_for_chip_reset(scsi_qla_host_t *vha) { int return_status; unsigned long wait_reset; struct qla_hw_data *ha = vha->hw; scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); wait_reset = jiffies + (MAX_LOOP_TIMEOUT * HZ); while (((test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags)) || test_bit(AB...
false
false
false
false
false
0
isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom, unsigned Align, const TargetData *TD) { uint64_t ByteOffset = 0; Value *Base = V; if (TD) Base = getUnderlyingObjectWithOffset(V, TD, ByteOffset); const Type *BaseType = 0; unsigned BaseAlign = 0; if (co...
false
false
false
false
false
0
tda8083_send_diseqc_msg(struct dvb_frontend *fe, struct dvb_diseqc_master_cmd *m) { struct tda8083_state* state = fe->demodulator_priv; int i; tda8083_writereg (state, 0x29, (m->msg_len - 3) | (1 << 2)); /* enable */ for (i=0; i<m->msg_len; i++) tda8083_writereg (state, 0x23 + i, m->msg[i]); tda8083_wr...
false
false
false
false
false
0
copy(void) const { SoFaceDetail *copy = new SoFaceDetail(); if (this->numpoints) { copy->setNumPoints(this->numpoints); for (int i = 0; i < this->numpoints; i++) { copy->setPoint(i, this->getPoint(i)); } } copy->faceindex = this->faceindex; copy->partindex = this->partindex; return copy; }
false
false
false
false
false
0
drag_motion_callback (GtkTreeView *tree_view, GdkDragContext *context, int x, int y, unsigned int time, NemoPlacesSidebar *sidebar) { GtkTreePath *path; GtkTreeViewDropPosition pos; int action; GtkTreeIter iter; char *uri; gboolean res; if (!sidebar->drag_data_received) {...
false
false
false
false
false
0
newsnntp_date(newsnntp * f, struct tm * tm) { char command[NNTP_STRING_SIZE]; int r; char * response; char year[5]; char month[3]; char day[3]; char hour[3]; char minute[3]; char second[3]; snprintf(command, NNTP_STRING_SIZE, "DATE\r\n"); r = send_command(f, command); if (r == -1) return NE...
true
true
false
false
true
1
alloc_search_notkey(struct searchinfo **head) { struct imaptoken *t=currenttoken(); if (t->tokentype == IT_ATOM && strcmp(t->tokenbuf, "NOT") == 0) { struct searchinfo *si=alloc_search(head); si->type=search_not; nexttoken(); if ((si->a=alloc_search_key(head)) == 0) return (0); return (si); } return (...
false
false
false
false
false
0
radeon_driver_irq_uninstall(struct drm_device * dev) { drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; if (!dev_priv) return; if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) return; if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) RADEON_WRITE(R500_DxMODE_I...
false
false
false
false
false
0
residue_decode(vorb *f, Codebook *book, float *target, int offset, int n, int rtype) { int k; if (rtype == 0) { int step = n / book->dimensions; for (k=0; k < step; ++k) if (!codebook_decode_step(f, book, target+offset+k, n-offset-k, step)) return FALSE; } else { ...
false
false
false
false
false
0
initialparms() { /* initialize parameters */ /* these are set by emboss_getoptions */ /* // plotter = DEFPLOTTER; // previewer = DEFPREV; // preview = true; */ paperx=20.6375; pagex=20.6375; papery=26.9875; pagey=26.9875; strcpy(fontname,"Times-Roman"); plotrparms(spp); /* initial, possibly...
false
true
false
false
false
1
oc_enc_residual_tokens_pack(oc_enc_ctx *_enc){ static const unsigned char OC_HUFF_GROUP_MIN[6]={0,1,6,15,28,64}; static const unsigned char *OC_HUFF_GROUP_MAX=OC_HUFF_GROUP_MIN+1; ptrdiff_t token_counts_y[32]; ptrdiff_t token_counts_c[32]; size_t bits_y[16]; size_t bits_c[16]; int huff_idxs[2...
true
true
false
false
false
1
bindtextdomain(char const *domainname, char const *dirname) { char const *dir = dirname; setup(); if (domainname && !strcmp(domainname, e_textdomain)) dir = e_localedir; return r_bindtextdomain(domainname, dir); }
false
false
false
false
false
0
isrealdisk(char *curname, char *newname, int maxlen) { static int firstcall = 1; register int i; if (firstcall) /* compile the regular expressions */ { for (i=0; i < sizeof validdisk/sizeof validdisk[0]; i++) regcomp(&validdisk[i].compreg, validdisk[i].regexp, REG_NOSUB); firstcall = 0; } /* **...
false
false
false
false
false
0
_dwarf_valid_form_we_know (Dwarf_Debug dbg, Dwarf_Unsigned at_form, Dwarf_Unsigned at_name) { if (at_form == 0 && at_name == 0) { return TRUE; } if (at_name == 0) { return FALSE; } if (at_form <= DW_FORM_ref_sig8) { return TRUE; } return FALSE; }
false
false
false
false
false
0
H5IMget_palette( hid_t loc_id, const char *image_name, int pal_number, unsigned char *pal_data ) { hid_t did; int has_pal; hid_t atid=-1; hid_t aid; hid_t asid=-1; hssize_t n_refs; hsize_t di...
false
false
false
false
false
0
path_expand(struct tree *tree, const char *ppath) { struct tree *siblings = tree->parent->children; char *path; const char *label; int cnt = 0, ind = 0, r; list_for_each(t, siblings) { if (streqv(t->label, tree->label)) { cnt += 1; if (t == tree) ind...
false
false
false
false
false
0
luaL_argerror (int numarg, char *extramsg) { lua_Function f = lua_stackedfunction(0); char *funcname; lua_getobjname(f, &funcname); numarg -= lua_nups(f); if (funcname == NULL) funcname = "?"; if (extramsg == NULL) luaL_verror("bad argument #%d to function `%.50s'", numarg, funcname); else lua...
false
false
false
false
false
0
mwl8k_request_alt_fw(struct mwl8k_priv *priv) { int rc; printk(KERN_ERR "%s: Error requesting preferred fw %s.\n" "Trying alternative firmware %s\n", pci_name(priv->pdev), priv->fw_pref, priv->fw_alt); rc = mwl8k_request_fw(priv, priv->fw_alt, &priv->fw_ucode, true); if (rc) { printk(KERN_ERR "%s:...
false
false
false
false
false
0
serviceRequests(DUL_NETWORKKEY ** network, DUL_ASSOCIATIONKEY ** association, DUL_ASSOCIATESERVICEPARAMETERS * service) { CONDITION cond = 1; DUL_PRESENTATIONCONTEXT * ctx; /* handle to the accepted presentation * context whose id matches that of the * arriving command request */ DUL_PRESENT...
false
false
false
false
false
0
get_tree(const oid * objid, size_t objidlen, struct tree *subtree) { struct tree *return_tree = NULL; for (; subtree; subtree = subtree->next_peer) { if (*objid == subtree->subid) goto found; } return NULL; found: while (subtree->next_peer && subtree->next_peer->subid == ...
false
false
false
false
false
0
rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap) { rb_printf_buffer f; VALUE result; f._flags = __SWR | __SSTR; f._bf._size = 0; f._w = 120; result = rb_str_buf_new(f._w); if (enc) rb_enc_associate(result, enc); f._bf._base = (unsigned char *)result; f._p = (unsigned c...
false
false
false
false
false
0
sbitmap_vector_alloc (unsigned int n_vecs, unsigned int n_elms) { unsigned int i, bytes, offset, elm_bytes, size, amt, vector_bytes; sbitmap *bitmap_vector; size = SBITMAP_SET_SIZE (n_elms); bytes = size * sizeof (SBITMAP_ELT_TYPE); elm_bytes = (sizeof (struct simple_bitmap_def) + bytes - sizeof (SBI...
false
false
false
false
false
0
snd_rme96_free(void *private_data) { struct rme96 *rme96 = (struct rme96 *)private_data; if (rme96 == NULL) { return; } if (rme96->irq >= 0) { snd_rme96_trigger(rme96, RME96_STOP_BOTH); rme96->areg &= ~RME96_AR_DAC_EN; writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); free_irq(rme96->i...
false
false
false
false
false
0
sync_recv(lldpctl_conn_t *lldpctl, const uint8_t *data, size_t length, void *user_data) { struct lldpctl_conn_sync_t *conn = user_data; ssize_t nb; size_t remain, offset = 0; if (conn->fd == -1 && ((conn->fd = sync_connect(lldpctl)) == -1)) { lldpctl->error = LLDPCTL_ERR_CANNOT_CONNECT; return LLDPCTL...
false
false
false
false
false
0
OnAEdited (CellDlg *dlg) { g_signal_handler_block (dlg->A, dlg->ASignal); Lattice lattice; double val, a, b, c, alpha, beta, gamma; dlg->m_pDoc->GetCell (&lattice, &a, &b, &c, &alpha, &beta, &gamma); if (dlg->GetNumber (dlg->A, &val, gcugtk::Min, 0) && val != a) { switch (lattice) { case cubic: case body_cen...
false
false
false
false
false
0
inflateReset(z) z_stream *z; { uLong c; if (z == Z_NULL || z->state == Z_NULL) return Z_STREAM_ERROR; z->total_in = z->total_out = 0; z->msg = Z_NULL; z->state->mode = z->state->nowrap ? BLOCKS : METHOD; inflate_blocks_reset(z->state->blocks, z, &c); Trace((stderr, "inflate: reset\n")); return Z_OK...
false
false
false
false
false
0
device_start(void) { if (!gypsy_device_path) { WARNING("No device, not starting"); return; } gypsy_device_start_failed = FALSE; /* Device */ device_proxy = dbus_g_proxy_new_for_name(connection, gypsy_service, gypsy_device_path, GYPSY_DEVICE); DEBUG(GYPSY_DEVICE": Start"); dbus_g_proxy_begin_call(device_...
false
false
false
false
false
0
list_join(gap, l, sep, echo_style, copyID) garray_T *gap; list_T *l; char_u *sep; int echo_style; int copyID; { garray_T join_ga; int retval; join_T *p; int i; ga_init2(&join_ga, (int)sizeof(join_T), l->lv_len); retval = list_join_inner(gap, l, sep, echo_style, copyID, &...
false
false
false
false
false
0
gtt_restore_reports_menu (GnomeApp *app) { int i, num; char s[120], *p; GnomeUIInfo * reports_menu; GConfClient *client; client = gconf_client_get_default (); /* Read in the user-defined report locations */ num = GETINT ("/Misc/NumReports", 0); reports_menu = g_new0 (GnomeUIInfo, num+1); for (i = 0; i < ...
true
true
false
false
false
1
detect_sysv_odd(struct sysv_sb_info *sbi, struct buffer_head *bh) { int size = detect_sysv(sbi, bh); return size>2 ? 0 : size; }
false
false
false
false
false
0
trie_find_for_prediction (struct trie_root* root, xstr *key) { struct trie_node *p; struct trie_node *q; p = &root->root; q = p->l; while (p->bit < q->bit) { if (q->bit >= 2) { if ((q->bit - 2) / (int)(sizeof(xchar) << 3) >= key->len) { break; } } p = q; q = trie_key_nth_bit(key...
false
false
false
false
false
0
bus_connection_drop_pending_replies (BusConnections *connections, DBusConnection *connection) { /* The DBusConnection is almost 100% finalized here, so you can't * do anything with it except check for pointer equality */ DBusList *link; _dbus_verbose ("Dropping pendin...
false
false
false
false
false
0
setIdColAcol(){ // Need to know where the gluon was mapped (pCM[4]) int gIdx = 0; switch (config) { case 3: case 5: gIdx = 0; break; case 1: case 4: gIdx = 1; break; case 0: case 2: gIdx = 2; break; } // Outgoing flavours int idTmp[3] = { id1, id1, id1 }; idTmp[gIdx] = 21; setId(id1, id2, idTmp...
false
false
false
false
false
0
storvsc_connect_to_vsp(struct hv_device *device, u32 ring_size, bool is_fc) { struct vmstorage_channel_properties props; int ret; memset(&props, 0, sizeof(struct vmstorage_channel_properties)); ret = vmbus_open(device->channel, ring_size, ring_size, (void *)&props, sizeof(struct vmstorage_ch...
false
false
false
false
false
0
setFont(const char *f) { deque<NLine *>::iterator i; L.setFont(0,f); fh = 2 + L.fontHeight(0); fmtw = -1; /* invalidate current wrapping */ // invalidate cached line widths for(i=lines.begin();i!=lines.end();i++) (*i)->Width = -1; }
false
false
false
false
false
0
dmalloc_shutdown(void) { /* NOTE: do not generate errors for IN_TWICE here */ /* if we're already in die mode leave fast and quietly */ if (_dmalloc_aborting_b) { return; } /* * Make sure that the log file is open. We do this here because we * might cause an allocation in the open() and don't...
true
true
false
false
false
1