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
Init() { static ClassDocumentation<O2AlphaS> documentation ("The O2AlphaS class implements the next-to-leading order alphaS in the same" " way as in FORTRAN HERWIG"); static Parameter<O2AlphaS,Energy> interfaceLambdaQCD ("LambdaQCD", "The value of Lambda QCD", &O2AlphaS::_lambdaQCD, MeV, 18...
false
false
false
false
false
0
startLink( const Address &address ) { switch( address.type ) { case Address::resolvedNode: { unsigned long n; if( address.node->elementIndex( n ) == accessOK ) { GroveString id; address.node->getId( id ); unsigned long groveIndex = address.node->groveIndex...
false
false
false
false
false
0
fl_show_alert(const char *q1,const char *q2,const char *q3,int) { fl_alert("%s\n%s\n%s", q1?q1:"", q2?q2:"", q3?q3:""); }
false
false
false
false
false
0
bio_clone_fast(struct bio *bio, gfp_t gfp_mask, struct bio_set *bs) { struct bio *b; b = bio_alloc_bioset(gfp_mask, 0, bs); if (!b) return NULL; __bio_clone_fast(b, bio); if (bio_integrity(bio)) { int ret; ret = bio_integrity_clone(b, bio, gfp_mask); if (ret < 0) { bio_put(b); return NULL; } ...
false
false
false
false
false
0
perf_sysenter_enable(struct trace_event_call *call) { int ret = 0; int num; num = ((struct syscall_metadata *)call->data)->syscall_nr; mutex_lock(&syscall_trace_lock); if (!sys_perf_refcount_enter) ret = register_trace_sys_enter(perf_syscall_enter, NULL); if (ret) { pr_info("event trace: Could not activate"...
false
false
false
false
false
0
gwy_graph_curve_model_get_x_range(GwyGraphCurveModel *gcmodel, gdouble *x_min, gdouble *x_max) { gdouble xmin, xmax; gboolean must_calculate = FALSE; gint i; g_return_val_if_fail(GWY_IS_GRAPH_CURVE_MODEL(gcmodel), FALSE); if (!gcm...
false
false
false
false
false
0
bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size, uint32_t alignment, uint32_t domains, uint32_t flags) { struct radeon_bo_gem *bo...
false
false
false
false
false
0
check_acl_expr(char *expr, Parse_xml_error *err) { Acs_environment env; Acs_expr_result st; Expr_result result; acs_new_env(&env); acs_init_env(NULL, NULL, "", NULL, &env); env.do_eval = 0; st = acs_expr(expr, &env, &result); if (st == ACS_EXPR_SYNTAX_ERROR) { err->mesg = "Syntax error in predicate";...
false
false
false
false
false
0
ipath_disarm_senderrbufs(struct ipath_devdata *dd) { u32 piobcnt; unsigned long sbuf[4]; /* * it's possible that sendbuffererror could have bits set; might * have already done this as a result of hardware error handling */ piobcnt = dd->ipath_piobcnt2k + dd->ipath_piobcnt4k; /* read these before writing erro...
false
false
false
false
false
0
Dispose() { i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); if (!ApiCheck(!isolate->IsInUse(), "v8::Isolate::Dispose()", "Disposing the isolate that is entered by a thread.")) { return; } isolate->TearDown(); }
false
false
false
false
false
0
find_ip_in_subnet(const struct ifaddrs *addrs, const struct sockaddr *net, unsigned int prefix_len) { switch (net->sa_family) { case AF_INET: return find_ipv4_in_subnet(addrs, (struct sockaddr_in*)net, prefix_len); case AF_INET6: return find_ipv6_in_subnet(addrs, (struct sockaddr_in6*...
false
false
false
false
false
0
calcRestorePlacements(MachineBasicBlock* MBB, SmallVector<MachineBasicBlock*, 4> &blks, CSRegBlockMap &prevRestores) { bool placedRestores = false; // Intersect (CSRegs - AvailOut[S]) for S in Successors(MBB) CSRegSet availOutSucc; SmallVector<Mach...
false
false
false
false
false
0
parseAttribute(AttributeImpl* attr) { switch(attr->id()) { case ATTR_CHALLENGE: break; default: // skip HTMLSelectElementImpl parsing! HTMLGenericFormElementImpl::parseAttribute(attr); } }
false
false
false
false
false
0
actorMachineGun (edict_t *self) { vec3_t start, target; vec3_t forward, right; AngleVectors (self->s.angles, forward, right, NULL); G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_ACTOR_MACHINEGUN_1], forward, right, start); if (self->enemy) { if (self->enemy->health > 0) { VectorMA (self->enemy...
false
false
false
false
false
0
buildIndexArray(void *objArray, int numObjs, Size objSize) { DumpableObject **ptrs; int i; ptrs = (DumpableObject **) malloc(numObjs * sizeof(DumpableObject *)); for (i = 0; i < numObjs; i++) ptrs[i] = (DumpableObject *) ((char *) objArray + i * objSize); /* We can use DOCatalogIdCompare to sort since its fi...
false
false
false
false
false
0
dis_format(const struct msp430_instruction *insn) { int len = 0; const char *opname = dis_opcode_name(insn->op); const char *suffix = ""; if (!opname) opname = "???"; if (insn->dsize == MSP430_DSIZE_BYTE) suffix = ".B"; else if (insn->dsize == MSP430_DSIZE_AWORD) suffix = ".A"; else if (insn->dsize == MS...
false
false
false
false
false
0
symdef(cbuf,SymbolProps) char *cbuf; HEADLIST *SymbolProps; { /* * BEGIN SYMBOL DEFINITION */ int i; int index; int type; if (TOLWR) strlwr(cbuf); CurrentLayer = CurrentDataType = CurrentAttribute = -1; /* search for symbol number */ index = struct_index(cbuf); strcpy(Current...
false
false
false
false
true
1
show_toggle (CmdConfig *cmd_config, CameraWidget *toggle) { CDKITEMLIST *list = NULL; int value, selection; const char *label; char title[1024], *info[] = {N_("Yes"), N_("No")}; CHECK (gp_widget_get_value (toggle, &value)); CHECK (gp_widget_get_label (toggle, &label)); snprintf (title, sizeof (title), "<C></5>%...
false
false
false
false
false
0
fc_fcp_init(struct fc_lport *lport) { int rc; struct fc_fcp_internal *si; if (!lport->tt.fcp_cmd_send) lport->tt.fcp_cmd_send = fc_fcp_cmd_send; if (!lport->tt.fcp_cleanup) lport->tt.fcp_cleanup = fc_fcp_cleanup; if (!lport->tt.fcp_abort_io) lport->tt.fcp_abort_io = fc_fcp_abort_io; si = kzalloc(sizeof(...
false
false
false
false
false
0
alc5623_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct alc5623_platform_data *pdata; struct alc5623_priv *alc5623; struct device_node *np; unsigned int vid1, vid2; int ret; u32 val32; alc5623 = devm_kzalloc(&client->dev, sizeof(struct alc5623_priv), GFP_KERNEL); ...
false
false
false
false
false
0
print(STD_NAMESPACE ostream &stream, const size_t maxLength) const { OFString printString; if ((maxLength > 3) && (Value.length() > maxLength)) stream << "\"" << DSRTypes::convertToPrintString(Value.substr(0, maxLength - 3), printString) << "...\""; else stream << ...
false
false
false
false
false
0
print_xml_tag(FILE * xml_file, const char* sbeg, const char* line_end, const char* tag_name, const char* first_attribute_name, ...) { va_list arg_list; const char *attribute_name, *attribute_value; fputs(sbeg, xml_file); fputc('<',...
false
false
false
false
false
0
ensure_mkdir (const char *path, mode_t mode) { struct stat st; if (stat (path, &st)) return errno != ENOENT ? errno : (mkdir (path, mode) ? errno : 0); if (!S_ISDIR (st.st_mode)) return mkdir (path, mode) ? errno : 0; /* should be an error */ return 0; }
false
false
false
false
false
0
description_set_func (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { gchar *description; CcKeyboardItem *item; ShortcutType type; gtk_t...
false
false
false
false
false
0
help_item_zoom(GtkTreePath *path) { GtkTreeModel *model; GtkTreeIter it, child, item; GtkTreeSelection *selection; model = gtk_tree_view_get_model(GTK_TREE_VIEW(help_view)); gtk_tree_model_get_iter(model, &item, path); for (child=item; gtk_tree_model_iter_parent(model, &it, &child); child=it) { GtkT...
false
false
false
false
false
0
gwy_app_add_main_accel_group(GtkWindow *window) { GtkWidget *main_window; GtkAccelGroup *accel_group; g_return_if_fail(GTK_IS_WINDOW(window)); main_window = gwy_app_main_window_get(); if (!main_window) return; g_return_if_fail(GTK_IS_WINDOW(main_window)); accel_group = GTK_ACCEL_G...
false
false
false
false
false
0
get_biased_reg (dont_begin_colors, bias, prefer_colors, free_colors, mode) HARD_REG_SET dont_begin_colors, bias, prefer_colors, free_colors; enum machine_mode mode; { int c = -1; HARD_REG_SET s; if (flag_ra_biased) { COPY_HARD_REG_SET (s, dont_begin_colors); IOR_COMPL_HARD_REG_SET (s, bi...
false
false
false
false
false
0
type_engine_check_reserved( Chuck_Env * env, const string & xid, int pos ) { // key word? if( env->key_words[xid] ) { EM_error2( pos, "illegal use of keyword '%s'.", xid.c_str() ); return TRUE; } // key value? if( env->key_values[xid] ) { EM_error2( pos, "illegal re-...
false
false
false
false
false
0
calcMEcorr(int MEtype, int idMother, int idDaughterIn, double M2, double z, double Q2) { // Convert to Mandelstam variables. Sometimes may need to swap later. double sH = M2 / z; double tH = -Q2; double uH = Q2 - M2 * (1. - z) / z; int idMabs = abs(idMother); int idDabs = abs(idDaughterIn); // Correct...
false
false
false
false
false
0
build_printer_driver_clist(void) { int i; int current_idx = 0; gtk_clist_clear(GTK_CLIST(printer_driver)); for (i = 0; i < stp_printer_model_count (); i ++) { const stp_printer_t *the_printer = stp_get_printer_by_index (i); if (strcmp(manufacturer, stp_printer_get_manufacturer(the_printer)) == ...
false
false
false
false
false
0
unpack_restart(int nlocal, int nth) { // ipage = NULL if being called from granular pair style init() if (ipage == NULL) allocate_pages(); // skip to Nth set of extra values double **extra = atom->extra; int m = 0; for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]); m++; // allo...
false
false
false
true
false
1
one_of_both_attackable(int pos, int what) { UNUSED(pos); return (all_data[what].reason1 == DEFEND_STRING && all_data[what].reason2 == DEFEND_STRING && (worm[all_data[what].what1].attack_codes[0] != 0 || worm[all_data[what].what2].attack_codes[0] != 0)); }
false
false
false
false
false
0
printIndexPulldown( F_NameTable * pNameTable, FLMUINT uiSelectedIndex, FLMBOOL bIncludeNoIndex, FLMBOOL bIncludeChooseBestIndex, FLMBOOL bPrintSelect, const char * pszExtra) { FLMUINT uiNextPos; char szNameBuf[ 128]; FLMUINT uiId; FLMUINT uiType; fnPrintf( m_pHRequest, "<select name=\"index...
false
false
false
false
false
0
time_of_day(void *instance, REQUEST *req, VALUE_PAIR *request, VALUE_PAIR *check, VALUE_PAIR *check_pairs, VALUE_PAIR **reply_pairs) { int scan; int hhmmss, when; char *p; struct tm *tm, s_tm; instance = instance; request = request; /* shut the compiler up */ check_pairs = check_...
false
false
false
false
true
1
is_dos_partition(int t) { return (t == 1 || t == 4 || t == 6 || t == 0x0b || t == 0x0c || t == 0x0e || t == 0x11 || t == 0x12 || t == 0x14 || t == 0x16 || t == 0x1b || t == 0x1c || t == 0x1e || t == 0x24 || t == 0xc1 || t == 0xc4 || t == 0xc6); }
false
false
false
false
false
0
iwl_mvm_leds_init(struct iwl_mvm *mvm) { int mode = iwlwifi_mod_params.led_mode; int ret; switch (mode) { case IWL_LED_BLINK: IWL_ERR(mvm, "Blink led mode not supported, used default\n"); case IWL_LED_DEFAULT: case IWL_LED_RF_STATE: mode = IWL_LED_RF_STATE; break; case IWL_LED_DISABLE: IWL_INFO(mvm, "Le...
false
false
false
false
false
0
HCPquery_encode_header(comp_model_t model_type, model_info * m_info, comp_coder_t coder_type, comp_info * c_info) { CONSTR(FUNC, "HCPquery_encode_header"); /* for HERROR */ int32 coder_len=2; /* # of bytes to encode coder information (2 minimum) */ int32 model_len=2; /* # of bytes to encode mo...
false
false
false
false
false
0
mlx4_master_comm_channel(struct work_struct *work) { struct mlx4_mfunc_master_ctx *master = container_of(work, struct mlx4_mfunc_master_ctx, comm_work); struct mlx4_mfunc *mfunc = container_of(master, struct mlx4_mfunc, master); struct mlx4_priv *priv = container_of(mfunc, struct mlx4_priv, mfu...
false
false
false
false
false
0
GetPropertyExpanded(const wxString& key) { const long len = SendMsg(SCI_GETPROPERTYEXPANDED, (sptr_t)(const char*)wx2sci(key), 0); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); char* buf = (char*)mbuf.GetWriteBuf(len+1); SendMsg(SCI_GETPROPERTYEXPANDED, (sptr_t)(const char*)wx2sci(key...
false
false
false
false
false
0
push_intersection_point(double x1, double y1, double a1, double x2, double y2, double a2) { double c1, c2, s1, s2, d, b1, b2; _point *val; c1 = Cos(a1); s1 = Sin(a1); c2 = Cos(a2); s2 = Sin(a2); d = det2(c1, c2, s1, s2); if (ZERO(d)) runtime_error(_("parallel lines")); b1 = ...
false
false
false
false
false
0
elm_8node_brick_isoline ( double K, double *F, double *C,double *X,double *Y,double *Z,line_t *Line ) { double f[4],c[4],x[4],y[4],z[4]; int i, j, k, n=0, above=0; for( i=0; i<8; i++ ) above += F[i]>K; if ( above == 0 || above == 8 ) return 0; for( i=0; i<6; i++ ) { for( j=0;...
false
false
false
false
false
0
shmem_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags) { struct shmem_inode_info *info = SHMEM_I(d_inode(dentry)); int err; /* * If this is a request for a synthetic attribute in the system.* * namespace use the generic infrastructure to resolve a handler * for...
false
false
false
false
false
0
valval_fl(Value *val, const char *file, int line) { Value *result; struct timeval tv; if (val->type != TYPE_ID) return val; if (!(result = hgetnearestvarval(val))) { result = newSstr_fl(blankline, file, line); } else { switch (result->type & TYPES_BASIC) { case TYPE_ENUM: case TYPE_POS: case ...
false
false
false
false
true
1
totem_pl_parser_add_smil_with_data (TotemPlParser *parser, GFile *file, GFile *base_file, const char *contents, int size) { xml_node_t* doc; TotemPlParserResult retval; char *contents_dup; contents_dup = g_strndup (contents, size); doc = totem_pl_parser_parse_xml_relaxed (contents_dup, siz...
false
false
false
false
false
0
i40e_get_ethtool_fdir_all(struct i40e_pf *pf, struct ethtool_rxnfc *cmd, u32 *rule_locs) { struct i40e_fdir_filter *rule; struct hlist_node *node2; int cnt = 0; /* report total rule count */ cmd->data = i40e_get_fd_cnt_all(pf); hlist_for_each_entry_safe(rule, node2, &pf->fdir_filter_list...
false
false
false
false
false
0
print_separability(FILE * fd, struct Cluster *C) { int c1, c2; int first, last; double I_cluster_separation(); double q; I_cluster_sum2(C); fprintf(fd, _("\nclass separability matrix\n\n")); for (first = 0; first < C->nclasses; first = last) { last = first + 10; if (last > C->nclasses) ...
false
false
false
false
false
0
doProcess() { // Wrapper to getObservation mrpt::obs::CObservationWirelessPowerPtr outObservation = mrpt::obs::CObservationWirelessPower::Create(); getObservation(*outObservation); appendObservation(mrpt::obs::CObservationWirelessPowerPtr(new mrpt::obs::CObservationWirelessPower(*outObservation))); }
false
false
false
false
false
0
getSHMMAX() { ulong shmmax = 0; #if linux FILE *fd = fopen("/proc/sys/kernel/shmmax", "r"); if (fd) { if( fscanf(fd, "%lu", &shmmax) != 1) shmmax = 0x2000000; fclose(fd); } else { /* * A problem here ... SHMMAX is defined in linux/shm.h, * but if we include ...
false
false
false
false
true
1
dump(ostream&o, unsigned ind) const { o << setw(ind) << "" << "release "; dump_lval(o); o << "; /* " << get_fileline() << " */" << endl; }
false
false
false
false
false
0
sa_teardown_all(void) { int i; struct sa *sa, *next = 0; LOG_DBG((LOG_SA, 70, "sa_teardown_all:")); /* Get Phase 2 SAs. */ for (i = 0; i <= bucket_mask; i++) for (sa = LIST_FIRST(&sa_tab[i]); sa; sa = next) { next = LIST_NEXT(sa, link); if (sa->phase == 2) { /* * Teardown the ph...
false
false
false
false
false
0
esas2r_calc_byte_cksum(void *addr, u32 len, u8 seed) { u8 *p = (u8 *)addr; u8 cksum = seed; while (len--) cksum = cksum + p[len]; return cksum; }
false
false
false
false
false
0
printDoc(const char* projname, const char* docdev, const char* faustversion) { gDocDevSuffix = docdev; /** File stuff : create doc directories and a tex file. */ //cerr << "Documentator : printDoc : gFaustDirectory = '" << gFaustDirectory << "'" << endl; //cerr << "Documentator : printDoc : gFaustSuperDirectory =...
false
false
false
false
false
0
lekhonee_main_insertpara_cb (LekhoneeMain* self) { GtkTextIter _tmp0_ = {0}; GtkTextIter start; GtkTextIter _tmp1_ = {0}; GtkTextIter end; char* text; char* _result_; g_return_if_fail (self != NULL); start = (_tmp0_); end = (_tmp1_); gtk_text_buffer_get_selection_bounds ((GtkTextBuffer*) self->blog_txt, &star...
false
false
false
false
false
0
IsEmpty() const { for (uint32 i = 0; i < GetBagSize(); ++i) if (m_bagslot[i]) return false; return true; }
false
false
false
false
false
0
in_construct(orte_filem_raw_incoming_t *ptr) { ptr->app_idx = 0; ptr->pending = false; ptr->fd = -1; ptr->file = NULL; ptr->top = NULL; ptr->fullpath = NULL; ptr->link_pts = NULL; OBJ_CONSTRUCT(&ptr->outputs, opal_list_t); }
false
false
false
false
false
0
updateDownPB() { int const srows = selectedModel->rowCount(); if (srows == 0) { downPB->setEnabled(false); return; } QModelIndexList const selSels = selectedLV->selectionModel()->selectedIndexes(); int const sel_nr = selSels.empty() ? -1 : selSels.first().row(); downPB->setEnabled(sel_nr >= 0 && sel_nr <...
false
false
false
false
false
0
ai_should_spend_war(int enemyMilitaryRating, int considerCeaseFire) { int importanceRating = 30 + pref_military_development/5; // 30 to 50 importanceRating += military_rank_rating() - enemyMilitaryRating*2; if( considerCeaseFire ) // only when we are very powerful, we will start a battle. So won't cease fire ...
false
false
false
false
false
0
fd_generic_precheckpoint(void *p) { int retval; CRUT_DEBUG("Testing sanity before we checkpoint"); retval = update_fd_struct((struct fd_struct *)p); if (retval < 0) { CRUT_FAIL("update_fd_struct failed before checkpoint..."); } return retval; }
false
false
false
false
false
0
aisc_talking_get_index(int u,int o) { if (aisc_server_index==-1) { aisc_server_error = "AISC_SERVER_ERROR MISSING AN AISC_INDEX"; return -1; } if ((aisc_server_index<u) || (aisc_server_index>=o) ){ sprintf(error_buf,"AISC_SET_SERVER_ERROR: INDEX %i IS OUT OF RANGE [%i,%i]", ...
false
true
false
false
false
1
x_log_message (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message) { gchar *style; g_return_if_fail (log_dialog != NULL); if (log_level & (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR)) { style = "critical"; } else if (log_level & G_LOG_LEVEL_WARNING) { style = "war...
false
false
false
false
false
0
actionSupported( NET::Action action ) const { #if !defined(KDE_NO_WARNING_OUTPUT) if (!(d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2AllowedActions)) kWarning(176) << "Pass NET::WM2AllowedActions to KWindowInfo"; #endif if( KWindowSystem::allowedActionsSupported()) return d->i...
false
false
false
false
false
0
replace_variables(char **text, int lineno) { bool string = false; int counter = 1, ptr = 0; for (; (*text)[ptr] != '\0'; ptr++) { if ((*text)[ptr] == '\'') string = string ? false : true; if (string || (((*text)[ptr] != ':') && ((*text)[ptr] != '?'))) continue; if (((*text)[ptr] == ':') && ((*...
false
false
false
false
false
0
send_host_captain_change_packet(short player_id, int captain_change) { ubyte data[MAX_PACKET_SIZE]; int packet_size = 0; // build the packet BUILD_HEADER(TRANSFER_HOST); ADD_SHORT(player_id); ADD_INT(captain_change); // send to all multi_io_send_to_all_reliable(data, packet_size); }
false
false
false
false
false
0
main(int argc, char **argv, char **envp) { if (argc > 1) { int i = 1; for (i; i<argc; i++) { int n = atoi(argv[i]); printf("%d: %d\n", n, EULERS[(n-1)]()); } } else { int i = 0; for (; EULERS[i] != NULL; i++) { printf("%d: %d\n", (i+1)...
false
false
false
false
false
0
concat_onto(re_machine *dest, re_machine *rhs) { /* check for a null destination machine */ if (is_machine_null(dest)) { /* * the first machine is null - simply copy the second machine * onto the first unchanged */ *dest = *rhs; } else ...
false
false
false
false
false
0
e2_cmd_simple(Epson_Scanner * s, void *buf, size_t buf_size) { unsigned char result; SANE_Status status; DBG(12, "%s: size = %lu\n", __func__, (u_long) buf_size); status = e2_txrx(s, buf, buf_size, &result, 1); if (status != SANE_STATUS_GOOD) { DBG(1, "%s: failed, %s\n", __func__, sane_strstatus(status)); re...
false
false
false
false
false
0
convert_444_422 (CogFrame * frame, void *_dest, int component, int i) { uint8_t *dest = _dest; uint8_t *src; int n_src; src = cog_virt_frame_get_line (frame->virt_frame1, component, i); n_src = frame->virt_frame1->components[component].width; if (component == 0) { orc_memcpy (dest, src, frame->width);...
false
false
false
false
false
0
fread_matrix( FILE *fin, float GPFAR * GPFAR * GPFAR * ret_matrix, int *nr, int *nc, float GPFAR * GPFAR * row_title, float GPFAR * GPFAR * column_title) { float GPFAR * GPFAR * m, GPFAR * rt, GPFAR * ct; int num_rows = START_ROWS; size_t num_cols; int current_row = 0; float GPFA...
false
false
false
false
true
1
be_add_vxlan_port(struct net_device *netdev, sa_family_t sa_family, __be16 port) { struct be_adapter *adapter = netdev_priv(netdev); struct device *dev = &adapter->pdev->dev; int status; if (lancer_chip(adapter) || BEx_chip(adapter) || be_is_mc(adapter)) return; if (adapter->vxlan_port == port && adap...
false
false
false
false
false
0
init_specialist_lattice_nodes(struct tile_type_vector *lattice, const struct city *pcity) { struct cm_tile_type type; tile_type_init(&type); type.is_specialist = TRUE; /* for each specialist type, create a tile_type that has as production * the bonus for the specialist (if the city is allowed to use...
false
false
false
false
false
0
CategoryDelete(uint32 cat) { #ifdef AMULE_DAEMON if (cat > 0) { theApp->downloadqueue->ResetCatParts(cat); theApp->glob_prefs->RemoveCat(cat); if ( theApp->glob_prefs->GetCatCount() == 1 ) { thePrefs::SetAllcatFilter( acfAll ); } theApp->glob_prefs->SaveCats(); } #else if (theApp->amuledlg->m_...
false
false
false
false
false
0
gwy_rgba_remove_from_container(GwyContainer *container, const gchar *prefix) { GQuark keys[4]; g_return_val_if_fail(container && prefix, FALSE); gwy_rgba_compute_color_quarks(prefix, keys); return gwy_container_remove(container, keys[0]) + gwy_container_remove...
false
false
false
false
false
0
ptr_compare_2(size_t *compare_length,uchar **a, uchar **b) { reg3 int length= *compare_length-2; reg1 uchar *first,*last; first= *a +2 ; last= *b +2; cmp(-2); cmp(-1); loop: cmp(0); cmp(1); cmp(2); cmp(3); if ((length-=4)) { first+=4; last+=4; goto loop; } return (0); }
false
false
false
false
false
0
verify_stable(int **array, int64_t size, int num_values) { int value; int64_t i = 0; int64_t j = 0; for (value = 0; value < num_values; value++) { while (1) { i = find_next(original, i, size, value); /* unlikely, but possible */ if (i == size) { break; } j = find_nex...
false
false
false
false
false
0
tds_next_placeholder(const char *start) { const char *p = start; if (!p) return NULL; for (;;) { switch (*p) { case '\0': return NULL; case '\'': case '\"': case '[': p = tds_skip_quoted(p); break; case '-': case '/': p = tds_skip_comment(p); break; case '?': return p; defau...
false
false
false
false
false
0
do_delete(Vfs_handle *h, char *key) { if (vfs_delete(h, key) == -1) { if (h->error_msg != NULL) log_msg((LOG_ERROR_LEVEL, "%s", ds_xprintf("vfs_delete with key=\"%s\" failed: %s", key, h->error_msg))); else log_msg((LOG_ERROR_LEVEL, ds_xprintf("vfs_delete with key=\"%s\" failed", key))); ...
false
false
false
false
false
0
read_response(mailsmtp * session) { char * line; int code; mmap_string_assign(session->response_buffer, ""); do { line = read_line(session); if (line != NULL) { code = parse_response(session, line); mmap_string_append_c(session->response_buffer, '\n'); } else code = 0; } ...
false
false
false
false
false
0
main_window_get_main_toolbar (MainWindow* self) { GtkToolbar* result = NULL; GtkToolbar* main_toolbar = NULL; GtkUIManager* _tmp0_ = NULL; GtkWidget* _tmp1_ = NULL; GtkToolbar* _tmp2_ = NULL; GtkToolItem* open_button = NULL; MainWindowFile* _tmp3_ = NULL; GtkToolItem* _tmp4_ = NULL; GtkStyleContext* context = ...
false
false
false
false
false
0
vnc_connection_framebuffer_update_request(VncConnection *conn, gboolean incremental, guint16 x, guint16 y, guint16 width, guint16 height) { VncConnectionPrivate *p...
false
false
false
false
false
0
scrsendconfig(Scrn *s) { Client *c; for (c=clients; c; c = c->next) if(c->scr == s) sendconfig(c); }
false
false
false
false
false
0
slapi_filter_dup(Slapi_Filter *f) { Slapi_Filter *out = 0; struct slapi_filter *fl = 0; struct slapi_filter **outl = 0; struct slapi_filter *lastout = 0; if ( f == NULL ) { return NULL; } out = (struct slapi_filter*)slapi_ch_calloc(1, sizeof(struct slapi_filter)); if ( out == NULL ) { LDAPDebug(LD...
false
false
false
true
false
1
scheduleJob(SimpleJob *job) { kDebug(7006) << job; setJobPriority(job, 1); }
false
false
false
false
false
0
decode_nlm4_holder(struct xdr_stream *xdr, struct nlm_res *result) { struct nlm_lock *lock = &result->lock; struct file_lock *fl = &lock->fl; u64 l_offset, l_len; u32 exclusive; int error; __be32 *p; s32 end; memset(lock, 0, sizeof(*lock)); locks_init_lock(fl); p = xdr_inline_decode(xdr, 4 + 4); if (unlike...
false
false
false
false
false
0
SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull) { SPI_result = 0; if (fnumber > tupdesc->natts || fnumber == 0 || fnumber <= FirstLowInvalidHeapAttributeNumber) { SPI_result = SPI_ERROR_NOATTRIBUTE; *isnull = true; return (Datum) NULL; } return heap_getattr(tuple, fnumber, tu...
false
false
false
false
false
0
log_info() const { int aspgcd = NMath::gcd(m_width, m_height); Log::handle().log_message("- Output : Resolution %ix%i, Aspect ratio %i:%i", m_width, m_height, m_width / aspgcd, m_height / aspgcd); Log::handle().log_message("- Antialiasing : Supersampling %ix%i, %i spp", m_aa, m_aa, m_aa * m_aa); Log::hand...
false
false
false
false
false
0
utf8ntowcs ( SQLCHAR * ustr, SQLWCHAR * wstr, size_t ulen, size_t size, int * converted) { int i; int mask = 0; int len; SQLCHAR c; SQLWCHAR wc; size_t count = 0; size_t _converted = 0; if (!ustr) return 0; while ((_converted < ulen) && (count < size)) { c = (SQLCHAR) *u...
false
false
false
false
false
0
too_big_for_gnutella(fileoffset_t size) { g_return_val_if_fail(size >= 0, TRUE); return size + (filesize_t)0 > (filesize_t)-1 + (fileoffset_t)0; }
false
false
false
false
false
0
pwm_export_child(struct device *parent, struct pwm_device *pwm) { struct pwm_export *export; int ret; if (test_and_set_bit(PWMF_EXPORTED, &pwm->flags)) return -EBUSY; export = kzalloc(sizeof(*export), GFP_KERNEL); if (!export) { clear_bit(PWMF_EXPORTED, &pwm->flags); return -ENOMEM; } export->pwm = pwm;...
false
false
false
false
false
0
midi_synth_load_patch(int dev, int format, const char __user *addr, int count, int pmgr_flag) { int orig_dev = synth_devs[dev]->midi_dev; struct sysex_info sysex; int i; unsigned long left, src_offs, eox_seen = 0; int first_byte = 1; int hdr_size = (unsig...
false
false
false
false
false
0
getPrintPreviewBitmap(void *bitmap, unsigned long size) { OFCondition status = EC_IllegalCall; if ((pHardcopyImage != NULL) && (bitmap != NULL) && (size > 0)) { if (pHardcopyImage->getOutputData(bitmap, size, 8 /*bits*/)) status = EC_Normal; } return status; }
false
false
false
false
false
0
migrate_parse_signature_xml_end_element (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error) { ParseData *parse_data = user_data; if (g_strcmp0 (element_...
false
false
false
false
false
0
checkVarFuncNullUB() { if (!_settings->isEnabled("portability")) return; const SymbolDatabase *symbolDatabase = _tokenizer->getSymbolDatabase(); const std::size_t functions = symbolDatabase->functionScopes.size(); for (std::size_t i = 0; i < functions; ++i) { const Scope * scope = symbo...
false
false
false
true
false
1
dumpchan_exec(struct ast_channel *chan, const char *data) { struct ast_str *vars = ast_str_thread_get(&ast_str_thread_global_buf, 16); char info[2048]; int level = 0; static char *line = "================================================================================"; if (!ast_strlen_zero(data)) level = atoi(...
false
false
false
false
false
0
session_request_logout(gboolean silent) { if (sm_conn) { SmcRequestSaveYourself(sm_conn, SmSaveGlobal, TRUE, /* logout */ (silent ? SmInteractStyleNone : SmInteractStyleAny), ...
false
false
false
false
false
0
AppendList(const ALCchar *name, ALCchar **List, size_t *ListSize) { size_t len = strlen(name); void *temp; if(len == 0) return; temp = realloc(*List, (*ListSize) + len + 2); if(!temp) { ERR("Realloc failed to add %s!\n", name); return; } *List = temp; memcp...
false
false
false
false
false
0
saa7164_api_set_encoder(struct saa7164_port *port) { struct saa7164_dev *dev = port->dev; struct tmComResEncVideoBitRate vb; struct tmComResEncAudioBitRate ab; int ret; dprintk(DBGLVL_ENC, "%s() unitid=0x%x\n", __func__, port->hwcfg.sourceid); if (port->encoder_params.stream_type == V4L2_MPEG_STREAM_TYPE_MPEG...
false
false
false
false
false
0
set( size_t recordIndex, string field, string value) { MRPT_START ASSERT_(recordIndex<getRecordCount()); data[recordIndex][fieldIndex(field.c_str())]=value; MRPT_END }
false
false
false
false
false
0
mtip_detect_product(struct driver_data *dd) { u32 hwdata; unsigned int rev, slotgroups; /* * HBA base + 0xFC [15:0] - vendor-specific hardware interface * info register: * [15:8] hardware/software interface rev# * [ 3] asic-style interface * [ 2:0] number of slot groups, minus 1 (only valid for asic-sty...
false
false
false
false
false
0
gst_matroska_mux_create_buffer_header (GstMatroskaTrackContext * track, gint16 relative_timestamp, int flags) { GstBuffer *hdr; hdr = gst_buffer_new_and_alloc (4); /* track num - FIXME: what if num >= 0x80 (unlikely)? */ GST_BUFFER_DATA (hdr)[0] = track->num | 0x80; /* time relative to clustertime */ G...
false
false
false
false
false
0
zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos) { Bucket *p; p = pos ? (*pos) : ht->pInternalPointer; IS_CONSISTENT(ht); if (p) { *pData = p->pData; return SUCCESS; } else { return FAILURE; } }
false
false
false
false
false
0