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
MinItem(struct icon_info *head) { struct icon_info *tmp, *i_min; if (head == NULL) return NULL; i_min = head; tmp = head->next; while (tmp != NULL){ if (strcmp(i_min->name, tmp->name) > 0) i_min = tmp; tmp = tmp->next; } return i_min; }
false
false
false
false
false
0
esl_sq_FetchFromMSA(const ESL_MSA *msa, int which, ESL_SQ **ret_sq) { ESL_SQ *sq = NULL; char *acc = NULL; char *desc = NULL; char *ss = NULL; char *gapchars = "-_.~"; /* hardcoded for now; only affects text mode, not digital */ int status; if (which >= msa->nseq || which...
false
false
false
false
false
0
same_page(struct http_sig* sig1, struct http_sig* sig2) { u32 i, bucket_fail = 0; s32 total_diff = 0; u32 total_scale = 0; /* Different response codes: different page */ if (sig1->code != sig2->code) return 0; /* One has text and the other hasnt: different page */ if (sig1->has_text != sig2->has_te...
false
false
false
false
false
0
prune_packed_objects(int opts) { int i; static char pathname[PATH_MAX]; const char *dir = get_object_directory(); int len = strlen(dir); if (len > PATH_MAX - 42) die("impossible object directory"); memcpy(pathname, dir, len); if (len && pathname[len-1] != '/') pathname[len++] = '/'; for (i = 0; i < 256; i+...
false
false
false
false
false
0
opal_progress_set_event_poll_rate(int polltime) { OPAL_OUTPUT((debug_output, "progress: progress_set_event_poll_rate(%d)", polltime)); #if OPAL_PROGRESS_USE_TIMERS event_progress_delta = 0; # if OPAL_TIMER_USEC_NATIVE event_progress_last_time = opal_timer_base_get_usec(); # else event_progress_last_t...
false
false
false
false
false
0
encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI) const { uint64_t Bits = getBinaryCodeForInstr(MI, Fixups, STI); unsigned Size = MCII.get(MI.getOpcode()).getSize(); // Big-endian insertion of Size bytes. unsign...
false
false
false
false
false
0
update_expected_bandwidth(void) { uint64_t expected; const or_options_t *options= get_options(); uint64_t max_configured = (options->RelayBandwidthRate > 0 ? options->RelayBandwidthRate : options->BandwidthRate) * 60; #define MIN_TIME_FOR_MEASUREMENT (180...
false
false
false
false
false
0
bgav_h264_sps_dump(bgav_h264_sps_t * sps) { int i; bgav_dprintf("SPS:\n"); bgav_dprintf(" profile_idc: %d\n", sps->profile_idc); bgav_dprintf(" constraint_set0_flag: %d\n", sps->constraint_set0_flag); bgav_dprintf(" constraint_set1_flag: %...
false
false
false
false
false
0
azx_interrupt(int irq, void *dev_id) { struct azx *chip = dev_id; struct hdac_bus *bus = azx_bus(chip); u32 status; #ifdef CONFIG_PM if (azx_has_pm_runtime(chip)) if (!pm_runtime_active(chip->card->dev)) return IRQ_NONE; #endif spin_lock(&bus->reg_lock); if (chip->disabled) { spin_unlock(&bus->reg_lock)...
false
false
false
false
false
0
sht15_remove(struct platform_device *pdev) { struct sht15_data *data = platform_get_drvdata(pdev); /* * Make sure any reads from the device are done and * prevent new ones beginning */ mutex_lock(&data->read_lock); if (sht15_soft_reset(data)) { mutex_unlock(&data->read_lock); return -EFAULT; } hwmon_de...
false
false
false
false
false
0
asyncConnect(void) { if (myState == STATE_CONNECTED) { ArLog::log(ArLog::Terse, "%s: already connected to laser.", getName()); return false; } if (!finishParams()) return false; if (!myUseSim && myConn == NULL) { ArLog::log(ArLog::Terse, "%s: Invalid device connection, can...
false
false
false
false
false
0
write_var_list_for_nt_elem_dec( fsbe_context *cx, Module_table *module, Nt_elem *nt_elem ) { int max_var = get_max_var_entry(module->var_head); int max_arr = get_max_array_entry(module->array_head); IntSet scalar_list, array_list; construct_IntSet(scalar_list, max_var+1); construct_IntSet(a...
false
false
false
false
false
0
xdll_close (int allflag) /*! Return Value: 0 (FUNCOK) if close OK, -1 (FUNCBAD) if error. Parameters: Type Name IO Description ------------ ----------- -- ----------- */ #ifdef DOC int allflag ;/* I allflag true, close all lists */ /* false, close l...
false
false
false
false
false
0
startElementBoundedBy(const char *pszName, int nLenName, void* attr ) { if ( m_nDepth == 2 && strcmp(pszName, "Envelope") == 0 ) { char* pszGlobalSRSName = GetAttributeValue(attr, "srsName"); m_poReader->SetGlobalSRSName(pszGlobalSRSName); CPLFree(pszGlobalSRSName); } return OGR...
false
false
false
false
false
0
gf_sg_script_event_in(GF_Node *node, GF_FieldInfo *in_field) { GF_ScriptPriv *priv = (GF_ScriptPriv *)node->sgprivate->UserPrivate; if (priv->JS_EventIn) priv->JS_EventIn(node, in_field); }
false
false
false
false
false
0
compute_number_of_lines (const gchar *text) { const gchar *p; gint len; gint nb_of_lines = 1; if (text == NULL) { return 0; } len = strlen (text); p = text; while (len > 0) { gint delimiter; gint next_paragraph; pango_find_paragraph_boundary (p, len, &delimiter, &next_paragraph); if (delimiter ...
false
false
false
false
false
0
run_ddg_http_request(const char* query, ResponseData * data) { const int MAX_URL_LEN = 2048 * sizeof(char); CURL *curl; CURLcode res; int returnCode; char *escaped_query; char url[MAX_URL_LEN]; memset(url, 0, MAX_URL_LEN); curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init();...
false
false
false
false
false
0
ui_arena_draw(UIArena *arena) { gint i, j; if(!arena->priv->map) return; for (j = 0; j < arena->priv->map_size->num_rows; j++) { for (i = 0; i < arena->priv->map_size->num_cols; i++) { switch(MAP_GET_OBJECT(arena->priv->map, i, j)) { case '\0': put_tile(arena, arena->priv->wall, i * TILE_SIZE, ...
false
false
false
false
false
0
module_do_insmod_dep(const struct kmod_list *deps, unsigned int flags, struct probe_insert_cb *cb, struct kmod_list *rec, unsigned int reccount) { const struct kmod_list *d; int err = 0; if (module_dep_has_loop(deps, rec, reccount)) return -ELOOP; kmod_list_foreach(d, deps) { struct kmod_module *dm = ...
false
true
false
false
false
1
gw_categories_edit_box_update_click ( GtkWidget *bt, GtkWindow *w) { GWDBCategory *category = NULL; gint result = -1; #ifdef GW_DEBUG_GUI_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); #endif if ( w != NULL ) { if ( (category = gw_categories_edit_box_get_category ( ...
false
false
false
false
false
0
settings_window_help(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { START_FUNC #ifdef ENABLE_HELP GError *error=NULL; if (event->keyval==GDK_KEY_F1) { gtk_show_uri(NULL, "ghelp:florence?config", gtk_get_current_event_time(), &error); if (error) flo_error(_("Unable to open %s: %s"), "ghelp:florence?...
false
false
false
false
false
0
qib_6120_hdrqempty(struct qib_ctxtdata *rcd) { u32 head, tail; head = qib_read_ureg32(rcd->dd, ur_rcvhdrhead, rcd->ctxt); if (rcd->rcvhdrtail_kvaddr) tail = qib_get_rcvhdrtail(rcd); else tail = qib_read_ureg32(rcd->dd, ur_rcvhdrtail, rcd->ctxt); return head == tail; }
false
false
false
false
false
0
table_attach (GtkWidget * table, GtkWidget * child, gint pos, gint row) { gtk_grid_attach (GTK_GRID (table), child, pos, row, 1, 1); if (pos) gtk_widget_set_hexpand (child, TRUE); }
false
false
false
false
false
0
wrap_new(GObject* object) { return new Atk::NoOpObject((AtkNoOpObject*) object); }
false
false
false
false
false
0
quick_open_dialog_tree_sort_func(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer user_data) { gboolean is_separator; gboolean is_document1, is_document2; char* title1, *title2; gboolean res; gtk_tree_model_get(model, a, COLUMN_IS_SEPARATOR, &is_separat...
false
false
false
false
false
0
save_BindSampler(GLuint unit, GLuint sampler) { Node *n; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); n = alloc_instruction(ctx, OPCODE_BIND_SAMPLER, 2); if (n) { n[1].ui = unit; n[2].ui = sampler; } if (ctx->ExecuteFlag) { CALL_BindSampler(ctx->Exec, (u...
false
false
false
false
false
0
tree_parse_buffer(git_tree *tree, const char *buffer, const char *buffer_end) { if (git_vector_init(&tree->entries, DEFAULT_TREE_SIZE, entry_sort_cmp) < 0) return -1; while (buffer < buffer_end) { git_tree_entry *entry; int attr; if (git__strtol32(&attr, buffer, &buffer, 8) < 0 || !buffer || !valid_filem...
false
false
false
false
false
0
cbf_get_gain (cbf_handle handle, unsigned int element_number, double *gain, double *gain_esd) { const char *array_id; cbf_failnez (cbf_get_array_id (handle, element_number, &array_id)); /* Get the gain */ cbf_failnez (cbf_find_category (handle, "array_intensities")) ...
false
false
false
false
false
0
prepare_packet(struct cros_ec_device *ec_dev, struct cros_ec_command *msg) { struct ec_host_request *request; u8 *out; int i; u8 csum = 0; BUG_ON(ec_dev->proto_version != EC_HOST_REQUEST_VERSION); BUG_ON(msg->outsize + sizeof(*request) > ec_dev->dout_size); out = ec_dev->dout; request = (struct ec_host_r...
false
false
false
false
false
0
nautilus_file_is_mime_type (NautilusFile *file, const char *mime_type) { g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE); g_return_val_if_fail (mime_type != NULL, FALSE); if (file->details->mime_type == NULL) { return FALSE; } return g_content_type_is_a (eel_ref_str_peek (file->details->mime_type), ...
false
false
false
false
false
0
OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame) { u16 reason; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u8 *pframe = precv_frame->rx_data; struct wlan_bssid_...
false
false
false
false
false
0
method_D5(const int *account, int *weight) { if ( account[2] == 9 && account[3] == 9 ) { // variant 1: like method_06, but with different weight number2Array("0087654320", weight); return algo01(11, weight, false, 10, account); } else { number2Array("0007654320", weight); // variant 2: like method_06, but ...
false
false
false
false
false
0
view_window_get_fd_list(ViewWindow *vw) { GList *list = NULL; ImageWindow *imd = view_window_active_image(vw); if (imd) { FileData *fd = image_get_fd(imd); if (fd) list = g_list_append(NULL, file_data_ref(fd)); } return list; }
false
false
false
false
false
0
GetScratchPad(SQInteger size) { SQInteger newsize; if(size>0) { if(_scratchpadsize < size) { newsize = size + (size>>1); _scratchpad = (SQChar *)SQ_REALLOC(_scratchpad,_scratchpadsize,newsize); _scratchpadsize = newsize; }else if(_scratchpadsize >= (size<<5)) { newsize = _scratchpadsize >> 1; _scr...
false
false
false
false
false
0
pageset_set_high(struct per_cpu_pageset *p, unsigned long high) { unsigned long batch = max(1UL, high / 4); if ((high / 4) > (PAGE_SHIFT * 8)) batch = PAGE_SHIFT * 8; pageset_update(&p->pcp, high, batch); }
false
false
false
false
false
0
ves_icall_System_Net_Sockets_Socket_LocalEndPoint_internal (SOCKET sock, gint32 af, gint32 *error) { gchar *sa; socklen_t salen; int ret; MonoObject *result; *error = 0; salen = get_sockaddr_size (convert_family ((MonoAddressFamily)af)); if (salen == 0) { *error = WSAEAFNOSUPPORT; return NULL; } sa = (...
false
false
false
false
false
0
Find(char charToFind, uint32_t startPos) { // Check if char to find is null, in that case, return -1 straight away if(charToFind == '\0') return -1; // Create temporary C-style string for charToFind, // because strstr() requires the string to find to be null-terminated char stringToFind[2] = {0};...
false
false
false
false
false
0
evd_connection_setup_streams (EvdConnection *self) { EvdStreamThrottle *input_throttle; EvdStreamThrottle *output_throttle; /* socket input stream */ self->priv->socket_input_stream = evd_socket_input_stream_new (self->priv->socket); g_signal_connect (self->priv->socket_input_stream, ...
false
false
false
false
false
0
paintEvent(QPaintEvent *) { hOutDebug(5,"Gauge paint" << std::endl); QPainter painter(this); painter.setPen(mPenColor); painter.drawArc(0,10,120,120,30*16,120*16); painter.translate(60,70); painter.rotate(30.0); for (int angle=30; angle<=150; angle+=10) { painter.drawLine(-65,0,-60,0); painter.rotate(10.0...
false
false
false
false
false
0
img_i2c_complete_transaction(struct img_i2c *i2c, int status) { img_i2c_switch_mode(i2c, MODE_INACTIVE); if (status) { i2c->msg_status = status; img_i2c_transaction_halt(i2c, false); } complete(&i2c->msg_complete); }
false
false
false
false
false
0
flowToSeq(int *pnSeqLength, double *adFlows, int nLength) { char *szSeq = (char *) malloc(MAX_SEQUENCE_LENGTH*sizeof(char)); int i = 0; int nCount = 0; if(!szSeq) goto memoryError; for(i = nOffSet; i < nLength; i++){ char cBase = szFlows[i % 4]; int s = 0, nS = (int) floor(adFlows[i] + 0....
false
false
false
false
false
0
valueize_shared_reference_ops_from_call (gimple call) { if (!call) return NULL; VEC_truncate (vn_reference_op_s, shared_lookup_references, 0); copy_reference_ops_from_call (call, &shared_lookup_references); shared_lookup_references = valueize_refs (shared_lookup_references); return shared_lookup_reference...
false
false
false
false
false
0
test_string() { eastl::string str; str += "testing "; str += "simple "; str += "string "; str += "concat"; EASTL_ASSERT(str == "testing simple string concat"); str.sprintf("%d", 20); EASTL_ASSERT(str == "20"); }
false
false
false
false
false
0
find_used_clusters(const struct exfat* ef, cluster_t* a, cluster_t* b) { const cluster_t end = le32_to_cpu(ef->sb->cluster_count); /* find first used cluster */ for (*a = *b + 1; *a < end; (*a)++) if (BMAP_GET(ef->cmap.chunk, *a - EXFAT_FIRST_DATA_CLUSTER)) break; if (*a >= end) return 1; /* find last c...
false
false
false
false
false
0
word_monitor_set(int index, unsigned int value) { WordMonitor* monitor = WordMonitor::Instance(); if(monitor) monitor->Set(index, value); }
false
false
false
false
false
0
soap_in__wsse__UsernameToken(struct soap *soap, const char *tag, struct _wsse__UsernameToken *a, const char *type) { size_t soap_flag_Username = 1; size_t soap_flag_Password = 1; size_t soap_flag_Nonce = 1; size_t soap_flag_wsu__Created = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; a = (struc...
false
false
false
false
false
0
check_integer(HSCPRC * hp, HSCATTR * dest, STRPTR value) { BOOL ok = FALSE; int i = 0; if ((value[0] == '+') || (value[0] == '-')) i = 1; if (strlen(value) - i) { ok = TRUE; while (value[i] && ok) { if (!isdigit(value[i])) ok = FALSE; else i++; ...
false
false
false
false
false
0
Indent_REXX(EBuffer *B, int Line, int PosCursor) { int I; hsState *StateMap = NULL; int StateLen = 0; int OI; OI = I = B->LineIndented(Line); if (I != 0) B->IndentLine(Line, 0); if (B->GetMap(Line, &StateLen, &StateMap) == 0) return 0; if (StateLen > 0) { // line is not...
false
false
false
false
false
0
init_next_round( ServerGame *game ) { game->cur_round++; game->cur_level = game->cur_round / game->rounds_per_level; game_init( game->game, game->set->levels[game->cur_level] ); /* send level and wait for ready */ game->state = SERVER_AWAIT_READY; game->ready[0] = game->ready[1] = 0; send_level( game->set->lev...
false
false
false
false
false
0
airFPPartsToVal_f(unsigned int sign, unsigned int expo, unsigned int mant) { _airFloatEndianLittle flit; _airFloatEndianBig fbig; FP_SET_F(flit, fbig, sign, expo, mant); return (airEndianLittle == airMyEndian() ? flit.v : fbig.v); }
false
false
false
false
false
0
is_interactive(void) { CYG_REPORT_FUNCNAMETYPE("Cdl::is_interactive", "interactive %d"); CYG_REPORT_RETVAL(interactive); return interactive; }
false
false
false
false
false
0
close_disk_cache(int fd) { struct key_disk_cache *tmp, *tmp_next; if (key_disk_cache_head == NULL) return 0; MUTEX_LOCK(disk_cache_lock); tmp = key_disk_cache_head; do { tmp_next = tmp->next; free(tmp); tmp = tmp_next; } while (tmp); MUTEX_UNLOCK(disk_cache_lock); return 0; }
false
false
false
false
false
0
aesc_encrypt(const uint8_t plain_text[], uint8_t cipher_text[], const uint8_t key_sched[]) { uint8_t state[16]; unsigned int i; aes_first_addroundkey(state, plain_text, key_sched); for (i = 1; i < 10; ++i) { aes_subbyte_shiftrows_mixcols(state); aes_addroundkey(state, key_sched + i * 16); } aes_subbyt...
false
false
false
false
false
0
xgbe_tx_timer(unsigned long data) { struct xgbe_channel *channel = (struct xgbe_channel *)data; struct xgbe_prv_data *pdata = channel->pdata; struct napi_struct *napi; DBGPR("-->xgbe_tx_timer\n"); napi = (pdata->per_channel_irq) ? &channel->napi : &pdata->napi; if (napi_schedule_prep(napi)) { /* Disable Tx a...
false
false
false
false
false
0
Init() { static ClassDocumentation<BaryonWidthGenerator> documentation ("The BaryonWidthGenerator class is designed for the calculation of the" " running width for baryons."); static RefVector<BaryonWidthGenerator,Baryon1MesonDecayerBase> interfaceBaryonDecayers ("BaryonDecayers", "Pointers to t...
false
false
false
false
false
0
mono_test_marshal_delegate (SimpleDelegate delegate) { void *sp1, *sp2; /* Check that the delegate wrapper is stdcall */ delegate (2); sp1 = get_sp (); delegate (2); sp2 = get_sp (); if (is_get_sp_reliable()) g_assert (sp1 == sp2); return delegate (2); }
false
false
false
false
false
0
start_unit (void *arg) { pthread_t t; int k; BYTE_T stack_offset; NODE_T *p; (void) arg; LOCK_THREAD; t = pthread_self (); GET_THREAD_INDEX (k, t); THREAD_STACK_OFFSET (&context[k]) = (BYTE_T *) (&stack_offset - stack_direction (&stack_offset) * STACK_USED (&context[k])); restore_stacks (t); p = (...
false
false
false
false
false
0
bench_signer(private_crypto_tester_t *this, integrity_algorithm_t alg, signer_constructor_t create) { signer_t *signer; signer = create(alg); if (signer) { char key[signer->get_key_size(signer)]; char mac[signer->get_block_size(signer)]; chunk_t buf; struct timespec start; u_int runs; memset(key, 0x1...
true
true
false
false
false
1
gst_audio_sink_ring_buffer_stop (GstAudioRingBuffer * buf) { GstAudioSink *sink; GstAudioSinkClass *csink; sink = GST_AUDIO_SINK (GST_OBJECT_PARENT (buf)); csink = GST_AUDIO_SINK_GET_CLASS (sink); /* unblock any pending writes to the audio device */ if (csink->reset) { GST_DEBUG_OBJECT (sink, "reset.....
false
false
false
false
false
0
select(unsigned long timeout) { // static buffer speeds things up const int maxBufsize = 4096; int bufsize=maxBufsize; static char buf[maxBufsize]; SPtr<TIPv6Addr> peer (new TIPv6Addr()); int sockid; int msgtype; // read data sockid = TIfaceMgr::select(timeout,buf,bufsize,peer...
false
false
false
false
false
0
ConvertPathtype(xe,ye,xb,yb,width,togds) int *xe,*ye; /* coordinate of endpoint */ int xb,yb; /* coordinate of previous or next point in path */ int width; /* path width */ int togds; { double angle; double deltaX,deltaY; if (width == 0) return; if (width < 0) width = -width; wi...
false
false
false
false
false
0
manual_ipv6_set(struct connman_network *network, struct connman_ipconfig *ipconfig_ipv6) { struct connman_service *service; int err; DBG("network %p ipv6 %p", network, ipconfig_ipv6); service = connman_service_lookup_from_network(network); if (service == NULL) return -EINVAL; if (__connman_ipconfig_get_l...
false
false
false
false
false
0
gnc_formula_cell_direct_update( BasicCell *bcell, int *cursor_position, int *start_selection, int *end_selection, void *gui_data ) { FormulaCell *cell = (FormulaCell *)bcell; GdkEventK...
false
false
false
false
false
0
event_cb (GIOChannel *source, GIOCondition condition, RfkillGlib *rfkill) { GList *events; events = NULL; if (condition & G_IO_IN) { GIOStatus status; struct rfkill_event event; gsize read; status = g_io_channel_read_chars (source, (char *) &event, sizeof(event), &read, ...
false
false
false
false
false
0
on_button_pressed_repeat (InputPadGtkButton *button, gpointer data) { guint keysym; g_return_if_fail (INPUT_PAD_IS_GTK_BUTTON (button)); keysym = input_pad_gtk_button_get_keysym (button); if ((keysym == XK_Control_L) || (keysym == XK_Control_R) || (keysym == XK_Alt_L) || (keysym == XK_Alt_L) |...
false
false
false
false
false
0
XML(const char *indent) const { if (IsDefault()) return ""; char *value = g_markup_escape_text(StringValue(), -1); std::string str = (std::string)indent + "<" + Name() + ">" + value + "</" + Name() + ">\n"; g_free(value); return str; }
false
false
false
false
false
0
detectConflict(Instruction *cst, int s) { Value *v = cst->getSrc(s); // current register allocation can't handle it if a value participates in // multiple constraints for (Value::UseIterator it = v->uses.begin(); it != v->uses.end(); ++it) { if (cst != (*it)->getInsn()) return true; } ...
false
false
false
false
false
0
edsf_persona_store_instance_init (EdsfPersonaStore * self) { gchar** _tmp0_ = NULL; GeeLinkedList* _tmp1_ = NULL; self->priv = EDSF_PERSONA_STORE_GET_PRIVATE (self); g_static_rec_mutex_init (&self->priv->__lock__personas); self->priv->_is_prepared = FALSE; self->priv->_prepare_pending = FALSE; self->priv->_is_qu...
false
false
false
false
false
0
drm_lspcon_get_mode(struct i2c_adapter *adapter, enum drm_lspcon_mode *mode) { u8 data; int ret = 0; if (!mode) { DRM_ERROR("NULL input\n"); return -EINVAL; } /* Read Status: i2c over aux */ ret = drm_dp_dual_mode_read(adapter, DP_DUAL_MODE_LSPCON_CURRENT_MODE, &data, sizeof(data)); if (ret < 0)...
false
false
false
false
false
0
make_mortal_sv(const unsigned char *src, int type) { STRLEN len; char result[33]; char *ret; switch (type) { case F_BIN: ret = (char*)src; len = 16; break; case F_HEX: ret = hex_16(src, result); len = 32; break; case F_B64: ret = base64_16(src, result); len = 22; break; def...
false
false
false
false
false
0
CombineCmd(int i) const { return i>=count()-1 ? Combine(i) : CombineQuoted(i); }
false
false
false
false
false
0
transfer_variables_to_widgets() { for(type_mapWidgetsToVariables::iterator iter = m_mapWidgetsToVariables.begin(); iter != m_mapWidgetsToVariables.end(); ++iter) { transfer_one_widget(iter->first, false); //false = to_widget. } }
false
false
false
false
false
0
cm_prefs_populate_unique_id(void) { static int populate = -1; if (populate == -1) { const char *val; val = cm_prefs_config("selfsign", "populate_unique_id"); if (val == NULL) { val = CM_DEFAULT_POPULATE_UNIQUE_ID; } if (val != NULL) { populate = cm_prefs_yesno(val); } } return populate != -1 ? pop...
false
false
false
false
false
0
stopStream() { verifyStream(); if (stream_.state == STREAM_STOPPED) return; // Change the state before the lock to improve shutdown response // when using a callback. stream_.state = STREAM_STOPPED; MUTEX_LOCK(&stream_.mutex); int err; int *handle = (int *) stream_.apiHandle; if (stream_.mode == OUT...
false
false
false
false
false
0
rfbInitSockets(rfbScreenInfoPtr rfbScreen) { in_addr_t iface = rfbScreen->listenInterface; if (rfbScreen->socketState!=RFB_SOCKET_INIT) return; rfbScreen->socketState = RFB_SOCKET_READY; if (rfbScreen->inetdSock != -1) { const int one = 1; if(!rfbSetNonBlocking(rfbScreen->inetdSock)) ...
false
false
false
false
false
0
pdc_pata_cable_detect(struct ata_port *ap) { u8 tmp; void __iomem *ata_mmio = ap->ioaddr.cmd_addr; tmp = readb(ata_mmio + PDC_CTLSTAT + 3); if (tmp & 0x01) return ATA_CBL_PATA40; return ATA_CBL_PATA80; }
false
false
false
false
false
0
lazy_cleanup_index(Relation indrel, IndexBulkDeleteResult *stats, LVRelStats *vacrelstats) { IndexVacuumInfo ivinfo; PGRUsage ru0; pg_rusage_init(&ru0); ivinfo.index = indrel; ivinfo.vacuum_full = false; ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->rel_tuples; stats = in...
false
false
false
false
false
0
step() { if (_data.done()) { gtk_label_set_text(GTK_LABEL(_messageText), _("-- done --")); setBusy(false); return false; } gtk_label_set_text(GTK_LABEL(_messageText), _data.current().fullPath().c_str()); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(_progress), _data.progress()); _data.step(); ...
false
false
false
false
false
0
Compare_files(const void *e1, const void *e2) { if ((*(file_list**) e1)->time > (*(file_list**) e2)->time) return 1; else if ((*(file_list**) e1)->time < (*(file_list**) e2)->time) return(UNKNOWN); return 0; }
false
false
false
false
false
0
igb_maybe_stop_tx(struct igb_ring *tx_ring, const u16 size) { if (igb_desc_unused(tx_ring) >= size) return 0; return __igb_maybe_stop_tx(tx_ring, size); }
false
false
false
false
false
0
amdgpu_fence_driver_fini(struct amdgpu_device *adev) { int i, r; if (atomic_dec_and_test(&amdgpu_fence_slab_ref)) kmem_cache_destroy(amdgpu_fence_slab); mutex_lock(&adev->ring_lock); for (i = 0; i < AMDGPU_MAX_RINGS; i++) { struct amdgpu_ring *ring = adev->rings[i]; if (!ring || !ring->fence_drv.initialized...
false
false
false
false
false
0
string_compare (char *string1, char *string2) { int count = 0; int compare = 0; if (!string1) { if (!string2) return 0; else return 1; } else if (!string2) return -1; while (string1[count] && string2[count]) { if (isdigit (string1[count]) && isdigit (string2[count])) com...
false
false
false
false
false
0
L41__WINDOW_SET_LINE_ATTR__dwtrans() {register object *base=vs_base; register object *sup=base+VM41; VC41 vs_check; {object V105; object V106; object V107; object V108; object V109; V105=(base[0]); V106=(base[1]); vs_base=vs_base+2; if(vs_base>=vs_top){vs_top=sup;goto T500;} V107=(base[2]); vs_base++; if(...
false
false
false
false
false
0
addblanks () { register int i; unsigned char uc; for (i = 0; i < SYNSIZE; i++) { uc = i; /* Since we don't call setlocale(), this defaults to the "C" locale, and the default blank characters will be space and tab. */ if (isblank (uc)) lsyntax[uc] |= CBLANK; } }
false
false
false
false
false
0
items_inserted (EReflowModel *model, gint position, gint count, EReflow *reflow) { gint i, oldcount; if (position < 0 || position > reflow->count) return; oldcount = reflow->count; reflow->count += count; if (reflow->count > reflow->allocated_count) { while (...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditBox_Record(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gui__controls__UndoAction * action) { struct __ecereNameSpace__ecere__gui__controls__EditBox * __ecerePointer___ecereNameSpace__ecere__gui__controls__EditBox = (stru...
false
false
false
false
false
0
drawRow(int row_,int col_,const char *str_,int len_, int index_,MSBoolean bold_,BlinkPhase phase_,MSBoolean underline_) { if (str_!=0) { int y=computeYCoord(row_); int x=computeXCoord(row_,col_>=0?col_:0); int tw=len_*charWidth(); int lastRowAdjustment=(matrix().rows()-1==r...
false
false
false
false
false
0
sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data) { SizerData *sd = data; GdkRectangle clip; GtkOrientation orientation; GtkStateType state; gdk_region_get_clipbox(event->region, &clip); if (sd->position & SIZER_POS_LEFT || sd->position & SIZER_POS_RIGHT) { orientation = GTK_ORIENTATI...
false
false
false
false
false
0
rb_spawn_glusterfs_client (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo) { glusterd_conf_t *priv = NULL; char cmd_str[8192] = {0,}; runner_t runner = {0,}; struct stat buf; int ...
true
true
false
false
false
1
handle_branch2(struct ieee80211_hw *hw, u16 arraylen, u32 *array_table) { struct rtl_priv *rtlpriv = rtl_priv(hw); u32 v1; u32 v2; int i; for (i = 0; i < arraylen; i = i + 2) { v1 = array_table[i]; v2 = array_table[i+1]; if (v1 < 0xCDCDCDCD) { rtl_set_bbreg(hw, array_table[i], MASKDWORD, ...
false
false
false
false
false
0
bestDestinationPileUnderCards() { QSet<KCardPile*> targets; foreach ( QGraphicsItem * item, q->collidingItems( cardsBeingDragged.first(), Qt::IntersectsItemBoundingRect ) ) { KCardPile * p = qgraphicsitem_cast<KCardPile*>( item ); if ( !p ) { KCard * c = qgraphicsitem_cas...
false
false
false
false
false
0
anjuta_window_set_geometry (AnjutaWindow *win, const gchar *geometry) { gint width, height, posx, posy; gboolean geometry_set = FALSE; if (geometry && strlen (geometry) > 0) { DEBUG_PRINT ("Setting geometry: %s", geometry); if (sscanf (geometry, "%dx%d+%d+%d", &width, &height, &posx, &posy) == 4) { ...
false
false
false
false
false
0
init_mteTriggerExistenceTable(void) { static oid mteTExistTable_oid[] = { 1, 3, 6, 1, 2, 1, 88, 1, 2, 4 }; size_t mteTExistTable_oid_len = OID_LENGTH(mteTExistTable_oid); netsnmp_handler_registration *reg; /* * Ensure the (combined) table container is available... */ init_trigger...
false
false
false
false
false
0
lt_symbol_add(struct lt_trace *lt, const char *name, unsigned int rows, int msb, int lsb, int flags) { struct lt_symbol *s; int len; int flagcnt; if((!lt)||(lt->sorted_facs)) return(NULL); flagcnt = ((flags&LT_SYM_F_INTEGER)!=0) + ((flags&LT_SYM_F_DOUBLE)!=0) + ((flags&LT_SYM_F_STRING)!=0); if((flagcnt>1)||(!lt)||(!...
false
false
false
false
false
0
PerlIOStdio_fill(pTHX_ PerlIO *f) { FILE * stdio; int c; PERL_UNUSED_CONTEXT; if (PerlIO_lockcnt(f)) /* in use: abort ungracefully */ return -1; stdio = PerlIOSelf(f, PerlIOStdio)->stdio; /* * fflush()ing read-only streams can cause trouble on some stdio-s */ if ((PerlIOBase(f)->...
false
false
false
false
false
0
cp_unparse_milliseconds(uint32_t ms) { if (ms && ms < 1000) return String(ms) + "ms"; else return cp_unparse_real10(ms, 3) + "s"; }
false
false
false
false
false
0
Int32_To_Float32( void *destinationBuffer, signed int destinationStride, void *sourceBuffer, signed int sourceStride, unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator ) { PaInt32 *src = (PaInt32*)sourceBuffer; float *dest = (float*)destinationBuffer; (void)ditherGener...
false
false
false
false
false
0
processOptions(SPtr<TSrvMsg> clientMsg, bool quiet) { SPtr<TOpt> opt; SPtr<TIPv6Addr> clntAddr = PeerAddr; // --- process this message --- clientMsg->firstOption(); while ( opt = clientMsg->getOption()) { switch (opt->getOptType()) { case OPTION_IA_NA : { processI...
false
false
false
false
false
0
dec_register_pressure (enum reg_class cover_class, int nregs) { int i; unsigned int j; enum reg_class cl; bool set_p = false; for (i = 0; (cl = ira_reg_class_super_classes[cover_class][i]) != LIM_REG_CLASSES; i++) { curr_reg_pressure[cl] -= nregs; ira_assert (curr_reg_pressure[c...
false
false
false
false
false
0
RotBond_count(OBMol & mol) { unsigned int count=0; for (OBBondIterator it=mol.BeginBonds(); it!=mol.EndBonds(); it++) { if (IsRotBond_PDBQT((*it))) {count++;} } return count; }
false
false
false
false
false
0