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
efx_ef10_filter_table_probe(struct efx_nic *efx) { MCDI_DECLARE_BUF(inbuf, MC_CMD_GET_PARSER_DISP_INFO_IN_LEN); MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX); unsigned int pd_match_pri, pd_match_count; struct efx_ef10_filter_table *table; size_t outlen; int rc; table = kzalloc(sizeof(*table),...
false
false
false
false
false
0
crossedPortal(const PortalBase* otherPortal) { // Only check if portal is open and is not an antiportal if (otherPortal->getEnabled()) { // we model both portals as line swept spheres (mPrevDerivedCP to mDerivedCP). // intersection test is then between the capsules. // BUGBUG! This r...
false
false
false
false
false
0
put_decl_string (const char *str, int len) { if (len < 0) len = strlen (str); if (decl_bufpos + len >= decl_buflen) { if (decl_buf == NULL) { decl_buflen = len + 100; decl_buf = XNEWVEC (char, decl_buflen); } else { decl_buflen *= 2; decl_buf = XRESIZEVAR (char, decl_buf, decl_buf...
false
false
false
false
false
0
emitLineNumberAsDotLoc(const MachineInstr &MI) { if (!EmitLineNumbers) return; if (ignoreLoc(MI)) return; DebugLoc curLoc = MI.getDebugLoc(); if (!prevDebugLoc && !curLoc) return; if (prevDebugLoc == curLoc) return; prevDebugLoc = curLoc; if (!curLoc) return; auto *Scope = cast...
false
false
false
false
false
0
category_move(guint32 key1, guint32 key2) { GList *list; list = g_list_first(GLOBALS->ope_list); while (list != NULL) { Transaction *entry = list->data; if(entry->kcat == key1) { entry->kcat = key2; entry->flags |= OF_CHANGED; } list = g_list_next(list); } list = g_list_first(GLOBALS->arc_list); ...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); SourceObjPlugin *_t = static_cast<SourceObjPlugin *>(_o); switch (_id) { case 0: _t->aSignal((*reinterpret_cast< const std::stri...
false
false
false
false
false
0
get_grouping( AllData& alldata ) { uint32_t r_processes= alldata.allProcesses.size(); uint32_t r_groups= alldata.params.max_groups; set< Process, ltProcess >::iterator pos= alldata.allProcesses.begin(); for ( uint32_t c= 0; c < Grouping::MAX_GROUPS && 0 < r_processes; c++ ) { uint3...
false
false
false
false
false
0
isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const { // If this is a landing pad, it isn't a fall through. If it has no preds, // then nothing falls through to it. if (MBB->isLandingPad() || MBB->pred_empty()) return false; // If there isn't exactly one predecessor, it can't be a fall...
false
false
false
false
false
0
gf_defrag_start_crawl (void *data) { xlator_t *this = NULL; dht_conf_t *conf = NULL; gf_defrag_info_t *defrag = NULL; int ret = -1; loc_t loc = {0,}; struct iatt iatt = {0,...
false
false
false
false
false
0
search_gui_set_record_info(results_set_t *rs) { str_t *vinfo = str_new(40); GSList *iter; guint i; results_set_check(rs); /* If banned GUID, make it prominent: at the start of the information! */ if (rs->status & ST_BANNED_GUID) { str_cat(vinfo, "GUID"); } for (i = 0; i < G_N_ELEMENTS(open_flags); i++) { ...
false
false
false
false
false
0
sourceRowsRemoved(const QModelIndex &parent, int start, int end) { Q_Q(KSelectionProxyModel); Q_UNUSED(end) Q_ASSERT(parent.isValid() ? parent.model() == q->sourceModel() : true); if (!m_selectionModel.data()->hasSelection()) return; if (!m_rowsRemoved) return; m_rowsRemoved =...
false
false
false
false
false
0
gf_odf_write_ipmp_tool_list(GF_BitStream *bs, GF_IPMP_ToolList *ipmptl) { GF_Err e; u32 size; if (!ipmptl) return GF_BAD_PARAM; e = gf_odf_size_descriptor((GF_Descriptor *)ipmptl, &size); if (e) return e; e = gf_odf_write_base_descriptor(bs, ipmptl->tag, size); if (e) return e; e = gf_odf_write_descriptor_list(...
false
false
false
false
false
0
norx_absorb(norx_state_t state, const uint8_t * in, tag_t tag) { norx_word_t * S = state->S; size_t i; norx_inject_tag(state, tag); norx_permutation(state); #if defined(NORX_DEBUG) if (tag == HEADER_TAG) { printf("End of initialisation:\n"); norx_print_state(state); } #endif ...
false
false
false
false
false
0
processListenSockets(fd_set *reads) { struct socklist *s; int ret = False; for (s = listensocks; s; s = s->next) if (FD_ISSET(s->fd, reads)) { processRequestSocket(s->fd); ret = True; } return ret; }
false
false
false
false
false
0
lh_delete(_LHASH *lh, const void *data) { unsigned long hash; LHASH_NODE *nn,**rn; void *ret; lh->error=0; rn=getrn(lh,data,&hash); if (*rn == NULL) { lh->num_no_delete++; return(NULL); } else { nn= *rn; *rn=nn->next; ret=nn->data; OPENSSL_free(nn); lh->num_delete++; } lh->num_items--;...
false
false
false
false
false
0
expr3 (parser *p) { NODE *t; #if SDEBUG fprintf(stderr, "expr3: starting...\n"); #endif if (p->err || (t = expr4(p)) == NULL) { return NULL; } while (!p->err && (p->sym == B_GT || p->sym == B_LT || p->sym == B_DOTGT || p->sym == B_DOTLT || p->sym == B_GTE || p->sym == B_LTE...
false
false
false
false
false
0
debug_cdata (char *data, size_t len, int pos) { int i; PRINT_TEST; if (tester.cur && tester.cur->type == IKS_CDATA) printf (" Expecting cdata [%s]\n", tester.cur->cdata); else printf (" Not expecting cdata here\n"); printf (" Got cdata ["); for (i = 0; i < len; i++) putchar (data[i]); printf ("] at the p...
false
false
false
false
false
0
lua_dump (lua_State *L, lua_Writer writer, void *data) { int status; TValue *o; lua_lock(L); api_checknelems(L, 1); o = L->top - 1; if (isLfunction(o)) status = luaU_dump(L, getproto(o), writer, data, 0); else status = 1; lua_unlock(L); return status; }
false
false
false
false
false
0
readChildren(SoInput *in) // //////////////////////////////////////////////////////////////////////// { SoBase *base; SbBool ret = TRUE; // If reading binary, read number of children first if (in->isBinary()) { int numToRead, i; if (!in->read(numToRead)) ret = FALSE; else { for (i = 0; ...
false
false
false
false
false
0
bkm_scale (__strtol_t *x, int scale_factor) { __strtol_t product = *x * scale_factor; if (*x != product / scale_factor) return 1; *x = product; return 0; }
false
false
false
false
false
0
_rl_char_search (count, fdir, bdir) int count, fdir, bdir; { char mbchar[MB_LEN_MAX]; int mb_len; mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); if (mb_len <= 0) return -1; if (count < 0) return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); else return (_rl_char_search_inter...
false
false
false
false
false
0
has_graphic_extension(const char *s) { GraphConvertElement *thisFormat; diagnostics(4,"testing for graphics extension '%s'",s); for (thisFormat = GraphConvertTable; thisFormat->extension != NULL; thisFormat++) { if (has_extension(s,thisFormat->extension)) return strdup(thisFormat->extens...
false
false
false
false
false
0
Show(bool show) { bool r = BaseDialog::Show(show); if (show && bookctrl_1->GetPageCount() <= 1) treectrl_1->Hide(); if (bookctrl_1->GetPageCount()) static_text_categ->SetLabel(bookctrl_1->GetPageText(0)); return r; }
false
false
false
false
false
0
createGOAAuthProvider(const InitStateString &username, const InitStateString &password) { // Because we share the connection, hopefully this won't be too expensive. GDBusCXX::DBusErrorCXX err; GDBusCXX::DBusConnectionPtr conn = dbus_get_bus_connection("S...
false
false
false
false
false
0
pipeInit(SplashPipe *pipe, int x, int y, SplashPattern *pattern, SplashColorPtr cSrc, SplashCoord aInput, GBool usesShape, GBool nonIsolatedGroup) { pipeSetXY(pipe, x, y); pipe->pattern = NULL; // source color if (pattern) { if (pattern->isStatic()) { pattern->getColor(x, y, p...
false
false
false
false
false
0
decode_block(jpeg *j, short data[64], huffman *hdc, huffman *hac, int b) { int diff,dc,k; int t = decode(j, hdc); if (t < 0) return e("bad huffman code","Corrupt JPEG"); // 0 all the ac values now so we can do it 32-bits at a time memset(data,0,64*sizeof(data[0])); diff = t ? extend_receive(j, t) : ...
false
false
false
false
false
0
bond_ab_arp_commit(struct bonding *bond) { unsigned long trans_start; struct list_head *iter; struct slave *slave; bond_for_each_slave(bond, slave, iter) { switch (slave->new_link) { case BOND_LINK_NOCHANGE: continue; case BOND_LINK_UP: trans_start = dev_trans_start(slave->dev); if (rtnl_dereferenc...
false
false
false
false
false
0
pick_curves(CutControls *controls) { GwyGraphModel *parent_gmodel, *graph_model; gint i; graph_model = controls->args->graph_model; parent_gmodel = gwy_graph_get_model(controls->args->parent_graph); gwy_graph_model_remove_all_curves(graph_model); if (!controls->args->is_all) { gwy_grap...
false
false
false
false
false
0
printLong(acroEntry *entry,int plural) { if (FALSE == plural) { ConvertString(entry->acLong); } else { if (NULL != entry->acLongPlural) { ConvertString(entry->acLongPlural); } else { ConvertString(entry->acLong); ConvertString("s"); } } }
false
false
false
false
false
0
gnome_keyring_attribute_list_to_glist (GnomeKeyringAttributeList *attributes) { GList *list = NULL; GnomeKeyringAttribute *attr; guint i; if (attributes == NULL) return NULL; for (i = 0; i < attributes->len; ++i) { attr = &g_array_index (attributes, GnomeKeyringAttribute, i); list = g_list_append (list, gn...
false
false
false
false
false
0
gnutls_x509_crt_set_proxy_dn (gnutls_x509_crt_t crt, gnutls_x509_crt_t eecrt, unsigned int raw_flag, const void *name, unsigned int sizeof_name) { int result; if (crt == NULL || eecrt == NULL) { return GNUTLS_E_INVALID_REQUEST; } result =...
false
false
false
false
false
0
name_as_c_string (tree name, tree type, bool *free_p) { char *pretty_name; /* Assume that we will not allocate memory. */ *free_p = false; /* Constructors and destructors are special. */ if (IDENTIFIER_CTOR_OR_DTOR_P (name)) { pretty_name = CONST_CAST (char *, identifier_to_locale (IDENTIFIER_PO...
false
false
false
false
false
0
ParseIdentifier(bool* ok) { i::Token::Value next = Next(); switch (next) { case i::Token::FUTURE_RESERVED_WORD: { i::Scanner::Location location = scanner_->location(); ReportMessageAt(location.beg_pos, location.end_pos, "reserved_word", NULL); *ok = false; } // ...
false
false
false
false
false
0
setCoordinateDimension( int nNewDimension ) { for( int iGeom = 0; iGeom < nGeomCount; iGeom++ ) { papoGeoms[iGeom]->setCoordinateDimension( nNewDimension ); } OGRGeometry::setCoordinateDimension( nNewDimension ); }
false
false
false
false
false
0
FormatCapture(const char** capture) { string s; for (int i = 0; i < ncapture_; i+=2) { if (capture[i] == NULL) StringAppendF(&s, "(?,?)"); else if (capture[i+1] == NULL) StringAppendF(&s, "(%d,?)", (int)(capture[i] - btext_)); else StringAppendF(&s, "(%d,%d)", (int...
false
false
false
false
false
0
generate_natd_hash(private_isakmp_natd_t *this, ike_sa_id_t *ike_sa_id, host_t *host) { hasher_t *hasher; chunk_t natd_chunk, natd_hash; u_int64_t spi_i, spi_r; u_int16_t port; hasher = this->keymat->get_hasher(this->keymat); if (!hasher) { DBG1(DBG_IKE, "no hasher available to build NAT-D payload")...
false
false
false
false
false
0
newsf(struct snd_sf_list *sflist, int type, char *name) { struct snd_soundfont *sf; /* check the shared fonts */ if (type & SNDRV_SFNT_PAT_SHARED) { for (sf = sflist->fonts; sf; sf = sf->next) { if (is_identical_font(sf, type, name)) { return sf; } } } /* not found -- create a new one */ sf = kzal...
false
false
false
false
false
0
mimeview_change_view_type(MimeView *mimeview, MimeViewType type) { TextView *textview = mimeview->textview; GtkWidget *focused = NULL; if (mainwindow_get_mainwindow()) focused = gtkut_get_focused_child( GTK_CONTAINER(mainwindow_get_mainwindow()->window)); if ((mimeview->type != MIMEVIEW_VIEWER) && ...
false
false
false
false
false
0
lookup_qualified_name (tree scope, tree name, bool is_type_p, bool complain) { int flags = 0; if (TREE_CODE (scope) == NAMESPACE_DECL) { cxx_binding binding; cxx_binding_clear (&binding); flags |= LOOKUP_COMPLAIN; if (is_type_p) flags |= LOOKUP_PREFER_TYPES; if (qualified_lookup...
false
false
false
false
false
0
is_polling_required(struct charger_manager *cm) { switch (cm->desc->polling_mode) { case CM_POLL_DISABLE: return false; case CM_POLL_ALWAYS: return true; case CM_POLL_EXTERNAL_POWER_ONLY: return is_ext_pwr_online(cm); case CM_POLL_CHARGING_ONLY: return is_charging(cm); default: dev_warn(cm->dev, "Incorr...
false
false
false
false
false
0
split_line(char **ptr) { char *foo, *res; if (!ptr || !*ptr || !xstrcmp(*ptr, "")) return NULL; res = *ptr; if (!(foo = xstrchr(*ptr, '\n'))) *ptr += xstrlen(*ptr); else { size_t reslen; *ptr = foo + 1; *foo = 0; reslen = xstrlen(res); if (reslen > 1 && res[reslen - 1] == '\r') res[reslen - 1]...
false
false
false
false
false
0
createPopupMenu() { KMenu *popup=new KMenu(this ); KActionCollection *actions=new KActionCollection(popup); popup->setObjectName( "PixmapRegionSelectorPopup"); popup->addTitle(i18n("Image Operations")); QAction *action = actions->addAction("rotateclockwise"); action->setText(i18n("&Rotate Clock...
false
false
false
false
false
0
parseValue(gchar *line, float *index, float rgb[3], GError **error) { gchar *name; PangoColor color; double index_; DBG_fprintf(stderr, "Tool Shade: parse step from '%s'\n", line); index_ = g_ascii_strtod(line, &name); if (errno != 0 || name == line) { *error = g_error_new(TOOL_CONFIG_FILE_ERRO...
false
false
false
false
false
0
cdset_lookup(HTK_HMM_INFO *hmminfo, char *cdstr) { CD_Set *cd; cd = aptree_search_data(cdstr, hmminfo->cdset_info.cdtree); if (cd != NULL && strmatch(cdstr, cd->name)) { return cd; } else { return NULL; } }
false
false
false
false
false
0
threeHalfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy, Complex&A1,Complex&A2,Complex&A3, Complex&B1,Complex&B2,Complex&B3) const { A3=0.;B3=0.; if(_parity) { A1=0.; B1=-_prefactor[imode]*(m0+m1); A2=0.; B2= _prefactor[imode]*(m0+m1); } else { A1=_prefactor[imode]*(m0...
false
false
false
false
false
0
rbd_name_show(struct device *dev, struct device_attribute *attr, char *buf) { struct rbd_device *rbd_dev = dev_to_rbd_dev(dev); if (rbd_dev->spec->image_name) return sprintf(buf, "%s\n", rbd_dev->spec->image_name); return sprintf(buf, "(unknown)\n"); }
false
true
false
false
false
1
panel_struts_find_strut (PanelToplevel *toplevel) { GSList *l; for (l = panel_struts_list; l; l = l->next) { PanelStrut *strut = l->data; if (strut->toplevel == toplevel) break; } return l ? l->data : NULL; }
false
false
false
false
false
0
modperl_flags_lookup_dir(const char *str) { switch (*str) { case 'G': if (strEQ(str, "GlobalRequest")) return MpDir_f_GLOBAL_REQUEST; case 'N': if (strEQ(str, "None")) return MpDir_f_NONE; case 'U': if (strEQ(str, "Unset")) return MpDir_f_UNSET; case...
false
false
false
false
false
0
i2cdevWrite(I2C_Dev *dev, uint8_t devAddress, uint8_t memAddress, uint16_t len, uint8_t *data) { dev->pCPAL_TransferTx->wNumData = len; dev->pCPAL_TransferTx->pbBuffer = data; dev->pCPAL_TransferTx->wAddr1 = devAddress << 1; dev->pCPAL_TransferTx->wAddr2 = memAddress; if (memAddress != I2CDEV...
false
false
false
false
false
0
ossl_pkcs7_add_recipient(VALUE self, VALUE recip) { PKCS7 *pkcs7; PKCS7_RECIP_INFO *ri; ri = DupPKCS7RecipientPtr(recip); /* NEED TO DUP */ GetPKCS7(self, pkcs7); if (!PKCS7_add_recipient_info(pkcs7, ri)) { PKCS7_RECIP_INFO_free(ri); ossl_raise(ePKCS7Error, "Could not add recipient."); } ...
false
false
false
false
false
0
ScrollUp(int line) { if (useHardScroll && !con.soft) { TextScrollUp(line); scrollLine += line; } else TextMoveUp(con.ymin, con.ymax, line); }
false
false
false
false
false
0
seq_init_chip() { fprintf(stderr, "initialize chip\n"); AWE_INITIALIZE_CHIP(seqfd, awe_dev); if (!buffering) seqbuf_dump(); }
false
false
false
false
false
0
max98090_add_widgets(struct snd_soc_codec *codec) { struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); snd_soc_add_codec_controls(codec, max98090_snd_controls, ARRAY_SIZE(max98090_snd_controls)); if (max98090->devtype == MAX98091...
false
false
false
false
false
0
create_pixmap (const gchar * filename) { gchar *pathname = NULL; GtkWidget *pixmap; if (!filename || !filename[0]) return gtk_image_new (); pathname = find_pixmap_file (filename); if (!pathname) { g_warning (_("Couldn't find pixmap file: %s"), filename); return gtk_image_new (); } pixmap = gt...
false
false
false
false
false
0
nfs_fop_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, struct iatt *prenewparent, struct iatt *postnewparent) { struct nfs_fop_l...
false
false
false
false
false
0
compute_high_time (GstMultiQueue * mq) { /* The high-id is either the highest id among the linked pads, or if all * pads are not-linked, it's the lowest not-linked pad */ GList *tmp; GstClockTime highest = GST_CLOCK_TIME_NONE; GstClockTime lowest = GST_CLOCK_TIME_NONE; for (tmp = mq->queues; tmp; tmp = g_...
false
false
false
false
false
0
ipmi_fru_parse_next (ipmi_fru_parse_ctx_t ctx) { int rv = 0; if (!ctx || ctx->magic != IPMI_FRU_PARSE_CTX_MAGIC) { ERR_TRACE (ipmi_fru_parse_ctx_errormsg (ctx), ipmi_fru_parse_ctx_errnum (ctx)); return (-1); } if (ctx->chassis_info_area_starting_offset && !ctx->chassis_info_area_parsed) ...
false
false
false
false
false
0
RemoveTranslation(unsigned long VTKEvent) { vtkSmartPointer< vtkEvent > e = vtkSmartPointer< vtkEvent >::New(); e->SetEventId(VTKEvent); return this->RemoveTranslation( e ); }
false
false
false
false
false
0
put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr) { const HashTable* table = classInfo()->propHashTable; // get the right hashtable const HashEntry* entry = Lookup::findEntry(table, propertyName); if (entry) { if (entry->attr & Function) // function: put as override property {...
false
false
false
false
false
0
range_binop (code, type, arg0, upper0_p, arg1, upper1_p) enum tree_code code; tree type; tree arg0, arg1; int upper0_p, upper1_p; { tree tem; int result; int sgn0, sgn1; /* If neither arg represents infinity, do the normal operation. Else, if not a comparison, return infinity. Else ha...
false
false
false
false
false
0
compare_int_fields(xmlNode * left, xmlNode * right, const char *field) { const char *elem_l = crm_element_value(left, field); const char *elem_r = crm_element_value(right, field); int int_elem_l = crm_int_helper(elem_l, NULL); int int_elem_r = crm_int_helper(elem_r, NULL); if (int_elem_l < int_ele...
false
false
false
false
false
0
acpi_ec_complete_query(struct acpi_ec *ec) { if (test_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) { clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); ec_dbg_evt("Command(%s) unblocked", acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY)); } }
false
false
false
false
false
0
analyze_gambas_component(const char *path) { ARCH *arch; ARCH_FIND find; bool ret = TRUE; if (_verbose) fprintf(stderr, "Loading gambas component: %s\n", path); arch = ARCH_open(path); if (ARCH_find(arch, ".info", 0, &find)) { warning(".info file not found in component archive."); goto __RETURN; } fw...
false
false
false
false
false
0
findSubTag(const QDomElement &e, const QString &name, bool *found) { if(found) *found = false; for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) { QDomElement i = n.toElement(); if(i.isNull()) continue; if(i.tagName() == name) { if(found) *found = true; return i; } } QDomEl...
false
false
false
false
false
0
mono_gc_bzero_aligned (void *dest, size_t size) { volatile char *d = (char*)dest; size_t tail_bytes, word_bytes; g_assert (unaligned_bytes (dest) == 0); /* copy all words with memmove */ word_bytes = (size_t)align_down (size); switch (word_bytes) { case sizeof (void*) * 1: BZERO_WORDS (d, 1); break; case ...
false
false
false
false
false
0
gda_statement_normalize (GdaStatement *stmt, GdaConnection *cnc, GError **error) { g_return_val_if_fail (GDA_IS_STATEMENT (stmt), FALSE); g_return_val_if_fail (stmt->priv, FALSE); g_return_val_if_fail (GDA_IS_CONNECTION (cnc), FALSE); return gda_sql_statement_normalize (stmt->priv->internal_struct, cnc, error); }
false
false
false
false
false
0
initialize_table_ni(int aesni, int pclmul) { if (!aesni) return; branch_table[INIT_128] = aes_ni_init; branch_table[INIT_256] = aes_ni_init; branch_table[ENCRYPT_BLOCK_128] = aes_ni_encrypt_block128; branch_table[DECRYPT_BLOCK_128] = aes_ni_decrypt_block128; branch_table[ENCRYPT_BLOCK_256] = aes_ni_encrypt_blo...
false
false
false
false
false
0
jsparser_buffer_get(jsparser_ctx *js, int pos) { int absolute_pos; assert(pos < 0); absolute_pos = jsparser_buffer_absolute_pos(js, pos); if (absolute_pos < 0) { return '\0'; } return js->buffer[absolute_pos]; }
false
false
false
false
false
0
do_gain_analysis(lame_internal_flags * gfc, unsigned char* buffer, int minimum) { SessionConfig_t const *const cfg = &gfc->cfg; RpgStateVar_t const *const rsv = &gfc->sv_rpg; RpgResult_t *const rov = &gfc->ov_rpg; #ifdef DECODE_ON_THE_FLY if (cfg->decode_on_the_fly) { /* decode the frame */ samp...
false
false
false
false
false
0
e_cal_backend_http_open (ECalBackendSync *backend, EDataCal *cal, GCancellable *cancellable, gboolean only_if_exists, GError **perror) { ECalBackendHttp *cbhttp; ECalBackendHttpPrivate *priv; ESource *source; ESource...
false
false
false
false
false
0
tp_debug_divert_messages (const gchar *filename) { int fd; if (filename == NULL) return; if (filename[0] == '+') { /* open in append mode */ fd = g_open (filename + 1, O_WRONLY | O_CREAT | O_APPEND, 0644); } else { /* open in trunc mode */ fd = g_open (filename, O_WRONL...
false
false
false
false
false
0
isContentEqual(const pf_Frag & f2) const { if(getType() != f2.getType()) return false; // check we have PT to fidle with ... if(!m_pPieceTable || !f2.m_pPieceTable) return false; return _isContentEqual(f2); }
false
false
false
false
false
0
clearScreen(void) { if(getPage() == NULL) { return; } fp_Container * pCon = NULL; if(getColumn() && (getHeight() != 0)) { if(getPage() == NULL) { return; } fl_DocSectionLayout * pDSL = getPage()->getOwningSection(); if(pDSL == NULL) { return; } UT_sint32 iLeftMargin = pDSL->getLeftMargin()...
false
false
false
false
false
0
jent_unbiased_bit(struct rand_data *entropy_collector) { do { __u64 a = jent_measure_jitter(entropy_collector); __u64 b = jent_measure_jitter(entropy_collector); if (a == b) continue; if (1 == a) return 1; else return 0; } while (1); }
false
false
false
false
false
0
cost_material(Path *path, Cost input_startup_cost, Cost input_total_cost, double tuples, int width) { Cost startup_cost = input_startup_cost; Cost run_cost = input_total_cost - input_startup_cost; double nbytes = relation_byte_size(tuples, width); long work_mem_bytes = work_mem * 1024L; /* * Wheth...
false
false
false
false
false
0
gzip_load_kernel(CHAR16 *kname, kdesc_t *kd) { EFI_STATUS status; INT32 ret; fops_fd_t fd; status = fops_open(kname, &fd); if (EFI_ERROR(status)) return ELILO_LOAD_ERROR; ret = gunzip_kernel(fd, kd); fops_close(fd); return ret; /* could be success, error, or abort */ }
false
false
false
false
false
0
H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*out*/) { hbool_t all_zero = TRUE; /* True if address was all zeroes */ unsigned u; /* Local index variable */ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI...
false
false
false
false
false
0
NumberOfBitsNeeded(int PowerOfTwo) { int i; if (PowerOfTwo < 2) { fprintf(stderr, "Error: FFT called with size %d\n", PowerOfTwo); exit(1); } for (i = 0;; i++) if (PowerOfTwo & (1 << i)) return i; }
false
false
false
false
false
0
acpi_copy_property_array_u64(const union acpi_object *items, u64 *val, size_t nval) { int i; for (i = 0; i < nval; i++) { if (items[i].type != ACPI_TYPE_INTEGER) return -EPROTO; val[i] = items[i].integer.value; } return 0; }
false
false
false
false
false
0
solo_eeprom_write(struct solo_dev *solo_dev, int loc, __be16 data) { int write_cmd = loc | (EE_WRITE_CMD << ADDR_LEN); unsigned int retval; int i; solo_eeprom_cmd(solo_dev, write_cmd); for (i = 15; i >= 0; i--) { unsigned int dataval = ((__force unsigned)data >> i) & 1; solo_eeprom_reg_write(solo_de...
false
false
false
false
false
0
get_count() const { if(!m_refListStore) return 0; guint iCount = m_refListStore->children().size(); //Take account of the extra blank for new entries: if(get_allow_user_actions()) //If it has the extra row. { --iCount; } return iCount; }
false
false
false
false
false
0
clone_available(void) { struct work *work_clone = NULL, *work, *tmp; bool cloned = false; mutex_lock(stgd_lock); if (!staged_rollable) goto out_unlock; HASH_ITER(hh, staged_work, work, tmp) { if (can_roll(work) && should_roll(work)) { roll_work(work); work_clone = make_clone(work); roll_work(work); ...
true
true
false
false
false
1
_dxf_ExPathAppend( Program *p, char fname[], int instance, gfunc *fnode ) { uint32 fname_key; ModPath *path = &fnode->mod_path; /* Note, we store paths in reverse order in mod_path, */ /* so append is really a prepend. */ if ( path->num_comp >= ARRAY_L...
false
false
false
false
false
0
KickMenu() // activate player kick menu { uMenu menu( "$player_police_kick_text" ); int size = se_PlayerNetIDs.Len(); eMenuItemKick** items = tNEW( eMenuItemKick* )[ size ]; int i; for ( i = size-1; i>=0; --i ) { ePlayerNetID* player = se_PlayerNetIDs[ i ]; if ( player->I...
false
false
false
false
false
0
dialog_refresh_type(gint type) { GSList *list; struct dialog_pak *dialog; for (list=sysenv.dialog_list ; list ; list=g_slist_next(list)) { dialog = list->data; if (dialog->type == type) if (dialog->refresh) dialog->refresh(dialog); } }
false
false
false
false
false
0
ewmh_get_client_list(void) { Window *list; struct client *c; int win_n = 0; SLIST_FOREACH(c, &W->h.client, next) ++win_n; list = xcalloc(win_n, sizeof(Window)); win_n = 0; SLIST_FOREACH(c, &W->h.client, next) list[win_n++] = c->win; XChangeProperty(W->dpy,...
false
false
false
false
false
0
mysql_get_auth_secrets(secrets_list_t *sl, u08bits *realm) { int ret = -1; MYSQL * myc = get_mydb_connection(); if(myc) { char statement[TURN_LONG_STRING_SIZE]; snprintf(statement,sizeof(statement)-1,"select value from turn_secret where realm='%s'",realm); int res = mysql_query(myc, statement); if(res) { ...
false
false
false
false
false
0
intel_init_audio(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; if (IS_G4X(dev)) { dev_priv->display.audio_codec_enable = g4x_audio_codec_enable; dev_priv->display.audio_codec_disable = g4x_audio_codec_disable; } else if (IS_VALLEYVIEW(dev)) { dev_priv->display.audio_codec_ena...
false
false
false
false
false
0
load_environment(Style* s, int priority) { const char* xenv = getenv("XENVIRONMENT"); if (xenv != nil) { s->load_file(String(xenv), priority); } else { load_path(s, ".Xdefaults-", Host::name(), priority); } }
false
false
false
false
false
0
luaV_closure (int nelems) { if (nelems > 0) { struct Stack *S = &L->stack; Closure *c = luaF_newclosure(nelems); c->consts[0] = *(S->top-1); memcpy(&c->consts[1], S->top-(nelems+1), nelems*sizeof(TObject)); S->top -= nelems; ttype(S->top-1) = LUA_T_CLOSURE; (S->top-1)->value.cl = c; } }
false
true
false
false
false
1
ibv_dontfork_range(void *base, size_t size) { if (mm_root) return ibv_madvise_range(base, size, MADV_DONTFORK); else { too_late = 1; return 0; } }
false
false
false
false
false
0
conntrack2_mt_parse(struct xt_option_call *cb) { #define cinfo2_transform(r, l) \ memcpy((r), (l), offsetof(typeof(*(l)), sizeof(*info)); struct xt_conntrack_mtinfo2 *info = cb->data; struct xt_conntrack_mtinfo3 up; memset(&up, 0, sizeof(up)); memcpy(&up, info, sizeof(*info)); up.origsrc_port_high = up.origsrc...
false
false
false
false
false
0
spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const { if(spanCondition!=USET_SPAN_NOT_CONTAINED) { spanCondition=USET_SPAN_CONTAINED; // Pin to 0/1 values. } uint8_t b; do { b=s[--length]; if((int8_t)b>=0) { // ASCII sub-span ...
false
false
false
false
false
0
setDefaultValues() { for (vector<CmdLineOption*>::size_type i = 0; i < m_Options.size(); i++) { CmdLineOption* opt = m_Options[i]; if (opt != NULL && !opt->hasOption()) { opt->setDefaultValues(); } } }
false
false
false
false
false
0
real_exponent (const REAL_VALUE_TYPE *r) { switch (r->cl) { case rvc_zero: return 0; case rvc_inf: case rvc_nan: return (unsigned int)-1 >> 1; case rvc_normal: return REAL_EXP (r); default: gcc_unreachable (); } }
false
false
false
false
false
0
PyvtkvmtkPolyDataBranchUtilities_ExtractGroup(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "ExtractGroup"); vtkPolyData *temp0 = NULL; char *temp1 = NULL; vtkIdType temp2; bool temp3 = false; vtkPolyData *temp4 = NULL; PyObject *result = NULL; if (ap.CheckArgCount(5) && ap.GetVTKObject(t...
false
false
false
false
false
0
AddInstallNamePatchRule(std::ostream& os, Indent const& indent, const char* config, std::string const& toDestDirPath) { if(this->ImportLibrary || !(this->Target->GetType() == cmTarget::SHARED_LIBRARY || this->Target->GetType() == cmTarget::MODULE_LIBRARY || this->Target->G...
false
false
false
false
false
0
sync_tip (GeditTab *tab, GeditTabLabel *tab_label) { gchar *str; str = _gedit_tab_get_tooltip (tab); g_return_if_fail (str != NULL); gtk_widget_set_tooltip_markup (tab_label->priv->ebox, str); g_free (str); }
false
false
false
false
false
0
set_gtk_image_from_gtk_image (GtkImage *image, GtkImage *source) { switch (gtk_image_get_storage_type (source)) { case GTK_IMAGE_EMPTY: gtk_image_clear (image); break; case GTK_IMAGE_PIXBUF: { GdkPixbuf *pb; pb = gtk_image_get_pixbuf (source); gtk_image_set_from_pixbuf (image, pb); ...
false
false
false
false
false
0
midgard_object_purge_attachments(MidgardObject *self, gboolean delete_blob, guint n_params, const GParameter *parameters) { g_assert(self != NULL); if(!MGD_OBJECT_GUID (self)) { g_warning("Object is not fetched from database. Empty guid"); } gboolean rv = FALSE; if(delete_blob) { rv = midgard_core_ob...
false
false
false
false
false
0