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
test_ensure_async_plain (Test *test, gconstpointer unused) { GAsyncResult *result = NULL; GError *error = NULL; gboolean ret; secret_service_ensure_session (test->service, NULL, on_complete_get_result, &result); egg_test_wait (); g_assert (G_IS_ASYNC_RESULT (result)); ret = secret_serv...
false
false
false
false
false
0
computeAutoMode() { QString suffix = QFileInfo(fileName).suffix(); QString firstLine = e->document()->begin().text(); QRegExp re("-\\*-\\s(\\S+)\\s+-\\*-"); bool ok = false; if (! ok && re.indexIn(firstLine) >= 0) ok = e->setEditorMode(re.cap(1)); if (! ok && ! suffix.isEmpty()) ok = e->setEditorMod...
false
false
false
false
false
0
_set_inpoint (GESTimelineElement * element, GstClockTime inpoint) { GList *tmp; GESContainer *container = GES_CONTAINER (element); for (tmp = container->children; tmp; tmp = g_list_next (tmp)) { GESTimelineElement *child = (GESTimelineElement *) tmp->data; ChildMapping *map = g_hash_table_lookup (contain...
false
false
false
false
false
0
decoder_query_position_fold (const GValue * item, GValue * ret, QueryFold * fold) { GstPad *pad = g_value_get_object (item); if (gst_pad_query (pad, fold->query)) { gint64 position; g_value_set_boolean (ret, TRUE); gst_query_parse_position (fold->query, NULL, &position); GST_DEBUG_OBJECT (it...
false
false
false
false
false
0
filesystem_is_query_match(sefs_filesystem * fs, const sefs_query * query, const char *path, const char *dev, const struct stat64 * sb, apol_vector_t * type_list, apol_mls_range_t * range)throw(std::runtime_error) { return fs->isQueryMatch(query, path, dev, sb, type_list, range); }
false
false
false
false
false
0
pkix_pl_Cert_DecodeInhibitAnyPolicy( CERTCertificate *nssCert, PKIX_Int32 *pSkipCerts, void *plContext) { CERTCertificateInhibitAny inhibitAny; SECStatus rv; SECItem encodedCertInhibitAny; PKIX_Int32 skipCerts = -1; PKIX_ENTER(CERT, "pkix_pl_Cert_DecodeIn...
false
false
false
false
false
0
check_if_ca (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer, unsigned int flags) { gnutls_datum_t cert_signed_data = { NULL, 0 }; gnutls_datum_t issuer_signed_data = { NULL, 0 }; gnutls_datum_t cert_signature = { NULL, 0 }; gnutls_datum_t issuer_signature = { NULL, 0 }; int result; /* Check ...
false
false
false
false
false
0
bus_connection_get_loginfo (DBusConnection *connection) { BusConnectionData *d; d = BUS_CONNECTION_DATA (connection); if (!bus_connection_is_active (connection)) return "inactive"; return d->cached_loginfo_string; }
false
false
false
false
false
0
wb_ffr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno) { wb_local_t *local = NULL; wb_file_t *file = NULL; GF_ASSERT (frame); local = frame->local; file = local->file; if (file != NULL) { LOCK (&fi...
false
false
false
true
false
1
simBranching(long N, BranchingInfo den) { return den.actualCount>0 ? double(actualCount) / double(den.actualCount) : double(actualCount) / double(N) ; }
false
false
false
false
false
0
image_create( SDL_Surface *img, int buf_w, int buf_h, SDL_Surface *surf, int x, int y ) { Image *image; if ( img == 0 ) { fprintf( stderr, "image_create: passed graphic is NULL: %s\n", SDL_GetError() ); return 0; } image = calloc( 1, sizeof( Image ) ); image->img = img; if ( buf_...
false
false
false
false
false
0
OnDrawPolygon( wxCommandEvent &WXUNUSED(event) ) { dynamic_cast<GraphicsPage*>(ExGlobals::GetVisualizationWindow()->GetPage())->SetPolygonPlacementMode(); std::vector<wxString> lines; switch( polygonType_ ) { case 1: lines.push_back( wxString(wxT("Left click in the visualization window to choose a cor...
false
false
false
false
false
0
nickpad_string_create(channel_t *chan) { int i; chan->nickpad_len = (chan->longest_nick + 1) * fillchars_len; xfree (chan->nickpad_str); chan->nickpad_str = (char *)xmalloc(chan->nickpad_len); /* fill string */ for (i = 0; i < chan->nickpad_len; i++) chan->nickpad_str[i] = fillchars[ i % fillchars_len ]; deb...
false
false
false
false
false
0
ipmi_wdog_pretimeout_handler(void *handler_data) { if (preaction_val != WDOG_PRETIMEOUT_NONE) { if (preop_val == WDOG_PREOP_PANIC) { if (atomic_inc_and_test(&preop_panic_excl)) panic("Watchdog pre-timeout"); } else if (preop_val == WDOG_PREOP_GIVE_DATA) { spin_lock(&ipmi_read_lock); data_to_read = 1; ...
false
false
false
false
false
0
right_mult_with_vector(vtx_data * matrix, int n, double *vector, double *result) { int i, j; double res; for (i = 0; i < n; i++) { res = 0; for (j = 0; j < matrix[i].nedges; j++) res += matrix[i].ewgts[j] * vector[matrix[i].edges[j]]; result[i] = res; } /* orthog1(n,vector); */ }
false
false
false
false
false
0
VSNPrintF(Vector<char> str, const char* format, va_list args) { int n = vsnprintf(str.start(), str.length(), format, args); if (n < 0 || n >= str.length()) { // If the length is zero, the assignment fails. if (str.length() > 0) str[str.length() - 1] = '\0'; retu...
false
false
false
false
false
0
cdio_generic_free (void *p_user_data) { generic_img_private_t *p_env = p_user_data; track_t i_track; if (NULL == p_env) return; if (p_env->source_name) free (p_env->source_name); if (p_env->b_cdtext_init) { for (i_track=0; i_track < p_env->i_tracks; i_track++) { cdtext_destroy(&(p_env->cdtext_trac...
false
false
false
false
false
0
strpcmp(char const * str, char const * pfx, char const * delim) { if(str == NULL || pfx == NULL) return -1; while(*pfx == *str && *pfx != '\0') ++str, ++pfx; return (*pfx == '\0' && strchr(delim, *str) ? 0 : *str - *pfx); }
false
false
false
false
false
0
init_mparams(void) { #ifdef NEED_GLOBAL_LOCK_INIT if (malloc_global_mutex_status <= 0) init_malloc_global_mutex(); #endif ACQUIRE_MALLOC_GLOBAL_LOCK(); if (mparams.magic == 0) { size_t magic; size_t psize; size_t gsize; #ifndef WIN32 psize = malloc_getpagesize; gsize = ((DEFAULT_GRANULAR...
false
false
false
false
false
0
_rtl92d_phy_restore_rf_env(struct ieee80211_hw *hw, u8 rfpath, u32 *pu4_regval) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_phy *rtlphy = &(rtlpriv->phy); struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath]; RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "=====>\n"); /*----Restore RFENV control ty...
false
false
false
false
false
0
expand_epilogue () { int size; register int regno; int return_size; rtx scratch; if (reload_completed != 1) abort (); size = get_frame_size (); /* If we are returning a value in two registers, we have to preserve the X register and use the Y register to restore the stack and the saved reg...
true
true
false
false
true
1
get_mp_bits (void) { if (user_mp_bits >= DEFAULT_MP_BITS) { return user_mp_bits; } else { char *s = getenv("GRETL_MP_BITS"); int b; if (s != NULL) { b = atoi(s); if (mp_bits_ok(b)) { return b; } } return DEFAULT_MP_BITS; } }
false
false
false
false
true
1
getConfiguration(CmtDeviceConfiguration& configuration) { CMT3LOG("L3: getConfiguration\n"); CMT3EXITLOG; if (!(m_serial.isOpen() || m_logFile.isOpen())) return m_lastResult = XRV_INVALIDOPERATION; memcpy(&configuration,&m_config,sizeof(CmtDeviceConfiguration)); if (m_logging) { // fake the message receip...
false
false
false
false
false
0
e_source_viewer_set_selected_source (ESourceViewer *viewer, ESource *source) { GHashTable *source_index; GtkTreeRowReference *reference; GtkTreePath *path; gboolean success; g_return_val_if_fail (E_IS_SOURCE_VIEWER (viewer), FALSE); g_return_val_if_fail (E_IS_SOURCE (source),...
false
false
false
false
false
0
netflush (void) { register int n, n1; #ifdef ENCRYPTION if (encrypt_output) ring_encrypt (&netoring, encrypt_output); #endif /* ENCRYPTION */ if ((n1 = n = ring_full_consecutive (&netoring)) > 0) { if (!ring_at_mark (&netoring)) { n = send (net, (char *) netoring.consume, n, 0); /* normal write...
false
false
false
false
false
0
new_trule_node(Fsa fsa, int n) { Trule *t, *tnew; /* Allocate and initialize the node */ tnew = OOGLNewE(Trule, "Trule *"); if (tnew == NULL) return(NULL); tnew->c = '\1'; tnew->ns = REJECT; tnew->next = NULL; /* Install it in tlist of state n */ if (fsa->state[n]->tlist == NULL) { /* List is em...
false
false
false
false
false
0
vxml_handle_tag(vxml_parser_t *vp, const struct vxml_uctx *ctx) { uint32 uc; bool seen_space; bool need_space; bool empty, error; /* * Starting a new tag, cleanup context. */ vp->tags++; vxml_output_discard(&vp->out); xattr_table_free_null(&vp->attrs); /* * If we haven't seen the leading "<?xml ...?>"...
false
false
false
false
false
0
camel_toupper (gchar c) { if (c >= 'a' && c <= 'z') c &= ~0x20; return c; }
false
false
false
false
false
0
ide_cdrom_update_speed(ide_drive_t *drive, u8 *buf) { struct cdrom_info *cd = drive->driver_data; u16 curspeed, maxspeed; ide_debug_log(IDE_DBG_FUNC, "enter"); if (drive->atapi_flags & IDE_AFLAG_LE_SPEED_FIELDS) { curspeed = le16_to_cpup((__le16 *)&buf[8 + 14]); maxspeed = le16_to_cpup((__le16 *)&buf[8 + 8]);...
false
false
false
false
false
0
brasero_io_job_progress_report_stop (BraseroIO *self, BraseroIOJob *job) { BraseroIOPrivate *priv; GSList *iter; priv = BRASERO_IO_PRIVATE (self); g_mutex_lock (priv->lock); for (iter = priv->progress; iter; iter = iter->next) { BraseroIOJobProgress *progress; progress = iter->data; if (progress->...
false
false
false
false
false
0
send_result( Operation *op, SlapReply *rs, sort_op *so) { LDAPControl *ctrls[3]; int rc, i = 0; rc = pack_sss_response_control( op, rs, ctrls ); if ( rc == LDAP_SUCCESS ) { i++; rc = -1; if ( so->so_paged > SLAP_CONTROL_IGNORED ) { rc = pack_pagedresult_response_control( op, rs, so, ctrls+1 ); } ...
false
false
false
false
false
0
jas_image_encode(jas_image_t *image, jas_stream_t *out, int fmt, char *optstr) { jas_image_fmtinfo_t *fmtinfo; if (!(fmtinfo = jas_image_lookupfmtbyid(fmt))) { return -1; } return (fmtinfo->ops.encode) ? (*fmtinfo->ops.encode)(image, out, optstr) : (-1); }
false
false
false
false
false
0
DecMul10(MonoDecimal* value) { MonoDecimal d = *value; g_assert (value != NULL); DecShiftLeft(value); DecShiftLeft(value); DecAdd(value, &d); DecShiftLeft(value); }
false
false
false
false
false
0
tifftag_write_dword(fp, id, val) FILE *fp; int id; unsigned long val; { if (EOF == tiff_put_word(fp, id)) return EOF; if (EOF == tiff_put_word(fp, 4)) /* TIFF_LONG */ return EOF; if (EOF == tiff_put_dword(fp, 1)) /* length */ return EOF; return tiff_put_dword(fp, v...
false
false
false
false
false
0
is_header_regex(apr_pool_t *p, const char* name) { /* If a Header name contains characters other than: * -,_,[A-Z\, [a-z] and [0-9]. * assume the header name is a regular expression. */ if (ap_regexec(is_header_regex_regex, name, 0, NULL, 0)) { return 1; } return 0; }
false
false
false
false
false
0
skge_board_name(const struct skge_hw *hw) { int i; static char buf[16]; for (i = 0; i < ARRAY_SIZE(skge_chips); i++) if (skge_chips[i].id == hw->chip_id) return skge_chips[i].name; snprintf(buf, sizeof buf, "chipid 0x%x", hw->chip_id); return buf; }
false
false
false
false
false
0
xmlrpc_get_element(XMLRPCValue *xrarray, int i) { if (xrarray == NULL || xrarray->v_type != xr_array || i < 0) return NULL; return gwlist_get(xrarray->v_array, i); }
false
false
false
false
false
0
ResourceManager_addEntry( u32 pHash, u32 pHandle ) { if( rm ) if( u32Array_checkSize( &rm->mHashes ) && u32Array_checkSize( &rm->mHandles ) ) { u32 index = rm->mHashes.cpt++; if( index != (rm->mHandles.cpt++) ) { log_err( "Error in Resource Manager, arrays are not par...
false
false
false
false
false
0
rendering_render(rendering_t * rendering) { #ifdef AMIDE_COMMENT_OUT struct timeval tv1; struct timeval tv2; gdouble time1; gdouble time2; /* let's do some timing */ gettimeofday(&tv1, NULL); #endif if (rendering->need_rerender) { if (rendering->vpc != NULL) { if (rendering->optimize_renderin...
false
false
false
false
false
0
xchklog_initial_processing(struct fscklog_record *local_recptr) { int pi_rc = 0; /* * Initialize the fscklog control block */ local_recptr->infile_buf_length = FSCKLOG_BUFSIZE; local_recptr->infile_buf_ptr = fscklog_buffer; local_recptr->outfile_buf_length = XCHKLOG_BUFSIZE; local_recptr->outfile_buf_ptr = x...
false
false
false
false
false
0
e132xs_bgt(void) { if( !GET_N && !GET_Z ) execute_br(get_pcrel()); else e132xs_ICount -= 1; }
false
false
false
false
false
0
ipv6addrstruct_to_uncompaddrsuffix(const ipv6calc_ipv6addr *ipv6addrp, char *resultstring, const uint32_t formatoptions) { int retval = 1; unsigned int max, i; char tempstring1[NI_MAXHOST], tempstring2[NI_MAXHOST]; if ( (ipv6calc_debug & DEBUG_libipv6addr) != 0 ) { fprintf(stderr, "%s: called\n", DEBUG_function_...
false
false
false
false
false
0
get_mime_type(char *filename) { char *ext; int i; for (ext = &filename[strlen(filename) - 1]; ext != filename; ext--) { if (*(ext - 1) == '.') { break; } } for (i = 0; i < sizeof(MIME_TYPES)/sizeof(MIME_TYPES[0]); i++) { if (strcmp(ext, MIME_TYPES[i]) == 0) { ...
false
false
false
false
false
0
copy_argument (Argument * self) { Argument * new; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (self->type == ARGUMENT_NODE, NULL); new = g_new0(Argument, 1); new->type = ARGUMENT_NODE; new->gtktype = g_strdup (self->gtktype); new->atype = copy_type (self->atype); new->flags = g_list_copy (se...
false
false
false
false
false
0
ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // optional string java_package = 1; if (has_java_package()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->java_package()); } // optional strin...
false
false
false
false
false
0
_rtl92ee_get_txpower_index(struct ieee80211_hw *hw, enum radio_path rfpath, u8 rate, u8 bw, u8 channel) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_efuse *rtlefuse = rtl_efuse(rtlpriv); u8 index = (channel - 1); u8 tx_power = 0; u8 diff = 0; if (channel < 1 || channel > 14) { index ...
false
false
false
false
false
0
print_element_info (GstElementFactory * factory, gboolean print_names) { GstElement *element; gint maxlevel = 0; factory = GST_ELEMENT_FACTORY (gst_plugin_feature_load (GST_PLUGIN_FEATURE (factory))); if (!factory) { g_print ("element plugin couldn't be loaded\n"); return -1; } el...
false
false
false
false
false
0
cycle_setstate(cycleobject *lz, PyObject *state) { PyObject *saved=NULL; int firstpass; if (!PyArg_ParseTuple(state, "Oi", &saved, &firstpass)) return NULL; Py_CLEAR(lz->saved); lz->saved = saved; Py_XINCREF(lz->saved); lz->firstpass = firstpass != 0; Py_RETURN_NONE; }
false
false
false
false
false
0
init_patch_fill_state(patch_fill_state_t *pfs) { /* Warning : pfs->Function must be set in advance. */ const gs_color_space *pcs = pfs->direct_space; gs_client_color fcc0, fcc1; int i; for (i = 0; i < pfs->num_components; i++) { fcc0.paint.values[i] = -1000000; fcc1.paint.values[i] ...
false
false
false
false
false
0
print_constrained(ostream &out) { out << "Dataset {\n" ; for (Vars_citer i = vars.begin(); i != vars.end(); i++) { // for each variable, indent with four spaces, print a trailing // semicolon, do not print debugging information, print only // variables in the current projection. ...
false
false
false
false
false
0
CreateDvechmatWdata(int n, double alpha, double vv[], dvechmat **A){ int info,nn=(n*n+n)/2; dvechmat* V; DSDPCALLOC1(&V,dvechmat,&info);DSDPCHKERR(info); info=DTPUMatCreateWData(n,vv,nn,&V->AA); DSDPCHKERR(info); V->Eig.neigs=-1; V->Eig.eigval=0; V->Eig.an=0; V->alpha=alpha; *A=V; return 0; }
false
false
false
false
false
0
print_hostname(FILE *f, const char *p) { for ( ; *p; p++) { if (*p < ' ' || *p >= 127) { fprintf(f, "\\%03o", (int)(unsigned char)*p); continue; } if (*p == '\\') { fprintf(f, "\\\\"); continue; } putc(*p, f); } }
false
false
false
false
false
0
parsePacket(GmpEngine *ge) { int seq, ack, val; Command command; ButOut result = 0; seq = ge->recvData[0] & 1; ack = (ge->recvData[0] & 2) >> 1; if (ge->recvData[2] & 0x08) /* Not-understood command. */ return(0); command = (ge->recvData[2] >> 4) & 7; #if DEBUG if (showTransfers) { fprintf...
false
false
false
false
false
0
SwallowedWindow(button_info *b) { return (b->flags.b_Panel) ? b->PanelWin : b->IconWin; }
false
false
false
false
false
0
nextItemChooseDonorList() { DEBUG_BLOCK if ( !m_queue.isEmpty() ) // User-specified queue has highest priority. return &m_queue; else if ( !m_replayedItems.isEmpty() ) // If the user pressed "previous" once or more, first re-play those items again when we go forward again. return &m_r...
false
false
false
false
false
0
bnad_debugfs_open_fwsave(struct inode *inode, struct file *file) { struct bnad *bnad = inode->i_private; struct bnad_debug_info *fw_debug; unsigned long flags; int rc; fw_debug = kzalloc(sizeof(struct bnad_debug_info), GFP_KERNEL); if (!fw_debug) return -ENOMEM; fw_debug->buffer_len = BNA_DBG_FWTRC_LEN; fw...
false
false
false
false
false
0
setline(t) enum linestattype t; /* generates newline, or continuation, or nothing at all */ /* part of new linebreak option (-n) */ { if ((t == fresh) && ((linestat == postfield) || (linestat == endmusicline))) { printf("\n"); }; if ((t == fresh) && (linestat == midmusic)) { printf("\\\n"); }; linesta...
false
false
false
false
false
0
snprint_hw_fast_io_fail(char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; if (!hwe->fast_io_fail) return 0; if (hwe->fast_io_fail == -1) return snprintf(buff, len, "off"); return snprintf(buff, len, "%d", hwe->fast_io_fail); }
false
false
false
false
false
0
__ext4_journal_get_create_access(const char *where, unsigned int line, handle_t *handle, struct buffer_head *bh) { int err = 0; if (ext4_handle_valid(handle)) { err = jbd2_journal_get_create_access(handle, bh); if (err) ext4_journal_abort_handle(where, line, __func__, bh, handle, err); } return ...
false
false
false
false
false
0
compat_protect_strdup(const char *s) { size_t size; size = strlen(s) + 1; RUNTIME_ASSERT(size > 0 && size <= INT_MAX); return compat_protect_memdup(s, size); }
false
false
false
false
false
0
stats_reshape () { glViewport(0, 0, (GLint) width, (GLint) height); glMatrixMode (GL_PROJECTION); glLoadIdentity (); float v = getView (); if (camera == 50) v = 100000.0; gluPerspective (visibleangle, 1.0, nearclippingplane * GLOBALSCALE, v * GLOBALSCALE); glPolygonMode (GL_FRONT_AND_BACK, polygonMode);...
false
false
false
false
false
0
write_class_DS_s( class_DS *classes, int n_classes, FILE *stream) { int i, j; char caller[] = "write_class_DS_s"; for (i=0; i < n_classes; i++) { safe_fprintf(stream, caller, "class_DS %d\n", i); safe_fprintf(stream, caller, "w_j, pi_j\n"); safe_fprintf(stream, caller, "%.7e %.7e\n", classes[i]->w_j...
false
false
false
false
false
0
sdio_uart_update_mctrl(struct sdio_uart_port *port, unsigned int set, unsigned int clear) { unsigned int old; old = port->mctrl; port->mctrl = (old & ~clear) | set; if (old != port->mctrl) sdio_uart_write_mctrl(port, port->mctrl); }
false
false
false
false
false
0
lt_list_find_custom(lt_list_t *list, const lt_pointer_t data, lt_compare_func_t func) { lt_return_val_if_fail (func != NULL, NULL); while (list) { if (!func(list->value, data)) break; list = list->next; } return list; }
false
false
false
false
false
0
hmdf_this_pe_is_cp(const Hmdf_table *hmdf_ptr, int __pe_number) { int i; Boolean hmdf_pe_is_cp = FALSE; if (hmdf_ptr == NULL) { ERROR_EHMDF; } if (__pe_number != -1) { for (i = 0; (i < hmdf_ptr->clustering_num) && !hmdf_pe_is_cp; i++) { if (hmdf_ptr->cl...
false
false
false
false
false
0
_pager_popup_cb_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Event_Mouse_Wheel *ev = event; Pager_Popup *pp = act_popup; int max_x; e_zone_desk_count_get(pp->pager->zone, &max_x, NULL); if (current_desk->x + ev->z >= max_x) _pager_popup_desk_switch(1, 1); else if...
false
false
false
false
false
0
imapx_job_append_message_start (CamelIMAPXJob *job, CamelIMAPXServer *is, GCancellable *cancellable, GError **error) { CamelFolder *folder; CamelIMAPXCommand *ic; AppendMessageData *data; data = camel_imapx_job_get_data...
false
false
false
false
false
0
buttonPress(const XEvent *event_) { if (grabber()==this) { lastShowTime(0); } else { lastShowTime(event_->xbutton.time); } MSMenu::buttonPress(event_); }
false
false
false
false
false
0
lv_get_selected_split (GNCLotViewer *lv, GtkTreeView *view) { Split *split = NULL; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; selection = gtk_tree_view_get_selection(view); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get(...
false
false
false
false
false
0
sm_put(StrMap *map, const char *key, const char *value) { unsigned int key_len, value_len, index; Bucket *bucket; Pair *tmp_pairs, *pair; char *tmp_value; char *new_key, *new_value; if (map == NULL) { return 0; } if (key == NULL || value == NULL) { return 0; } key_len = strlen(key); value_len = strlen(v...
false
true
false
false
false
1
at86rf230_irq_status(void *context) { struct at86rf230_state_change *ctx = context; struct at86rf230_local *lp = ctx->lp; const u8 *buf = ctx->buf; u8 irq = buf[1]; enable_irq(lp->spi->irq); if (irq & IRQ_TRX_END) { at86rf230_irq_trx_end(ctx); } else { dev_err(&lp->spi->dev, "not supported irq %02x receive...
false
false
false
false
false
0
nrf_rcv_pkt_poll_dec(int maxsize, uint8_t * pkt, uint32_t const key[4]){ int len; uint16_t cmpcrc; len=nrf_rcv_pkt_poll(maxsize,pkt); if(len <=0) return len; // if(key==NULL) return len; if(key!=NULL) xxtea_decode_words((uint32_t*)pkt,len/4,key); cmpcrc=crc16(pkt,len-2); ...
false
false
false
false
true
1
__write_ports_names(char *buf, struct net *net) { struct nfsd_net *nn = net_generic(net, nfsd_net_id); if (nn->nfsd_serv == NULL) return 0; return svc_xprt_names(nn->nfsd_serv, buf, SIMPLE_TRANSACTION_LIMIT); }
false
false
false
false
false
0
CreateInitC( void ) { wxPanel * poPnl; if( bIsCreated( eCTLGRP_INITC ) ) return; // Create and add the initial conditions radio buttons poPnl = (wxPanel *) m_oPnlStart.GetParent( ); wxString osInitC[ 3 ] = { wxT("Warm "), wxT("Use ICs"), wxT("Cold ") }; m_oRbxInitC.Create( poPnl, ID_UNUSED, wxT(" Initial...
false
false
false
false
false
0
load(ifstream & fp) { uint rd = loadValue<uint>(fp); if(rd!=WVTREE_NOPTRS_HDR) return NULL; WaveletTreeNoptrs * ret = new WaveletTreeNoptrs(); ret->n = loadValue<size_t>(fp); ret->max_v = loadValue<uint>(fp); ret->height = loadValue<uint>(fp); ret->am = Mapper::lo...
false
false
false
false
false
0
_animator(void *data) { Smart_Data *sd = evas_object_smart_data_get(data); if (!sd) return ECORE_CALLBACK_CANCEL; double da; double spd = ((25.0 / (double)e_config->framerate) / (double)(1 + sd->view->zoom)); if (spd > 0.9) spd = 0.9; int wait = 0; if (sd->scroll_align != sd->sc...
false
false
false
false
false
0
liblo10k1_debug(liblo10k1_connection_t *conn, int deb, void (*prn_fnc)(char *)) { int err; ld10k1_fnc_debug_t debug_info; char debug_line[1000]; int opr, sizer; /* add */ debug_info.what = deb; if ((err = send_request(*conn, FNC_DEBUG, &debug_info, sizeof(ld10k1_fnc_debug_t))) < 0) return err; while (1) { ...
false
false
false
false
false
0
initializeExternalFunctions() { sys::ScopedLock Writer(*FunctionsLock); (*FuncNames)["lle_X_atexit"] = lle_X_atexit; (*FuncNames)["lle_X_exit"] = lle_X_exit; (*FuncNames)["lle_X_abort"] = lle_X_abort; (*FuncNames)["lle_X_printf"] = lle_X_printf; (*FuncNames)["lle_X_sprintf"] ...
false
false
false
false
false
0
gtv_wire_plugins_video (gtk_video_private_t *priv) { /* note: assumes default wiring */ GList *list = priv->post_video.enable ? g_list_copy (priv->post_video.list) : NULL; GList *item, *next = NULL; if (priv->post_deinterlace.list && priv->post_deinterlace.enable) list = g_list_concat (g_list_copy (priv-...
false
false
false
false
false
0
flush() { const UHashElement *element; int32_t pos = -1; umtx_lock(&lock); while ((element = uhash_nextElement(cache, &pos)) != NULL) { CollDataCacheEntry *entry = (CollDataCacheEntry *) element->value.pointer; if (entry->refCount <= 0) { uhash_removeElement(cache, element)...
false
false
false
false
false
0
pipe_context_callback(void *data, int status, char *stderr_buf) { char message[128]; char *cmd = data; int ok = False; if (strlen(cmd) > 100) cmd[100] = '\0'; if (WIFEXITED(status)) switch (WEXITSTATUS(status)) { case 0: sprintf(message, "'%s' exited ok.", cmd); ok = True; break...
false
false
false
false
false
0
proc_kcore_init_64(FILE *fp) { Elf64_Ehdr *elf64; Elf64_Phdr *load64; char eheader[MAX_KCORE_ELF_HEADER_SIZE]; char buf[BUFSIZE]; size_t size; size = MAX_KCORE_ELF_HEADER_SIZE; if (read(pc->mfd, eheader, size) != size) { sprintf(buf, "/proc/kcore: read"); perror(buf); goto bailout; } if (lseek(pc->mfd...
true
true
false
false
true
1
gd_main_toolbar_set_labels_menu (GdMainToolbar *self, GMenuModel *menu) { GtkWidget *button, *grid, *w; if (menu == NULL && ((gtk_widget_get_parent (self->priv->labels_grid) == self->priv->center_grid) || self->priv->center_menu_child == NULL)) return; if (me...
false
false
false
false
false
0
cavan_sha_update(struct cavan_sha_context *context, const void *buff, size_t size) { size_t remain; const void *buff_end = ADDR_ADD(buff, size); if (context->remain > 0) { size_t padding; padding = sizeof(context->buff) - context->remain; if (padding <= size) { mem_copy(context->buff + context->remain,...
false
false
false
false
false
0
apply_remote_node_ordering(pe_working_set_t *data_set) { GListPtr gIter = data_set->actions; if (is_set(data_set->flags, pe_flag_have_remote_nodes) == FALSE) { return; } for (; gIter != NULL; gIter = gIter->next) { action_t *action = (action_t *) gIter->data; resource_t *remote_...
false
false
false
false
false
0
lpfc_sli4_async_dcbx_evt(struct lpfc_hba *phba, struct lpfc_acqe_dcbx *acqe_dcbx) { phba->fc_eventTag = acqe_dcbx->event_tag; lpfc_printf_log(phba, KERN_ERR, LOG_SLI, "0290 The SLI4 DCBX asynchronous event is not " "handled yet\n"); }
false
false
false
false
false
0
getport(const char *name) { struct servent *svp; svp = getservbyname (name, "udp"); if (!svp) { return 0; } return ntohs(svp->s_port); }
false
false
false
false
false
0
mcb_request_mem(struct mcb_device *dev, const char *name) { struct resource *mem; u32 size; if (!name) name = dev->dev.driver->name; size = resource_size(&dev->mem); mem = request_mem_region(dev->mem.start, size, name); if (!mem) return ERR_PTR(-EBUSY); return mem; }
false
false
false
false
false
0
GetNextFeature() { if (bWriteMode) { CPLError(CE_Failure, CPLE_NotSupported, "Cannot read features when writing a GPX file"); return NULL; } if (fpGPX == NULL) return NULL; if (bStopParsing) return NULL; #ifdef HAVE_EXPAT if (nFeatureTabIndex <...
false
false
false
false
false
0
reload_cse_noop_set_p (rtx set) { if (cselib_reg_set_mode (SET_DEST (set)) != GET_MODE (SET_DEST (set))) return 0; return rtx_equal_for_cselib_p (SET_DEST (set), SET_SRC (set)); }
false
false
false
false
false
0
hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) { labels->hir(instructions, state); /* Conditionally set fallthru state based on break state. */ ir_constant *const false_val = new(state) ir_constant(false); ir_dereference_variable *const deref_is_fallthru_var = new(state) ir_der...
false
false
false
false
false
0
setPin(const unsigned char* pcOldPin, unsigned long ulOldPinLen, const unsigned char* pcPin, unsigned long ulPinLen) const { const CK_RV rv(m_p11->C_SetPIN(m_ulSessionHandle, const_cast<unsigned char*>(pcOldPin), ulOldPinLen, const_cast<unsigned char*>(pcPin), ulPinLen)); if (rv != CKR_OK) pk11error("C_SetP...
false
false
false
false
false
0
rsh_file_stat2(file_t* file, int use_lstat) { #ifdef _WIN32 int i; (void)use_lstat; /* ignore on windows */ file->mtime = 0; if(file->wpath) { free(file->wpath); file->wpath = NULL; } for(i = 0; i < 2; i++) { file->wpath = c2w(file->path, i); if(file->wpath == NULL) continue; /* return on success */ ...
false
false
false
false
false
0
pci_free_cap_save_buffers(struct pci_dev *dev) { struct pci_cap_saved_state *tmp; struct hlist_node *n; hlist_for_each_entry_safe(tmp, n, &dev->saved_cap_space, next) kfree(tmp); }
false
false
false
false
false
0
get_chip_set_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_CHIP_SET_SOFT_POWER_CONTROL_FAILURE && event_data2 <= ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure_max_index) ret...
false
false
false
false
true
1
createCurvedPlane( const String& name, const String& groupName, const Plane& plane, Real width, Real height, Real bow, int xsegments, int ysegments, bool normals, unsigned short numTexCoordSets, Real xTile, Real yTile, const Vector3& upVector, HardwareBuffer::Usage vertexBufferUsage, Hardwa...
false
false
false
false
false
0
Hxeqb(double *b) const { double *rhs=b; int row, rowBeg, *ind, *indEnd; double xr, *eta; // now solve for ( int k=0; k <= lastEtaRow_; ++k ){ row=EtaPosition_[k]; rowBeg=EtaStarts_[k]; xr=0.0; ind=EtaInd_+rowBeg; indEnd=ind+EtaLengths_[k]; eta=Eta_+rowBeg; for ( ; ind!=indEnd; ++ind ){ ...
false
false
false
false
false
0
intel_init_bsd_ring_buffer(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine_cs *ring = &dev_priv->ring[VCS]; ring->name = "bsd ring"; ring->id = VCS; ring->write_tail = ring_write_tail; if (INTEL_INFO(dev)->gen >= 6) { ring->mmio_base = GEN6_BSD_RING_BASE; ...
false
false
false
false
false
0
info (ACE_TCHAR **strp, size_t length) const { ACE_TRACE ("ACE_Naming_Context::info"); ACE_TCHAR buf[BUFSIZ]; ACE_OS::sprintf (buf, ACE_TEXT ("%s\t#%s\n"), ACE_TEXT ("ACE_Naming_Context"), ACE_TEXT ("Proxy for making calls to a N...
false
false
false
false
false
0
alists_hidden(alists_t * alists, const board_t * board, int from, int to) { int inc; int sq, piece; ASSERT(alists!=NULL); ASSERT(board!=NULL); ASSERT(SQUARE_IS_OK(from)); ASSERT(SQUARE_IS_OK(to)); inc = DELTA_INC_LINE(to-from); if (inc != IncNone) { // line sq = from; do sq -= i...
false
false
false
false
false
0