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
is_field_on_inst (MonoClassField *field) { return (field->parent->generic_class && field->parent->generic_class->is_dynamic && ((MonoDynamicGenericClass*)field->parent->generic_class)->fields); }
false
false
false
false
false
0
onCmdPasteSel(FXObject*,FXSelector,void*){ if(isEditable()){ FXString string; // Delete existing selection if(hasSelection()){ handle(this,FXSEL(SEL_COMMAND,ID_DELETE_SEL),NULL); } // First, try UTF-8 if(getDNDData(FROM_CLIPBOARD,utf8Type,string)){ FXTRACE((100,"Paste UTF8\n"))...
false
false
false
false
false
0
stop_critical_timing(unsigned long ip, unsigned long parent_ip) { int cpu; struct trace_array *tr = irqsoff_trace; struct trace_array_cpu *data; unsigned long flags; cpu = raw_smp_processor_id(); /* Always clear the tracing cpu on stopping the trace */ if (unlikely(per_cpu(tracing_cpu, cpu))) per_cpu(tracing_...
false
false
false
false
false
0
e2_plugins_store_child_data (GtkTreeModel *model, GtkTreeIter *iter, Plugin *p) { if (p->child_list != NULL) { GtkTreeIter iter2; GList *member; for (member = p->child_list; member != NULL; member = member->next) { E2_Sextet *uidata = (E2_Sextet *)member->data; gtk_tree_store_insert_before (GTK_TREE_STO...
false
false
false
false
false
0
cr_statement_at_charset_rule_parse_from_buf (const guchar * a_buf, enum CREncoding a_encoding) { enum CRStatus status = CR_OK; CRStatement *result = NULL; CRString *charset = NULL; g_return_val_if_fail (a_buf, NULL); CRParser *parser...
false
false
false
false
false
0
adis16136_get_filter(struct iio_dev *indio_dev, int *val) { struct adis16136 *adis16136 = iio_priv(indio_dev); unsigned int freq; uint16_t val16; int ret; mutex_lock(&indio_dev->mlock); ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_AVG_CNT, &val16); if (ret < 0) goto err_unlock; ret = adis16136_ge...
false
false
false
false
false
0
sdb_query_search_parent_scope_file (IAnjutaSymbolQuery *query, IAnjutaSymbol *symbol, const gchar *file_path, GError **error) { const gchar *db_relative_path; SDB_QUERY_SEARCH_HEADER; g_return_val_if_fail (priv->name == IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE, NULL); db_relativ...
false
false
false
false
false
0
elm_entry_context_menu_disabled_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return EINA_FALSE; return !wd->context_menu; }
false
false
false
false
false
0
rme_shm_open(rme_shm_t **shm_data) { signed int shmfd, lockfd; rme_shm_t *data; signed int created = 0; if (shm_data == NULL) { return RSO_ERROR; } *shm_data = NULL; lockfd = rme_shm_lock_for_setup(); shmfd = shm_open(RME_SHM_NAME, O_RDWR, 0644); if (shmfd < 0) { ...
false
false
false
false
false
0
rfbSendSecurityTypeList(rfbClientPtr cl, int primaryType) { /* The size of the message is the count of security types +1, * since the first byte is the number of types. */ int size = 1; rfbSecurityHandler* handler; #define MAX_SECURITY_TYPES 255 uint8_t buffer[MAX_SECURITY_TYPES+1]; /* Fill i...
false
false
false
false
false
0
rtw_get_bit_value_from_ieee_value(u8 val) { unsigned char dot11_rate_table[] = { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108, 0}; /* last element must be zero!! */ int i = 0; while (dot11_rate_table[i] != 0) { if (dot11_rate_table[i] == val) return BIT(i); i++; } return 0; }
false
false
false
false
false
0
doinit() { HwMEBase::doinit(); _wplus = getParticleData(ThePEG::ParticleID::Wplus ); _wminus = getParticleData(ThePEG::ParticleID::Wminus); // cast the SM pointer to the Herwig SM pointer ThePEG::Ptr<Herwig::StandardModel>::transient_const_pointer hwsm=ThePEG::dynamic_ptr_cast< ThePEG::Ptr<Herwig::Stand...
false
false
false
false
false
0
fst_close(struct net_device *dev) { struct fst_port_info *port; struct fst_card_info *card; unsigned char tx_dma_done; unsigned char rx_dma_done; port = dev_to_port(dev); card = port->card; tx_dma_done = inb(card->pci_conf + DMACSR1); rx_dma_done = inb(card->pci_conf + DMACSR0); dbg(DBG_OPEN, "Port Clos...
false
false
false
false
false
0
xmmsv_coll_add_operand (xmmsv_coll_t *coll, xmmsv_coll_t *op) { xmmsv_list_iter_t *it; xmmsv_t *v; x_return_if_fail (coll); x_return_if_fail (op); /* we used to check if it already existed here before */ if (!xmmsv_get_list_iter (coll->operands, &it)) return; if (_xmmsv_coll_operand_find (it, op)) { x_api_...
false
false
false
false
false
0
_TwoOutEpMapping(struct ieee80211_hw *hw, bool bIsChipB, bool bwificfg, struct rtl_ep_map *ep_map) { struct rtl_priv *rtlpriv = rtl_priv(hw); if (bwificfg) { /* for WMM */ RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "USB Chip-B & WMM Setting.....\n"); ep_map->ep_mapping[RTL_TXQ_BE] = 2; ep_map->ep_map...
false
false
false
false
false
0
SIO_ChkSum(const UBYTE *buffer, int length) { #if 0 /* old, less efficient version */ int i; int checksum = 0; for (i = 0; i < length; i++, buffer++) { checksum += *buffer; while (checksum > 255) checksum -= 255; } #else int checksum = 0; while (--length >= 0) checksum += *buffer++; do checksum = (ch...
false
false
false
false
false
0
expand_atomic_store (rtx mem, rtx val, enum memmodel model, bool use_release) { enum machine_mode mode = GET_MODE (mem); enum insn_code icode; struct expand_operand ops[3]; /* If the target supports the store directly, great. */ icode = direct_optab_handler (atomic_store_optab, mode); if (icode != CODE_FO...
false
false
false
false
false
0
pre_gcse (void) { unsigned int i; int did_insert, changed; struct expr **index_map; struct expr *expr; /* Compute a mapping from expression number (`bitmap_index') to hash table entry. */ index_map = xcalloc (expr_hash_table.n_elems, sizeof (struct expr *)); for (i = 0; i < expr_hash_table.size; i...
false
false
false
false
false
0
get_join_variables(PlannerInfo *root, List *args, SpecialJoinInfo *sjinfo, VariableStatData *vardata1, VariableStatData *vardata2, bool *join_is_reversed) { Node *left, *right; if (list_length(args) != 2) elog(ERROR, "join operator should take two arguments"); left = (Node *) linitial(args...
false
false
false
false
false
0
ho_dimentions_line_spacing (ho_bitmap * m) { int return_val; ho_objmap *m_obj = NULL; ho_bitmap *m_clean = NULL; ho_bitmap *m_temp1 = NULL; ho_bitmap *m_temp2 = NULL; int x, y; int width; int height; unsigned char nikud_ret; int font_height = m->font_height; int font_width = m->font_width; un...
false
false
false
false
false
0
client_get_colormap(ObClient *self) { XWindowAttributes wa; if (XGetWindowAttributes(obt_display, self->window, &wa)) client_update_colormap(self, wa.colormap); }
false
false
false
false
false
0
ks8851_resume(struct device *dev) { struct ks8851_net *ks = dev_get_drvdata(dev); struct net_device *netdev = ks->netdev; if (netif_running(netdev)) { ks8851_net_open(netdev); netif_device_attach(netdev); } return 0; }
false
false
false
false
false
0
macsim_output(struct alignment* aln,char* outfile,char* infile) { int i,j,f; int tmp; struct feature *fn = 0; FILE *fout = NULL; if(outfile){ if ((fout = fopen(outfile, "w")) == NULL){ fprintf(stderr,"can't open output\n"); exit(0); } }else{ fout = stdout; } fprintf(fout,"<?xml version=\"1.0\"?>\n<...
false
false
false
false
false
0
mic_send_p2p_intr(int db, struct mic_mw *mw) { int rdmasr_index; if (db < MIC_X100_NUM_SBOX_IRQ) { mic_x100_send_sbox_intr(mw, db); } else { rdmasr_index = db - MIC_X100_NUM_SBOX_IRQ; mic_x100_send_rdmasr_intr(mw, rdmasr_index); } }
false
false
false
false
false
0
floor_get_idx_oldest_squelched(int y, int x) { s16b squelch_idx = 0; s16b this_o_idx; object_type *o_ptr = NULL; for (this_o_idx = cave->o_idx[y][x]; this_o_idx; this_o_idx = o_ptr->next_o_idx) { o_ptr = object_byid(this_o_idx); if (squelch_item_ok(o_ptr)) squelch_idx = this_o_idx; } return squelch_id...
false
false
false
false
false
0
init(double x1, double y1, double x2, double y2, double x3, double y3) { m_start_x = x1; m_start_y = y1; m_end_x = x3; m_end_y = y3; double dx1 = x2 - x1; double dy1 = y2 - y1; double dx2 = x3 - x2; ...
false
false
false
false
false
0
RemoveDeoptimizingCode(Code* code) { ASSERT(deoptimizing_code_list_ != NULL); // Run through the code objects to find this one and remove it. DeoptimizingCodeListNode* prev = NULL; DeoptimizingCodeListNode* current = deoptimizing_code_list_; while (current != NULL) { if (*current->code() == code) { ...
false
false
false
false
false
0
setData(const int ref, const QVariant &value) { if (m_Model) { switch (ref) { case DateStart: setBeginning(value.toDateTime()); break; case DateEnd: setEnding(value.toDateTime()); break; case CreatedDate: m_created = value.toDateTime(); break; } return m_Model->setDa...
false
false
false
false
false
0
string_substring (const char* self, glong offset, glong len) { char* result; glong string_length; const char* start; g_return_val_if_fail (self != NULL, NULL); string_length = g_utf8_strlen (self, -1); if (offset < 0) { offset = string_length + offset; g_return_val_if_fail (offset >= 0, NULL); } else { g_r...
false
false
false
false
false
0
BNA_Display(BNARecord* record) { int i; fprintf(stderr, "\"%s\", \"%s\", \"%s\", %s\n", record->ids[0] ? record->ids[0] : "", record->ids[1] ? record->ids[1] : "", record->ids[2] ? record->ids[2] : "", BNA_FeatureTypeToStr(record->featureType)); for(i=0;i<record->nCoords;i+...
false
false
false
false
false
0
LockFile(const std::string& fname, FileLock** lock) { *lock = NULL; Status result; int fd = open(fname.c_str(), O_RDWR | O_CREAT, 0644); if (fd < 0) { result = IOError(fname, errno); } else if (!locks_.Insert(fname)) { close(fd); result = Status::IOError("lock " + fname, "already h...
false
false
false
false
false
0
TeleportAllPlayersTo(TeleportLocation loc) { while (HavePlayers()) { if (Player* plr = m_mapRefManager.getFirst()->getSource()) { // Teleport to specified location and removes the player from this map (if the map exists). // Todo : we can add some specific location if nee...
false
false
false
false
false
0
ipAddressTable_indexes_set(ipAddressTable_rowreq_ctx * rowreq_ctx, u_long ipAddressAddrType_val, u_char *ipAddressAddr_val_ptr, size_t ipAddressAddr_val_ptr_len) { DEBUGMSGTL(("verbose:ipAddressTable:ipAddressTable_indexes_set", ...
false
false
false
false
false
0
_gatherAlignment () { const gchar *text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (m_cobAlignment)); for (guint i = 0; i < __FL_TAB_MAX; i++) { if (strcmp (text, m_AlignmentMapping[i]) == 0) return (eTabType)i; } return FL_TAB_NONE; }
false
false
false
false
false
0
gf_isom_set_sync_shadow(GF_ISOFile *movie, u32 trackNumber, u32 sampleNumber, u32 syncSample) { GF_TrackBox *trak; GF_SampleTableBox *stbl; u8 isRAP; GF_Err e; if (movie->openMode == GF_ISOM_OPEN_READ) return GF_ISOM_INVALID_MODE; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak || !sampleNumbe...
false
false
false
false
false
0
chg_ofs_cmp(register word32 *dwp, register word32 *swp, int32 dbi, int32 numbits) { register int32 bi; register word32 mask1, mask2; int32 wi, sbit2, w2bits, w2len, chged; word32 save_val; sbit2 = WBITS - dbi; mask1 = __masktab[dbi]; mask2 = __masktab[sbit2]; w2bits = numbits + dbi; w2len = wlen_(w2bits);...
false
false
false
false
false
0
convert_from_other_format (const gchar *found, const gchar *target, const gchar *album_path, const gchar *artist) { gboolean retval; gchar *sum1 = NULL; gchar *target_temp; target_temp = g_strdup_printf ("%s-tmp", target); retval = ...
false
false
false
false
false
0
optimize() const { return create(get_arg()->optimize()); }
false
false
false
false
false
0
_is_proto_compat_with_addr(const char *proto, const struct sockaddr *sa) { if (!strcmp(proto, "KRB4") && sa->sa_family == AF_INET6 && !IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)sa)->sin6_addr)) { return 0; } return 1; }
false
false
false
false
false
0
asv_update_handle(const f_int * index, const char * value, const char * handles[] ) { f_int pos = 0; while ((strcasecmp(value,handles[pos])) && (*handles[pos])) pos++; if (!*handles[pos]) { /* the value token is a number or junk */...
false
false
true
false
true
1
TnsFilter(int length,double* spec,TnsFilterData* filter) { int i,j,k=0; int order=filter->order; double* a=filter->aCoeffs; /* Determine loop parameters for given direction */ if (filter->direction) { /* Startup, initial state is zero */ for (i=length-2;i>(length-1-order);i--) { ...
false
false
false
false
false
0
scan_ip6(const char *s,char ip[16]) { unsigned int i; unsigned int len=0; unsigned long u; char suffix[16]; unsigned int prefixlen=0; unsigned int suffixlen=0; for (i=0; i<16; i++) ip[i]=0; for (;;) { if (*s == ':') { len++; if (s[1] == ':') { /* Found "::", skip to part 2 */ s+=2; ...
false
false
false
false
false
0
somethingToDoWithSpaces(const char *const buf, char **const ptr) { if (*buf != 0 && isspace((int)*buf)) { while (**ptr != 0 && !isspace((int)**ptr)) { (*ptr)++; } } }
false
false
false
false
false
0
EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) { MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol); if ((SD.getFlags() & (0xf << ELF_STB_Shift)) == ELF_STB_Local) { const MCSection *Section = getAssembler().getContext().getELFSect...
false
false
false
false
false
0
parser_real_set_variable (Parser* self, const gchar* name, Number* x) { g_return_if_fail (name != NULL); g_return_if_fail (x != NULL); }
false
false
false
false
false
0
gdht_free_sha1_lookup(struct sha1_lookup *slk, bool do_remove) { sha1_lookup_check(slk); if (do_remove) hikset_remove(sha1_lookups, slk->id); kuid_atom_free(slk->id); atom_guid_free(slk->fi_guid); WFREE(slk); }
false
false
false
false
false
0
soup_buffer_free (SoupBuffer *buffer) { SoupBufferPrivate *priv = (SoupBufferPrivate *)buffer; if (!--priv->refcount) { if (priv->owner_dnotify) priv->owner_dnotify (priv->owner); g_slice_free (SoupBufferPrivate, priv); } }
false
false
false
false
false
0
cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset) { int rc = -EACCES; unsigned int bytes_read = 0; unsigned int total_read; unsigned int current_read_size; unsigned int rsize; struct cifs_sb_info *cifs_sb; struct cifs_tcon *tcon; struct TCP_Server_Info *server; unsigned int xid; ...
false
false
false
false
false
0
nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int err = -ENOMEM; int cfg; struct tiger_hw *card; if (pdev->subsystem_vendor == 0x8086 && pdev->subsystem_device == 0x0003) { pr_notice("Netjet: Digium X100P/X101P not handled\n"); return -ENODEV; } if (pdev->subsystem_vendor == 0x55 &&...
false
false
false
false
false
0
val_equal(const cst_val *v1, const cst_val *v2) { if (v1 == v2) return TRUE; /* its eq so its equal */ else if (v1 == 0) return FALSE; else if (CST_VAL_TYPE(v1) == CST_VAL_TYPE(v2)) { if (cst_val_consp(v1)) return ((val_equal(val_car(v1),val_car(v2))) && (val_equal(val_cdr(v1),val_cdr(v2)...
false
false
false
false
false
0
SQLInstallDriverManagerW (LPWSTR lpszPath, WORD cbPathMax, WORD FAR * pcbPathOut) { char *_path_u8 = NULL; BOOL retcode = FALSE; if (cbPathMax > 0) { if ((_path_u8 = malloc (cbPathMax * UTF8_MAX_CHAR_LEN + 1)) == NULL) { PUSH_ERROR (ODBC_ERROR_OUT_OF_MEM); goto done; } } retcode = ...
false
true
false
false
false
1
ParseFaceChunk() { ASSIMP_3DS_BEGIN_CHUNK(); // Get the mesh we're currently working on D3DS::Mesh& mMesh = mScene->mMeshes.back(); // Get chunk type switch (chunk.Flag) { case Discreet3DS::CHUNK_SMOOLIST: { // This is the list of smoothing groups - a bitfield for every face. // Up to 32 smoothing group...
false
false
false
false
false
0
entryHasObjectClass(Slapi_PBlock *pb, Slapi_Entry *e, const char *objectClass) { Slapi_Attr *attr; Slapi_Value *v; const struct berval *bv; int vhint; if ( slapi_entry_attr_find(e, "objectclass", &attr) ) { return 0; /* no objectclass values! */ } /* * Check each of the object class values in turn. ...
false
false
false
false
false
0
OnSettings(wxCommandEvent &/*event*/) { FileBrowserSettings fbs(m_favdirs,NULL); if(fbs.ShowModal()==wxID_OK) { size_t count=m_favdirs.GetCount(); for(size_t i=0;i<count;i++) m_Loc->Delete(0); m_favdirs=fbs.m_favdirs; count=m_favdirs.GetCount(); for(size_t...
false
false
false
false
false
0
sse_pusher_thread_func(void *param) { while (s_received_signal == 0) { mg_wakeup_server_ex(s_server, sse_push, "%lu %s", (unsigned long) time(NULL), (const char *) param); sleep(1); } return NULL; }
false
false
false
false
false
0
assignPalette(SDL_Color* colors, int startColor, int colorNum ) { if ( me ) SDL_SetColors ( me, colors, startColor, colorNum ); }
false
false
false
false
false
0
_cpufreq_set_governor(const char *governor) { char buf[4096]; int ret; snprintf(buf, sizeof(buf), "%s %s %s", cpufreq_config->set_exe_path, "governor", governor); ret = system(buf); if (ret != 0) { E_Dialog *dia; E_Container *con; con = e_container_current_get(e...
false
false
false
false
false
0
iwl_sensitivity_write(struct iwl_priv *priv) { struct iwl_sensitivity_cmd cmd; struct iwl_sensitivity_data *data = NULL; struct iwl_host_cmd cmd_out = { .id = SENSITIVITY_CMD, .len = { sizeof(struct iwl_sensitivity_cmd), }, .flags = CMD_ASYNC, .data = { &cmd, }, }; data = &(priv->sensitivity_data); mems...
false
true
false
false
false
1
ts_and_fs(struct formula *f) { struct formula *f1, *f2, *f_prev; int f_type; f_type = f->type; if (f_type != AND_FORM && f_type != OR_FORM) return; else { f_prev = NULL; f1 = f->first_child; while (f1 != NULL) { if ((f1->type == AND_FORM || f1->type == OR_FORM) && f1->first_child == ...
false
false
false
false
false
0
radeon_hwmon_init(struct radeon_device *rdev) { int err = 0; switch (rdev->pm.int_thermal_type) { case THERMAL_TYPE_RV6XX: case THERMAL_TYPE_RV770: case THERMAL_TYPE_EVERGREEN: case THERMAL_TYPE_NI: case THERMAL_TYPE_SUMO: case THERMAL_TYPE_SI: case THERMAL_TYPE_CI: case THERMAL_TYPE_KV: if (rdev->asic->pm...
false
false
false
false
false
0
AttemptAttack(ARegion *r, Unit *u, Unit *t, int silent, int adv) { if (!t->IsAlive()) return; if (!u->CanSee(r, t)) { if (!silent) u->Error("ATTACK: Non-existent unit."); return; } if (!u->CanCatch(r, t)) { if (!silent) u->Error("ATTACK: Can't catch that unit."); return; } RunBattle(r, u, t, 0, adv); ...
false
false
false
false
false
0
test_listing (void) { gchar **names; gsize len; gchar *start; GError *error = NULL; const gchar *data = "[group1]\n" "key1=value1\n" "key2=value2\n" "[group2]\n" "key3=value3\n" "key4=value4\n"; cut_assert (g_key_file_load_from_data (keyfile, data, -1, 0, NULL)); names = g_ke...
false
false
false
true
false
1
irplib_polynomial_solve_1d_all(const cpl_polynomial * self, cpl_vector * roots, cpl_size * preal) { cpl_error_code error = CPL_ERROR_NONE; cpl_polynomial * p; cpl_ensure_code(self != NULL, CPL_ERROR_NULL_INPUT); ...
false
false
false
false
false
0
get_date(char *dateField, size_t len, struct timeval when) { /* To make sure we have date variable if not insert null to SQL */ if (!ast_tvzero(when)) { struct ast_tm tm; ast_localtime(&when, &tm, NULL); ast_strftime(dateField, len, "'" DATE_FORMAT "'", &tm); } else { ast_copy_string(dateField, "null", len);...
false
false
false
false
false
0
gtm601_registerCustomMediators (GeeHashMap* mediators) { GeeHashMap* _tmp0_ = NULL; GeeHashMap* _tmp1_ = NULL; GeeHashMap* _tmp2_ = NULL; GeeHashMap* _tmp3_ = NULL; g_return_if_fail (mediators != NULL); _tmp0_ = mediators; gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, (gpointer) ((gintptr) FSO_GSM_TYPE_CALL_SE...
false
false
false
false
false
0
readyReadStandardOutput() { while (m_pProcess->canReadLine()) { const QByteArray bytes(m_pProcess->readLine()); if (bytes.count() > 0) send(OUTPUT, bytes.data()); } }
false
false
false
false
false
0
request_finished(struct request *const req, struct request **head, int free_handle) { struct evdns_base *base = req->base; int was_inflight = (head != &base->req_waiting_head); EVDNS_LOCK(base); ASSERT_VALID_REQUEST(req); if (head) evdns_request_remove(req, head); log(EVDNS_LOG_DEBUG, "Removing timeout for re...
false
false
false
false
false
0
read_config_file(const char *filename) { int fd; struct stat st; char *data, *dest; size_t left; fd = open(filename, O_RDONLY); if (fd == -1) { cm_log(1, "Cannot open configuration file \"%s\": %s.\n", filename, strerror(errno)); return NULL; } /* stat() the fil...
false
false
false
false
false
0
lzh_decode_free(struct lzh_stream *strm) { if (strm->ds == NULL) return; free(strm->ds->w_buff); lzh_huffman_free(&(strm->ds->lt)); lzh_huffman_free(&(strm->ds->pt)); free(strm->ds); strm->ds = NULL; }
false
false
false
false
false
0
getSecondaries(uint32_t variableTop, uint32_t pair) { if(pair <= 0xffff) { // one mini CE if(pair >= MIN_SHORT) { pair = getSecondariesFromOneShortCE(pair); } else if(pair > variableTop) { pair = COMMON_SEC_PLUS_OFFSET; } else if(pair >= MIN_LONG) { ...
false
false
false
false
false
0
multi_debrief_stats_accept() { // don't do anything if we've already accepted if(Multi_debrief_stats_accept_code != -1){ return; } Multi_debrief_stats_accept_code = 1; // if we're the host, and we're on a standalone, tell the standalone to begin the stats storing process if((Net_player->flags & NETINFO_FLAG_...
false
false
false
false
false
0
kanato(k1, k2, code) char_u *k1, *k2; int code; { switch(code) { case JP_JIS: *k1 &= 0x7f; *k2 = NUL; break; case JP_EUC: *k2 = *k1; *k1 = JP_EUC_G2; break; #ifdef UCODE case JP_UTF8: case JP_WIDE: multi2wide(k1, k2, 1, TRUE); break; #endif default: *k2 = NUL; break; } }
false
false
false
false
false
0
dubiousWeights(const ClpSimplex * model, int * /*inputWeights*/) const { int number = model->numberRows() + model->numberColumns(); CoinBigIndex * weights = new CoinBigIndex[number]; int i; for (i = 0; i < number; i++) weights[i] = 1; return weights; }
false
false
false
false
false
0
AInvFFE ( Obj op ) { FFV v, vX; /* value of operand, result */ FF fX; /* field of result */ FF* sX; /* successor table of result field */ /* get the field for the result ...
false
false
false
false
false
0
lessThan( const Track &other, qint64 fieldMask ) const { // artist > year > album > discNumber > trackNumber > composer > title if( fieldMask & Meta::valArtist && artist().toLower() != other.artist().toLower() ) return artist().toLower() < other.artist().toLower(); if( fieldMask & Meta::valYear && y...
false
false
false
false
false
0
run_command_stream( cond_rc_t *cond_rc, FILE *f, const exec_context_t *exc) { char *tline; char line[1024]; /* Set close-on-exec flag */ fcntl(fileno(f), F_SETFD, 1); /* Update window decorations in case we were called from a menu that * has now popped down. */ handle_all_expose(); tline = fgets(line, (siz...
true
true
false
false
false
1
display_bottle(const rum_element_t *bottle) { const char *bottle_type = rum_element_get_value(bottle, "type"); const char *aged = rum_element_get_value(bottle, "aged"); const char *vintage = rum_element_get_value(bottle, "vintage"); const char *maker = rum_element_get_content(bottle); printf(" ...
false
false
false
false
false
0
visit(const char* value,orbOptions::Source) throw (orbOptions::BadParam) { CORBA::Boolean v; if (!orbOptions::getBoolean(value,v)) { throw orbOptions::BadParam(key(),value, orbOptions::expect_boolean_msg); } orbParameters::offerBiDirectionalGIOP = v; }
false
false
false
false
false
0
pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) { pvr2_context_enter(mp); cp->hdw = mp->hdw; cp->mc_head = mp; cp->mc_next = NULL; cp->mc_prev = mp->mc_last; if (mp->mc_last) { mp->mc_last->mc_next = cp; } else { mp->mc_first = cp; } mp->mc_last = cp; pvr2_context_exit(mp); }
false
false
false
false
false
0
promote FCN((v0,v1)) VAL HUGE*v0 C0("Left-hand value.") VAL HUGE*v1 C1("Right-hand value.") { if((int)v0->type>(int)v1->type)convert_to(v0->type,v0,v1); else convert_to(v1->type,v0,v1); }
false
false
false
false
false
0
cot(const RCP<const Basic> &arg) { RCP<const Basic> ret_arg; int index; int sign; bool conjugate = eval(arg, 1, 1, 1, //input outArg(ret_arg), index, sign); //output if (conjugate) { // cos has to be returned if (sign == 1) return rcp(new Tan(ret_a...
false
false
false
false
false
0
open () { zmq_assert (s == retired_fd); // Create the socket. s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s == -1) return -1; // Set to non-blocking mode. int flags = fcntl (s, F_GETFL, 0); if (flags == -1) flags = 0; int rc = fcntl (s, F_SETFL, flags | O_NONB...
false
false
false
false
false
0
diff_tree_stdin(char *line) { int len = strlen(line); unsigned char sha1[20]; struct object *obj; if (!len || line[len-1] != '\n') return -1; line[len-1] = 0; if (get_sha1_hex(line, sha1)) return -1; obj = lookup_unknown_object(sha1); if (!obj || !obj->parsed) obj = parse_object(sha1); if (!obj) retur...
true
true
false
false
false
1
draw2DSprite(u32 index, const core::position2di& pos, const core::rect<s32>* clip, const video::SColor& color, u32 starttime, u32 currenttime, bool loop, bool center) { if (index >= Sprites.size() || Sprites[index].Frames.empty() ) return; // work out frame number u32 frame = 0; if (Sprites[index].f...
false
false
false
false
false
0
gfs_findxmlattr(const char *path, const char *expr, int depth, struct gfs_xmlattr_ctx **ctxpp) { gfarm_error_t e; gfarm_timerval_t t1, t2; struct gfs_xmlattr_ctx *ctxp; GFARM_TIMEVAL_FIX_INITIALIZE_WARNING(t1); gfs_profile(gfarm_gettimerval(&t1)); if ((ctxp = gfs_xmlattr_ctx_alloc(GFARM_DEFAULT_FINDXMLATTR_NEN...
false
false
false
false
false
0
sx150x_reset(struct sx150x_chip *chip) { int err; err = i2c_smbus_write_byte_data(chip->client, chip->dev_cfg->pri.x789.reg_reset, 0x12); if (err < 0) return err; err = i2c_smbus_write_byte_data(chip->client, chip->dev_cfg->pri.x789.reg_reset, 0x34); return err; }
false
false
false
false
false
0
argv_was_used(const argv_t *args, const char short_arg) { const argv_t *arg_p; if (! enabled_b) { argv_startup(); } for (arg_p = args; arg_p->ar_short_arg != ARGV_LAST; arg_p++) { if (arg_p->ar_short_arg == short_arg) { if (arg_p->ar_type & ARGV_FLAG_USED) { return 1; } else { ...
false
false
false
false
false
0
ReturnPartialMatch( void *theEnv, struct partialMatch *waste) { /*==============================================*/ /* If the partial match is in use, then put it */ /* on a garbage list to be processed later when */ /* the partial match is not in use. */ /*=============================...
false
false
false
false
false
0
readGobanComments(GmpPlay *l) { const char *comm; comm = goban_getComments(l->goban); if (comm[0]) { l->moves->mode = sgfInsert_inline; sgf_comment(l->moves, comm); l->moves->mode = sgfInsert_main; l->lastComment = l->moves->active; } else if (l->lastComment) { sgfElem_snip(l->lastCommen...
false
false
false
false
false
0
luaL_unref (lua_State *L, int t, int ref) { if (ref >= 0) { t = lua_absindex(L, t); lua_rawgeti(L, t, freelist); lua_rawseti(L, t, ref); /* t[ref] = t[freelist] */ lua_pushinteger(L, ref); lua_rawseti(L, t, freelist); /* t[freelist] = ref */ } } /* }
true
true
false
false
false
1
is_text_buf(buf_ptr, buf_size) ZCONST char *buf_ptr; unsigned buf_size; { int result = 0; unsigned i; unsigned char c; for (i = 0; i < buf_size; ++i) { c = (unsigned char)buf_ptr[i]; if (c >= 32) /* speed up the loop by checking this first */ result = 1; /* wh...
false
false
false
false
false
0
tds_alloc_cursor(TDSSOCKET *tds, const char *name, TDS_INT namelen, const char *query, TDS_INT querylen) { TDSCURSOR *cursor; TDSCURSOR *pcursor; TEST_MALLOC(cursor, TDSCURSOR); cursor->ref_count = 1; if ( tds->cursors == NULL ) { tds->cursors = cursor; } else { pcursor = tds->cursors; for (;;) { tdsdu...
false
true
false
false
false
1
FCOMPP(bxInstruction_c *i) { #if BX_SUPPORT_FPU BX_CPU_THIS_PTR prepareFPU(i); BX_CPU_THIS_PTR FPU_update_last_instruction(i); clear_C1(); if (IS_TAG_EMPTY(0) || IS_TAG_EMPTY(1)) { FPU_exception(FPU_EX_Stack_Underflow); setcc(FPU_SW_C0|FPU_SW_C2|FPU_SW_C3); if(BX_CPU_THIS_PTR the_i387.is_...
false
false
false
false
false
0
multiseq_mark(add_susp_type susp) { int i; multiseq_type ms = susp->multiseq; D nyquist_printf("multiseq_mark(%p)\n", susp); /* nyquist_printf("marking s1@%p in add@%p\n", susp->s1, susp);*/ if (ms->closure) mark(ms->closure); /* mark s1 of each susp in multiseq */ for (i = 0; i < ms->nchans;...
false
false
false
false
false
0
gf_w8_double_table_multiply_region(gf_t *gf, void *src, void *dest, gf_val_32_t val, int bytes, int xor) { uint16_t *base; uint32_t b, c, vc, vb; gf_internal_t *h; struct gf_w8_double_table_data *dtd; struct gf_w8_double_table_lazy_data *ltd; gf_region_data rd; if (val == 0) { gf_multby_zero(dest, byte...
false
false
false
false
false
0
handler_function_c (LmMessageHandler* handler, LmConnection* connection, LmMessage* message, handler_data* data) { LmHandlerResult result = data->callback (connection, message); delete data; lm_message_handler_unref (handler); return result; }
false
false
false
false
false
0
cmdLoop(void) { HE_CMD *cmd; for (cmd = getCmd(); cmd; cmd = getCmd()) { if (cmd->func) he_status = (*cmd->func) (cmd); else { fprintf(stderr, "Unknown command: %s.\n", cmd->argv[0]); he_status = HE_FAIL; } ...
false
false
false
false
false
0
Hash(char *Input_Key, unsigned int Table_Size ) { unsigned int i; unsigned int Size; unsigned int Longwords; unsigned int *I_Pointer; unsigned int Hash_Value=0; char Hash_Buffer[1024]; Size = strlen( Input_Key ); if ( Size > sizeof Hash_Buffer ) { syslog(LOG_ERR, "Hash(): Maximum of %d for '%s' ...
false
false
false
false
false
0
vhttplog(fmt, args) CONST char *fmt; va_list args; { XFILE *fp; if (!logheader || !htmllogfile) /*EMPTY*/; else if (!httplogfile || strpathcmp(httplogfile, htmllogfile)) htmllog(logheader); if (!httplogfile || !isrootdir(httplogfile)) return; if (!(fp = Xfopen(httplogfile, "a"))) return; if (logheader) { Xfp...
false
false
false
false
false
0
get_fields_table() const { if(!m_portal) return Glib::ustring(); return m_portal->get_table_used(m_table_name); }
false
false
false
false
false
0