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
jbig2_region_find_referred(Jbig2Ctx *ctx,Jbig2Segment *segment) { const int nsegments = segment->referred_to_segment_count; Jbig2Segment *rsegment; int index; for (index = 0; index < nsegments; index++) { rsegment = jbig2_find_segment(ctx, segment->referred_to_segments[index]); if (rsegment == NU...
false
false
false
false
false
0
dev_c7200_sram_init(vm_instance_t *vm,char *name, m_uint64_t paddr,m_uint32_t len, struct pci_bus *pci_bus,int pci_device) { m_uint64_t alias_paddr; struct sram_data *d; /* Allocate the private data structure for SRAM */ if (!(d = malloc(sizeof(*d)))) { ...
false
false
false
false
false
0
l2up_create(struct layer2 *l2, u_int prim, int len, void *arg) { struct sk_buff *skb; struct mISDNhead *hh; int err; if (!l2->up) return; skb = mI_alloc_skb(len, GFP_ATOMIC); if (!skb) return; hh = mISDN_HEAD_P(skb); hh->prim = prim; hh->id = (l2->ch.nr << 16) | l2->ch.addr; if (len) memcpy(skb_put(sk...
false
false
false
false
false
0
listDefaultACLs(const char *pattern) { PQExpBufferData buf; PGresult *res; printQueryOpt myopt = pset.popt; static const bool translate_columns[] = {false, false, true, false}; if (pset.sversion < 90000) { fprintf(stderr, _("The server (version %d.%d) does not support altering default privileges.\n"), ps...
false
false
false
false
false
0
find_renames(void *user_data, const char *name, address_t value) { struct rename_data *rename = (struct rename_data *)user_data; regmatch_t pmatch; if (!regexec(&rename->preg, name, 1, &pmatch, 0) && pmatch.rm_so >= 0 && pmatch.rm_eo > pmatch.rm_so) { struct rename_record r; strncpy(r.old_name, name, size...
false
false
false
false
false
0
mxf_metadata_dm_segment_write_tags (MXFMetadataBase * m, MXFPrimerPack * primer) { MXFMetadataDMSegment *self = MXF_METADATA_DM_SEGMENT (m); GList *ret = MXF_METADATA_BASE_CLASS (mxf_metadata_dm_segment_parent_class)->write_tags (m, primer); MXFLocalTag *t; if (self->event_start_position != -1) { ...
false
false
false
false
false
0
draw(float dt) { if(gGourceSettings.hide_users) return; Pawn::draw(dt); }
false
false
false
false
false
0
xsh_polynomial_new(const cpl_polynomial *pol) { polynomial *p = NULL; int i; /* Test input */ assure(pol != NULL, CPL_ERROR_ILLEGAL_INPUT, "Null polynomial"); /* Allocate and initialize struct */ p = cpl_calloc(1, sizeof(polynomial)) ; assure_mem( p ); check_msg( p->dimension = cp...
false
false
false
false
false
0
bna_rxf_mcast_cfg_apply(struct bna_rxf *rxf) { struct bna_mac *mac = NULL; int ret; /* First delete multicast entries to maintain the count */ while (!list_empty(&rxf->mcast_pending_del_q)) { mac = list_first_entry(&rxf->mcast_pending_del_q, struct bna_mac, qe); ret = bna_rxf_mcast_del(rxf, mac, BNA...
false
false
false
false
false
0
fetion_account_keep_alive(fetion_account *ac) { fetion_sip *sip; sip_header *eheader; gchar *res; gchar *body; fetion_transaction *trans; g_return_val_if_fail(ac != NULL, HYBRID_ERROR); sip = ac->sip; fetion_sip_set_type(sip, SIP_REGISTER); ...
false
false
false
false
false
0
__ecereNameSpace__ecere__sys__FloatFromString(char * string) { int c, dig; float dec = 0, res = 0; int neg = 1; char ch; for(c = 0; string[c]; c++) { ch = string[c]; if(ch == ' ') continue; if(ch == '-') { if(neg == -1) break; neg = -1; } else if((ch == '.') && !dec) dec = 10; else if(isdigit(ch)) { dig = ch - '0'; if...
false
false
false
false
false
0
onig_new_with_source(regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo, const char *sourcefile, int sourceline) { int r; *reg = (regex_t* )xmalloc(sizeof(regex_t)); if (IS_NULL(*reg)) return ONIGERR_MEM...
false
false
false
false
false
0
flush() { #ifdef BOXX_BUGS if (overlay_ && overlay_ != this && overlay_->shown()) { // all drawing to windows hidden by overlay windows is ignored, fix this XUnmapWindow(fl_display, fl_xid(overlay_)); Fl_Double_Window::flush(0); XMapWindow(fl_display, fl_xid(overlay_)); return; } #endif int er...
false
false
false
false
false
0
read_comment(ScmPort *port) /* leading semicolon is already read */ { for (;;) { /* NB: comment may contain unexpected character code. for the safety, we read bytes here. */ int c = Scm_GetbUnsafe(port); if (c == '\n') { /* oops. ugly. */ port->line++; ...
false
false
false
false
false
0
remove_observers(OBJECT *ob) { CLASS *class = OBJECT_class(ob); OBJECT_EVENT *ev; COBSERVER *obs, *next; //fprintf(stderr, "Remove observers: %s %p\n", class->name, ob); if (!class->is_observer && class->n_event == 0) return; ev = (OBJECT_EVENT *)((char *)ob + class->off_event); obs = ev->observer; ev->o...
false
false
false
false
false
0
gncs_get_predicate (GNCSearchCoreType *fe) { GNCSearchString *ss = (GNCSearchString *)fe; QofQueryCompare how; QofStringMatch options = QOF_STRING_MATCH_NORMAL; gboolean is_regex = FALSE; g_return_val_if_fail (ss, NULL); g_return_val_if_fail (IS_GNCSEARCH_STRING (ss), NULL); switch (ss->ho...
false
false
false
false
false
0
setup_create_tree (GtkWidget *box, GtkWidget *book) { GtkWidget *tree; GtkWidget *frame; GtkTreeStore *model; GtkTreeIter iter; GtkTreeIter child_iter; GtkTreeIter *sel_iter = NULL; GtkCellRenderer *renderer; GtkTreeSelection *sel; int i, page; model = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_INT); i =...
false
false
false
false
false
0
git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *path) { int error, fd; char full_path[GIT_PATH_MAX]; char buffer[2048]; git_off_t size; git_odb_stream *stream; if (repo->path_workdir == NULL) return GIT_ENOTFOUND; git__joinpath(full_path, repo->path_workdir, path); if ((fd = gitfo_...
true
true
false
false
true
1
template_load() { int i; char name[1024], filename[1024], path[1024], *ptr; struct dirent **files; int num_files; fluid_prefs.getUserdataPath(path, sizeof(path)); strlcat(path, "templates", sizeof(path)); num_files = fl_filename_list(path, &files); for (i = 0; i < num_files; i ++) { if (fl_filename_match(files[i...
false
false
false
false
false
0
_iodbcdm_trschoose_dialboxw ( HWND hwnd, LPWSTR szInOutConnStr, DWORD cbInOutConnStr, int * sqlStat) { RETCODE retcode = SQL_ERROR; TTRANSLATORCHOOSER choose_t; /* Check input parameters */ if (!hwnd || !szInOutConnStr || cbInOutConnStr < 1) goto quit; create_translatorchooser (hwnd, &ch...
false
false
false
false
false
0
LayoutWindows() { if (!m_tlSheet) return; wxSize clientSize(GetClientSize()); int x = m_splitPos.x; int y = m_splitPos.y; int sash_size = GetSashSize(); int border_size = GetBorderSize(); if (!m_trSheet) x = clientSize.x - 2*border_size; /* else if (m_trS...
false
false
false
false
false
0
_computeCheckSum(void) { m_checkSum = 0; if (!m_pAttributes && !m_pProperties) return; const gchar *s1, *s2; UT_uint32 cch = 0; gchar *rgch; rgch = NULL; if (m_pAttributes) { UT_GenericStringMap<gchar*>::UT_Cursor c1(m_pAttributes); const gchar *val = c1.first(); while (val != NULL...
false
false
false
false
false
0
vs_scanline_resample_nearest_NV12 (uint8_t * dest, uint8_t * src, int src_width, int n, int *accumulator, int increment) { int acc = *accumulator; int i, j; for (i = 0; i < n; i++) { j = (acc + 0x8000) >> 16; dest[i * 2 + 0] = src[j * 2 + 0]; dest[i * 2 + 1] = src[j * 2 + 1]; acc += increme...
false
false
false
false
false
0
box_merge_point(gs_int_rect * pbox, floatp x, floatp y) { int t; if ((t = I_FLOOR(x)) < pbox->p.x) pbox->p.x = t; if ((t = I_CEIL(x)) > pbox->q.x) pbox->q.x = t; if ((t = I_FLOOR(y)) < pbox->p.y) pbox->p.y = t; if ((t = I_CEIL(y)) > pbox->q.y) pbox->q.y = t; }
false
false
false
false
false
0
apply_settings(void) { ui_update_fold_items(); /* toolbar, message window and sidebar are by default visible, so don't change it if it is true */ toolbar_show_hide(); if (! ui_prefs.msgwindow_visible) { ignore_callback = TRUE; gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ui_lookup_widget(main_widgets.wi...
false
false
false
false
false
0
sdb_engine_timeout_trigger_signals (gpointer user_data) { SymbolDBEngine *dbe = (SymbolDBEngine *) user_data; SymbolDBEnginePriv *priv; g_return_val_if_fail (user_data != NULL, FALSE); priv = dbe->priv; if (priv->signals_aqueue != NULL && g_async_queue_length (priv->signals_aqueue) > 0) { DBESignal *...
false
false
false
false
false
0
show_keys(int allbindings) { int i, count=1; Key_Entry *key; char buf[MAX_BUF]; snprintf(buf, sizeof(buf), "Commandkey %s", commandkeysym==NoSymbol?"unknown":gdk_keyval_name(commandkeysym)); draw_ext_info(NDI_BLACK, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_NOTICE, buf); snprintf(buf, sizeo...
false
false
false
false
false
0
cherni_backsubstitute(pk_internal_t* pk, matrix_t* con, size_t rank) { size_t i,j; int k; for (k=(int)rank-1; k>=0; k--) { j = pk->cherni_intp[k]; for (i=0; i<(size_t)k; i++) { if (numint_sgn(con->p[i][j])) matrix_combine_rows(pk,con,i,(size_t)k,i,j); } for (i=k+1; i<con->nbrows; i++) { ...
false
false
false
false
false
0
dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out) { const or_options_t *options = get_options(); tor_assert(timing_out); timing_out->vote_interval = options->V3AuthVotingInterval; timing_out->n_intervals_valid = options->V3AuthNIntervalsValid; timing_out->vote_delay = options->V3AuthVoteDela...
false
false
false
false
false
0
ReadInt32(BOOL msb_order, const void *buffer) { LONG value; if(msb_order) { value = (LONG)((((BYTE*) buffer)[0] << 24) | (((BYTE*) buffer)[1] << 16) | (((BYTE*) buffer)[2] << 8) | (((BYTE*) buffer)[3])); return value; } value = (LONG)((((BYTE*) buffer)[3] << 24) | (((BYTE*) buffer)[2] << 16) | (((BYTE*) buf...
false
false
false
false
false
0
fz_free_text_sheet(fz_context *ctx, fz_text_sheet *sheet) { fz_text_style *style = sheet->style; while (style) { fz_text_style *next = style->next; fz_drop_font(ctx, style->font); fz_free(ctx, style); style = next; } fz_free(ctx, sheet); }
false
false
false
false
false
0
acquireLocksOnSubLinks(Node *node, void *context) { if (node == NULL) return false; if (IsA(node, SubLink)) { SubLink *sub = (SubLink *) node; /* Do what we came for */ AcquireRewriteLocks((Query *) sub->subselect); /* Fall through to process lefthand args of SubLink */ } /* * Do NOT recurse into ...
false
false
false
false
false
0
update_color_fill_background(GLEColor* updateMe, GLEColor* color) { if (updateMe->isFill() && updateMe->getFill()->getFillType() == GLE_FILL_TYPE_PATTERN) { GLEPatternFill* myFill = static_cast<GLEPatternFill*>(updateMe->getFill()); myFill->setBackground(color); } else { GLEPatternFill* myFill = new GLEPatternF...
false
false
false
false
false
0
imdsock_shutdown(void *v) { imdsocket * s = (imdsocket *) v; if (s == NULL) return; #if defined(_MSC_VER) || defined(__MINGW32__) shutdown(s->sd, SD_SEND); #else shutdown(s->sd, 1); /* complete sends and send FIN */ #endif }
false
false
false
false
false
0
goc_polygon_set_property (GObject *gobject, guint param_id, GValue const *value, GParamSpec *pspec) { GocPolygon *polygon = GOC_POLYGON (gobject); switch (param_id) { case POLYGON_PROP_POINTS: { unsigned i; GocPoints *points = (GocPoints *) g_value_get_boxed (value); polygon->nb_points = points->n; g_f...
false
false
false
false
false
0
SprintPut(Sprinter *sp, const char *s, size_t len) { ptrdiff_t offset = sp->size; /* save old size */ char *bp = sp->base; /* save old base */ /* Allocate space for s, including the '\0' at the end. */ if (!SprintEnsureBuffer(sp, len)) return -1; if (sp->base != bp && ...
false
false
false
false
false
0
RecvTcpData(CoreThread *pcthrd) { pthread_t pid; int subsock; listen(pcthrd->tcpsock, 5); while (pcthrd->server) { if ((subsock = accept(pcthrd->tcpsock, NULL, NULL)) == -1) continue; pthread_create(&pid, NULL, ThreadFunc(TcpData::...
false
false
false
false
false
0
calcu_metadata_size(struct reloc_control *rc, struct backref_node *node, int reserve) { struct backref_node *next = node; struct backref_edge *edge; struct backref_edge *edges[BTRFS_MAX_LEVEL - 1]; u64 num_bytes = 0; int index = 0; BUG_ON(reserve && node->processed); while (next) { cond_resched(); while...
false
false
false
false
false
0
lpfc_sli_resume_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) { IOCB_t *iocb; struct lpfc_iocbq *nextiocb; /* * Check to see if: * (a) there is anything on the txq to send * (b) link is up * (c) link attention events can be processed (fcp ring only) * (d) IOCB processing is not blocked by t...
false
false
false
false
false
0
has_valid_uri_scheme (const gchar *uri) { const gchar *s; s = uri; if (!g_ascii_isalpha (*s)) { return FALSE; } do { s++; } while (g_ascii_isalnum (*s) || *s == '+' || *s == '.' || *s == '-'); return (*s == ':'); }
false
false
false
false
false
0
tuplesubscript(PyTupleObject* self, PyObject* item) { if (PyIndex_Check(item)) { Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError); if (i == -1 && PyErr_Occurred()) return NULL; if (i < 0) i += PyTuple_GET_SIZE(self); return tupleitem(self, i); } ...
false
false
false
false
true
1
brcmstb_i2c_enable_disable_irq(struct brcmstb_i2c_dev *dev, bool int_en) { if (int_en) /* Enable BSC CTL interrupt line */ dev->bsc_regmap->ctl_reg |= BSC_CTL_REG_INT_EN_MASK; else /* Disable BSC CTL interrupt line */ dev->bsc_regmap->ctl_reg &= ~BSC_CTL_REG_INT_EN_MASK; barrier(); bsc_writel(dev...
false
false
false
false
false
0
mailimf_quoted_pair_parse(const char * message, size_t length, size_t * index, char * result) { size_t cur_token; cur_token = * index; if (cur_token + 1 >= length) return MAILIMF_ERROR_PARSE; if (message[cur_token] != '\\') return MAILIMF_ERROR_PARSE; cur_token ++; * result = message[...
false
false
false
false
false
0
e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient) { char buf[4096]; E_OBJECT_CHECK(es); E_OBJECT_IF_NOT_TYPE(es, E_SHELF_DUMMY_TYPE) E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE); if (!es->dummy) { e_gadcon_orient(es->gadcon, orient); snprintf(buf, sizeof(buf), "e,state,orientation,%s"...
false
false
false
false
false
0
find_token_in_alist (token, alist, flags) int token; STRING_INT_ALIST *alist; int flags; { register int i; for (i = 0; alist[i].word; i++) { if (alist[i].token == token) return (savestring (alist[i].word)); } return ((char *)NULL); }
false
false
false
false
false
0
OnConnectEvent(AsyncSocket * socket) { std::string probe; switch (TEST_ORDER[next_]) { case PROXY_HTTPS: probe.assign("CONNECT www.google.com:443 HTTP/1.0\r\n" "User-Agent: "); probe.append(agent_); probe.append("\r\n" "Host: www.google.com\r\n" ...
false
false
false
false
false
0
dmppntrs(b) register Buffer *b; { register LinePtr lp; for (lp = b->b_first; lp != NULL; lp = lp->l_next) dmpobj(lp->l_dline); }
false
false
false
false
false
0
evtchn_2l_unmask(unsigned port) { struct shared_info *s = HYPERVISOR_shared_info; unsigned int cpu = get_cpu(); int do_hypercall = 0, evtchn_pending = 0; BUG_ON(!irqs_disabled()); if (unlikely((cpu != cpu_from_evtchn(port)))) do_hypercall = 1; else { /* * Need to clear the mask before checking pending to...
false
false
false
false
false
0
e_modapi_shutdown(E_Module *m __UNUSED__) { e_configure_registry_item_del("keyboard_and_mouse/xkbswitch"); e_configure_registry_category_del("keyboard_and_mouse"); if (_xkb.evh) ecore_event_handler_del(_xkb.evh); if (_xkb.cfd) e_object_del(E_OBJECT(_xkb.cfd)); _xkb.cfd = NULL; _xkb.module = NULL; ...
false
false
false
false
false
0
PutBytes ( const void * pData, int iSize ) { BYTE * b = (BYTE*) pData; for ( int i=0; i<iSize; i++ ) m_uCRC = (m_uCRC >> 8) ^ g_dSphinxCRC32 [ (m_uCRC ^ *b++) & 0xff ]; CSphWriter::PutBytes ( pData, iSize ); }
false
false
false
false
false
0
mmc_spi_remove(struct spi_device *spi) { struct mmc_host *mmc = dev_get_drvdata(&spi->dev); struct mmc_spi_host *host; if (mmc) { host = mmc_priv(mmc); /* prevent new mmc_detect_change() calls */ if (host->pdata && host->pdata->exit) host->pdata->exit(&spi->dev, mmc); mmc_remove_host(mmc); if (host...
false
false
false
false
false
0
checknamesanity(const char *name, int dot_ok) { register const char *namepnt; #ifdef PARANOID_FILE_NAMES const char *validchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefgihjklmnopqrstuvwxyz" "0123456789./-_"; #endif if (name == NULL || *name == 0) { return -1; } ...
false
false
false
false
false
0
plwcsdup(const pl_wchar_t* str) { if (str == NULL) return NULL; size_t len = plwcslen(str); pl_wchar_t* buf = new pl_wchar_t[len+1]; memcpy(buf, str, len * sizeof(pl_wchar_t)); buf[len] = 0; return buf; }
false
false
false
false
false
0
on_bt_1_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer user_data) { gboolean is_valid_drop_site; GdkAtom ...
false
false
false
false
false
0
acard_ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac) { int rc; if (using_dac && !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) { rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64)); if (rc) { rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); if (rc) { dev_err(&pdev->dev, ...
false
false
false
false
false
0
ctrl_task_is_pwr_msg_sender(Ctrl_task *c, int sleep_id) { List *li, *pwr_msg_list = ctrl_task_get_pwr_msg_list(c); for (li = pwr_msg_list; li != NULL; li = li->next) { Power_msg *m = li->data; if (power_msg_get_sleep_id(m) == sleep_id) return TRUE; } return FALSE; }
false
false
false
false
false
0
rb_file_flock(obj, operation) VALUE obj; VALUE operation; { #ifndef __CHECKER__ OpenFile *fptr; int op; rb_secure(2); op = NUM2INT(operation); GetOpenFile(obj, fptr); if (fptr->mode & FMODE_WRITABLE) { fflush(GetWriteFile(fptr)); } retry: if (flock(fileno(fptr->f), op) < 0) ...
false
false
false
false
false
0
ixgbe_dcbnl_set_all(struct net_device *netdev) { struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_dcb_config *dcb_cfg = &adapter->dcb_cfg; struct ixgbe_hw *hw = &adapter->hw; int ret = DCB_NO_HW_CHG; int i; /* Fail command if not in CEE mode */ if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) ...
false
false
false
false
false
0
axp288_charger_set_cv(struct axp288_chrg_info *info, int cv) { u8 reg_val; int ret; if (cv <= CV_4100MV) { reg_val = CHRG_CCCV_CV_4100MV; cv = CV_4100MV; } else if (cv <= CV_4150MV) { reg_val = CHRG_CCCV_CV_4150MV; cv = CV_4150MV; } else if (cv <= CV_4200MV) { reg_val = CHRG_CCCV_CV_4200MV; cv = CV_42...
false
false
false
false
false
0
rd_cleanup(struct register_data *rd) { register_data = g_slist_remove(register_data, rd); g_free(rd->username); g_free(rd->domain); g_free(rd->password); g_free(rd->address); g_free(rd->id); if (rd->handler != NULL) { if (lm_message_handler_is_valid(rd->handler)) lm_message_handler_invalidate(rd->handler); ...
false
false
false
false
false
0
gkd_secret_change_prompt_ready (GkdSecretPrompt *prompt) { GkdSecretChange *self = GKD_SECRET_CHANGE (prompt); GckObject *collection; collection = gkd_secret_prompt_lookup_collection (prompt, self->collection_path); perform_prompting (self, collection); g_clear_object (&collection); }
false
false
false
false
false
0
mx_button_set_property (GObject *gobject, guint prop_id, const GValue *value, GParamSpec *pspec) { MxButton *button = MX_BUTTON (gobject); switch (prop_id) { case PROP_LABEL: mx_button_set_label (button, g_value_ge...
false
false
false
false
false
0
gst_stream_info_set_mute (GstStreamInfo * stream_info, gboolean mute) { g_return_val_if_fail (GST_IS_STREAM_INFO (stream_info), FALSE); if (stream_info->type == GST_STREAM_TYPE_ELEMENT) { g_warning ("cannot mute element stream"); return FALSE; } if (mute != stream_info->mute) { /* nothing really h...
false
false
false
false
false
0
soap_markelement(struct soap *soap, const void *ptr, int type) { (void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */ switch (type) { case SOAP_TYPE_ns__handle: soap_serialize_ns__handle(soap, (const struct ns__handle *)ptr); break; case SOAP_TYPE__QName: soap_serialize_string(soap, (char*const*)&p...
false
false
false
false
false
0
c_parser_omp_clause_name (c_parser *parser) { pragma_omp_clause result = PRAGMA_OMP_CLAUSE_NONE; if (c_parser_next_token_is_keyword (parser, RID_IF)) result = PRAGMA_OMP_CLAUSE_IF; else if (c_parser_next_token_is_keyword (parser, RID_DEFAULT)) result = PRAGMA_OMP_CLAUSE_DEFAULT; else if (c_parser_next_...
false
false
false
false
false
0
spectrum( float *p ) { power2( p ); for( int i = 0; i < ( m_num / 2 ); i++, p++ ) *p = ( float )sqrt( *p * .5 ); }
false
false
false
false
false
0
call_enum_check_hook(struct config_enum * conf, int *newval, void **extra, GucSource source, int elevel) { /* Quick success if no hook */ if (!conf->check_hook) return true; /* Reset variables that might be set by hook */ GUC_check_errcode_value = ERRCODE_INVALID_PARAMETER_VALUE; GUC_check_errmsg_string =...
false
false
false
false
false
0
mapLookup(const QString &basename, const QVariant &key) const { QStringList children = getChildOptionNames( basename, true, true); foreach (QString path, children) { if (getOption(path+".key") == key) { return path; } } qWarning("Accessing missing key '%s' in option map '%s'", qPrintable(key.toString()), qPr...
false
false
false
false
false
0
read_rakp2_message( struct ipmi_rs * rsp, int offset, uint8_t auth_alg) { int i; /* Message tag */ rsp->payload.rakp2_message.message_tag = rsp->data[offset]; /* RAKP reponse code */ rsp->payload.rakp2_message.rakp_return_code = rsp->data[offset + 1]; /* Console session ID */ memcpy(&(r...
false
false
false
false
false
0
RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint, double alpha) { assert("pre: leftPoint_exists" && leftPoint!=0); assert("pre: midP...
false
false
false
false
false
0
set_merge(PySetObject *so, PyObject *otherset) { PySetObject *other; PyObject *key; long hash; register Py_ssize_t i; register setentry *entry; assert (PyAnySet_Check(so)); assert (PyAnySet_Check(otherset)); other = (PySetObject*)otherset; if (other == so || other->used == 0) ...
false
false
false
false
false
0
ganv_item_request_update(GanvItem* item) { if (item->object.flags & GANV_ITEM_NEED_UPDATE) { return; } item->object.flags |= GANV_ITEM_NEED_UPDATE; if (item->parent != NULL) { /* Recurse up the tree */ ganv_item_request_update(item->parent); } else { /* Have reached the top of the tree, make sure the upd...
false
false
false
false
false
0
glade_gtk_cell_renderer_set_property (GladeWidgetAdaptor *adaptor, GObject *object, const gchar *property_name, const GValue *value) { static gint use_attr_len = 0; static gint attr_len = 0; if (!attr_len) { use_attr_len = strlen ("use-attr-"); attr_len = strlen ("attr-"); } ...
false
false
false
false
false
0
dri2GetGlxDrawableFromXDrawableId(Display *dpy, XID id) { struct glx_display *d = __glXInitialize(dpy); struct dri2_display *pdp = (struct dri2_display *) d->dri2Display; __GLXDRIdrawable *pdraw; if (__glxHashLookup(pdp->dri2Hash, id, (void *) &pdraw) == 0) return pdraw; return NULL; }
false
false
false
false
false
0
full_open_new(Gfile * gf, char *fname, RASTER_MAP_TYPE ftype) { gf->fd = -1; snprintf(gf->name, 127, "%s", fname); if (G_legal_filename(gf->name) < 0) G_fatal_error(_("<%s> is an illegal name"), gf->name); gf->type = ftype; gf->mapset = G_mapset(); gf->fd = G_open_raster_new(gf->name, gf->typ...
false
false
false
false
false
0
filter_action_parameters(xmlNode * param_set, const char *version) { char *key = NULL; char *timeout = NULL; char *interval = NULL; const char *attr_filter[] = { XML_ATTR_ID, XML_ATTR_CRM_VERSION, XML_LRM_ATTR_OP_DIGEST, }; gboolean do_delete = FALSE; int lpc = 0; ...
false
false
false
false
false
0
xdr_gf1_cli_get_volume (XDR *xdrs, gf1_cli_get_volume *objp) { register int32_t *buf; buf = NULL; if (!xdr_enum (xdrs, (enum_t *) objp)) return FALSE; return TRUE; }
false
false
false
false
false
0
wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili) { unsigned long end = jiffies + msecs_to_jiffies(max_wait_mili); int err = 0; while (fw_initializing(dev)) { if (time_after(jiffies, end)) { err = -EBUSY; break; } msleep(FW_INIT_WAIT_MS); } return err; }
false
false
false
false
false
0
stream_setup_complete(struct avdtp *session, struct a2dp_sep *sep, struct avdtp_stream *stream, struct avdtp_error *err, void *user_data) { struct source *source = user_data; struct pending_request *pending; pending = source->connect; pending->id = 0; if (stream) { DBG("Stream successfully created")...
false
false
false
false
false
0
on_spinbutton_adjustment_value_changed(GtkAdjustment *unused_adj, gpointer data) { GtkWidget *widget; search_t *search; (void) unused_adj; widget = GTK_WIDGET(data); search = search_gui_get_current_search(); if (search && guc_search_is_active(search->search_handle)) { guint32 timeout; timeout ...
false
false
false
false
false
0
fl_popup_get_size( FL_POPUP * popup, unsigned int * w, unsigned int * h ) { if ( fli_check_popup_exists( popup ) ) { M_err( "fl_popup_get_size", "Invalid popup argument" ); return -1; } if ( popup->need_recalc ) recalc_popup( popup ); ...
false
false
false
false
false
0
new_gedge(void) { gedge *t; static int n = 0; /* Serial number */ if ((t = (gedge *) calloc(1, sizeof(gedge))) == NULL) { fprintf(stderr,"gamut: malloc failed - triangle edge\n"); exit(-1); } t->n = n++; return t; }
false
false
false
false
false
0
fail_on_unknow_option(const char* option_name) { log_error(_("unknown option: %s\n"), (option_name ? option_name : "?")); rsh_exit(2); }
true
true
false
false
false
1
etfci_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint height) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); GnomeCanvas *canvas = item->canvas; gint rows; gint y1, y2; gint row; if (etfci->combined_heade...
false
false
false
false
false
0
clist_clear(GtkCList *clist) { GtkStyle *base_style, *row_style; int i; base_style = gtk_widget_get_style(GTK_WIDGET(clist)); for (i=0; i<GTK_CLIST(clist)->rows ; i++) { row_style = gtk_clist_get_row_style(GTK_CLIST(clist), i); if (row_style && (row_style != base_style)) { ...
false
false
false
false
false
0
mpz_lshiftword(mpz_ptr r, u_int32_t i) { int err; if (!i) return SBN_OK; if ((err = mpz_realloc(r, (r->l+i)-1)) != SBN_OK) return err; memmove(r->d+i, r->d, r->l*MPZ_ATOMSZ); memset(r->d, 0, i*MPZ_ATOMSZ); r->l += i; return SBN_OK; }
false
false
false
false
false
0
ap_expr_exec_re(request_rec *r, const ap_expr_info_t *info, apr_size_t nmatch, ap_regmatch_t *pmatch, const char **source, const char **err) { ap_expr_eval_ctx_t ctx; int dont_vary = (info->flags & AP_EXPR_FLAG_DONT_VARY); const char *tmp_sourc...
false
false
false
false
false
0
rt8973a_muic_detect_cable_wq(struct work_struct *work) { struct rt8973a_muic_info *info = container_of(to_delayed_work(work), struct rt8973a_muic_info, wq_detcable); int ret; /* Notify the state of connector cable or not */ ret = rt8973a_muic_cable_handler(info, RT8973A_EVENT_ATTACH); if (ret < 0) dev_warn...
false
false
false
false
false
0
mergeSortRek(IntegerVector &v, int begin, int end, IntegerVector &temp) { if(end-begin<2)return 0; int med=(begin+end)>>1; int nswaps=mergeSortRek(v,begin,med,temp); nswaps+=mergeSortRek(v,med,end,temp); { int Astart=begin; int Alength=med-begin; int Bstart=med; int Blength=end-med; int n...
false
false
false
false
false
0
parse_env(void) { char *env; env = getenv("HUGETLB_ELFMAP"); if (env && (strcasecmp(env, "no") == 0)) { verbose_printf("Segment remapping disabled\n"); elfmap_off = 1; } else { env = getenv("HUGETLB_SHARE"); if (env) sharing = atoi(env); verbose_printf("Segment remapping enabled, " "sharing = %d\n...
false
false
false
false
false
0
detach() { int ret; if ((ret=pthread_detach(myThread)) != 0) { if (ret == ESRCH) { ArLog::log(ArLog::Terse, "ArThread::detach: Error in detach: No such thread found"); return(STATUS_NO_SUCH_THREAD); } else if (ret == EINVAL) { ArLog::log(ArLog::Terse, "ArThread::detach: Erro...
false
false
false
false
false
0
first_rewrite_clause(struct clause *c, struct clause_ptr *demods, struct context *subst, struct trail **trp, int *demod_id) { struct ilist *ip1, *ip2; struct literal *lit; ip1 = get_ilist(); ip1->i = 1; for (lit = c->first_lit; lit; lit = lit->next_lit, ip1->i++) { ip2...
false
false
false
false
false
0
set_user_dir(cmd_parms *cmd, void *dummy, const char *arg) { userdir_config *s_cfg = ap_get_module_config(cmd->server->module_config, &userdir_module); char *username; const char *usernames = arg; char *kw = ap_getword_conf(cmd->pool, &usernames); apr...
false
false
false
false
false
0
autohelperowl_defendpat269(int trans, int move, int color, int action) { int a; UNUSED(color); UNUSED(action); a = AFFINE_TRANSFORM(720, trans, move); return !ATTACK_MACRO(a) || (countstones(a)<=2 && does_attack(move, a)); }
false
false
false
false
false
0
PHY_SetBBReg(struct rtw_adapter *Adapter, u32 RegAddr, u32 BitMask, u32 Data) { u32 OriginalValue, BitShift; if (BitMask != bMaskDWord) {/* if not "double word" write */ OriginalValue = rtl8723au_read32(Adapter, RegAddr); BitShift = phy_CalculateBitShift(BitMask); Data = (OriginalValue & (~BitMask)) | (Data <<...
false
false
false
false
false
0
setLimits(char axis, double &l, double &u) { char command[300]=""; sprintf(command,"%f %f %u setnlimit", l, u, axis_index); if(!transmit(command)) return false; return true; }
false
false
false
false
false
0
init_mm_current_scale(struct aat1290_led *led, struct aat1290_led_config_data *cfg) { int max_mm_current_percent[] = { 20, 22, 25, 28, 32, 36, 40, 45, 50, 56, 63, 71, 79, 89, 100 }; int i, max_mm_current = AAT1290_MAX_MM_CURRENT(cfg->max_flash_current); led->mm_current_scale = devm_kzalloc(&led->pdev->d...
false
false
false
false
false
0
dictExpand(dict *d, unsigned long size) { dictht n; /* the new hash table */ unsigned long realsize = _dictNextPower(size); /* the size is invalid if it is smaller than the number of * elements already inside the hash table */ if (dictIsRehashing(d) || d->ht[0].used > size) return DICT_ERR...
false
false
false
false
false
0
goBackOne(collIterate *data) { # if 0 // somehow, it looks like we need to keep iterator synced up // at all times, as above. if(data->pos) { data->pos--; } if(data->iterator) { data->iterator->previous(data->iterator); } #endif if(data->iterator && (data->flags & UCOL_USE_IT...
false
false
false
false
false
0
read() { if (index == entry->length) { return -1 ; } file->seek (index++) ; int c = file->read() ; return c ; }
false
false
false
false
false
0