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
_relocateChain( Viewport* sourceVP, Viewport* destVP ) { if (sourceVP != destVP) { CompositorChain *chain = getCompositorChain(sourceVP); Ogre::RenderTarget *srcTarget = sourceVP->getTarget(); Ogre::RenderTarget *dstTarget = destVP->getTarget(); if (srcTarget != dstTarget) ...
false
false
false
false
false
0
update_ipv4(void) { const struct connman_ipv4 *ipv4, *ipv4_conf; gboolean method_set = FALSE; ipv4 = connman_service_get_ipv4(path); ipv4_conf = connman_service_get_ipv4_config(path); if (ipv4 == NULL) { set_entry(builder, "ipv4_address", "", ""); set_entry(builder, "ipv4_netmask", "", ""); set_entry(build...
false
false
false
false
false
0
pdf_load_template(const char *filename) { /* Init poppler */ globalParams = new GlobalParams(); PDFDoc *doc = new PDFDoc(new GooString(filename)); if (!doc->isOk()) { fprintf(stderr, "Error: unable to open template document '%s'\n", filename); delete doc...
false
false
false
false
false
0
gretl_model_get_double (const MODEL *pmod, const char *key) { double *valp = NULL; int i; if (pmod == NULL) { return NADBL; } for (i=0; i<pmod->n_data_items; i++) { if (pmod->data_items[i]->type != GRETL_TYPE_DOUBLE) { continue; } if (!strcmp(key, pmod->data_items[i]->key)) { valp = ...
false
false
false
false
false
0
is_negative() const { return (bits_[nbits_-1] == V1) && has_sign(); }
false
false
false
false
false
0
tzfmt_cleanup(void) { if (gZoneIdTrie != NULL) { delete gZoneIdTrie; } gZoneIdTrie = NULL; gZoneIdTrieInitialized = FALSE; if (gShortZoneIdTrie != NULL) { delete gShortZoneIdTrie; } gShortZoneIdTrie = NULL; gShortZoneIdTrieInitialized = FALSE; return TRUE; }
false
false
false
false
false
0
inotifytools_initialize() { if (init) return 1; error = 0; // Try to initialise inotify inotify_fd = inotify_init(); if (inotify_fd < 0) { error = inotify_fd; return 0; } collect_stats = 0; init = 1; tree_wd = rbinit(wd_compare, 0); tree_filename = rbinit(filename_compare, 0); timefmt = 0; return 1; ...
false
false
false
false
false
0
reducef(f) struct fract* f; /* reducef fraction to smallest terms */ { int t, n, m; /* find HCF using Euclid's algorithm */ if (f->num > f->denom) { n = f->num; m = f->denom; } else { n = f->denom; m = f->num; }; while (m != 0) { t = n % m; n = m; m = t; }; f->num = f->num/n...
false
false
false
false
false
0
_enable_halftonevec (HpOption UNUSEDARG this, HpOptSet optset, HpData data, const HpDeviceInfo UNUSEDARG *info) { if (sanei_hp_optset_scanmode(optset, data) == HP_SCANMODE_HALFTONE) { HpOption dither = hp_optset_get(optset, HALFTONE_PATTERN); return dither && hp_option_getint(d...
false
false
false
false
false
0
sbpro_audio_prepare_for_output(int dev, int bsize, int bcount) { /* For SB Pro and Jazz16 */ sb_devc *devc = audio_devs[dev]->devc; unsigned long flags; unsigned char tmp; unsigned char bits = 0; if (devc->dma16 >= 0 && devc->dma16 != devc->dma8) audio_devs[dev]->dmap_out->dma = audio_devs[dev]->dmap_in->dma...
false
false
false
false
false
0
handleCount() { QObjectList list = children(); CWIDGET *ob; int i, nh = -1; for (i = 0; i < list.count(); i++) { ob = CWidget::getReal(list.at(i)); if (ob && ob->widget && !ob->widget->isHidden()) nh++; } return nh; }
false
false
false
false
false
0
ext2fs_file_set_size2(ext2_file_t file, ext2_off64_t size) { ext2_off64_t old_size; errcode_t retval; blk64_t old_truncate, truncate_block; EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE); if (size && ext2fs_file_block_offset_too_big(file->fs, &file->inode, (size - 1) / file->fs->blocksize)) return EXT2_...
false
false
false
false
false
0
gl_label_object_set_size (glLabelObject *object, gdouble w, gdouble h, gboolean checkpoint) { gl_debug (DEBUG_LABEL, "START"); g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_size != NULL ) { /* ...
false
false
false
true
false
1
build_img(Display *dpy, Window window, struct field *f) { if (f->off_alpha) { free(f->off_alpha); f->off_alpha = NULL; /* Assume theres also an off pixmap */ if (f->off_map != window) XFreePixmap(dpy, f->off_map); } f->off_alpha = (unsigned char *) xreallo...
false
false
false
false
true
1
mark_array ___P((___WORD *start, ___WORD n), (start, n) ___WORD *start; ___WORD n;) #endif { ___WORD *alloc = alloc_heap_ptr; ___WORD *limit = alloc_heap_limit; #ifdef ENABLE_CONSISTENCY_CHECKS mark_array_call_line = line; #endif while (n > 0) { ___WORD obj = *start; ...
false
false
false
false
false
0
updateMaterial(video::SMaterial & material) { AllColorsControl->updateMaterialColors(material); material.Lighting = ButtonLighting->isPressed(); if ( TextureControl1->isDirty() ) { material.TextureLayer[0].Texture = Driver->getTexture( io::path(TextureControl1->getSelectedTextureName()) ); } if ...
false
false
false
false
false
0
makeDicomByteString() { /* get string data */ char *value = NULL; errorFlag = getString(value); if (value != NULL) { /* check for odd length */ if (realLength & 1) { /* if so add a padding character */ setLengthField(realLength + 1); value[...
false
false
false
false
false
0
getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy) { int ISD = TLI->InstructionOpcodeToISD(Opcode); // On NEON a a vector select gets lowered to vbsl. if (ST->hasNEON() && ValTy->isVectorTy() && ISD == ISD::SELECT) { // Lowering of some vector selects is currently far from perfect. static con...
false
false
false
false
false
0
conf_dns_callback(const char *result, int status, int aftype, void *data) { struct server_conf *server_p = data; if(status == 1) rb_inet_pton_sock(result, (struct sockaddr *)&server_p->ipnum); server_p->dns_query = 0; }
false
false
false
false
false
0
__v9fs_fscache_wait_on_page_write(struct inode *inode, struct page *page) { const struct v9fs_inode *v9inode = V9FS_I(inode); p9_debug(P9_DEBUG_FSC, "inode %p page %p\n", inode, page); if (PageFsCache(page)) fscache_wait_on_page_write(v9inode->fscache, page); }
false
false
false
false
false
0
cddb_mc_generate_new_entry(int cd_desc, struct disc_mc_data *data) { struct disc_data *indata; if((indata = malloc(sizeof(struct disc_data))) == NULL) return -1; if(cddb_generate_new_entry(cd_desc, indata) < 0) { free(indata); return -1; } if(cddb_mc_alloc(cd_desc, data) < 0) { free(i...
false
false
false
false
true
1
gCalcHostBlStat (void) { Host h ; for (h = gHostList ; h != NULL ; h = h->next) { h->dlAccum += h->deferLen ; h->blAccum += h->backlog ; if (h->backlog == 0) h->blNone++ ; else if (h->backlog >= (hostHighwater - h->deferLen)) h->blFull++ ; else h->blQuartile[(4*h->ba...
false
false
false
false
false
0
object_registration_free (ObjectRegistration *o) { g_assert (o->export != NULL); o->export->registrations = g_slist_remove (o->export->registrations, o); g_free (o->object_path); g_slice_free (ObjectRegistration, o); }
false
false
false
false
false
0
rfftwnd_mpi_create_plan(MPI_Comm comm, int rank, const int *n, fftw_direction dir, int flags) { rfftwnd_mpi_plan p; if (rank < 2) return 0; p = (rfftwnd_mpi_plan) fftw_malloc(sizeof(rfftwnd_mpi_plan_data)); p->p_fft_x = 0; p->p_fft = 0; p->p_transpose = 0; ...
false
false
false
false
false
0
psf_check_outline_glyphs(gs_font_base *pfont, psf_glyph_enum_t *ppge, glyph_data_proc_t glyph_data) { uint members = GLYPH_INFO_WIDTH0 << pfont->WMode; gs_glyph glyph; int code, good_glyphs = 0; while ((code = psf_enumerate_glyphs_next(ppge, &glyph)) != 1) { gs_glyph_da...
false
false
false
false
false
0
IsGroupBlanked(vtkPolyData* centerlines, const char* groupIdsArrayName, const char* blankingArrayName, vtkIdType groupId) { vtkDataArray* groupIdsArray = centerlines->GetCellData()->GetArray(groupIdsArrayName); int numberOfCells = centerlines->GetNumberOfCells(); vtkIdType cellId = -1; int i; for (i=0; i<num...
false
false
false
false
false
0
array_read_int() { fprintf(out, " ; array_read_int()\n"); if (stack == 0) { //fprintf(out, " sal %s, 2\n", REG_STACK(reg-1)); fprintf(out, " mov %s, [%s+%s*4]\n", REG_STACK(reg-2), REG_STACK(reg-2), REG_STACK(reg-1)); reg--; } else if (stack == 1) { fprintf(out, " pop ebx\n"); /...
false
false
false
false
false
0
WriteError(char const * const uuid, std::string const &message, FILE* output) { fprintf(output, "Error: %s\n", uuid); fprintf(output, "Message: %s\n\n", SubstVar(SubstVar(message, "\n\n", "\n.\n"), "\n", "\n ").c_str()); return true; }
false
false
false
false
false
0
to_base64(unsigned char *out, const unsigned char *in, size_t len, size_t olen) { while (len >= 3 && olen > 10) { *out++ = base64[in[0] >> 2]; *out++ = base64[((in[0] << 4) & 0x30) | (in[1] >> 4)]; *out++ = base64[((in[1] << 2) & 0x3c) | (in[2] >> 6)]; *out++ = base64[in[2] & 0x3f]; olen -= 4; len -= 3;...
false
false
false
false
false
0
get_fg_tile_info(int tile_index) { int code = f1gp_fgvideoram[tile_index]; SET_TILE_INFO(0,code & 0x7fff,0,(code & 0x8000)?TILE_FLIPY:0) }
false
false
false
false
false
0
gst_ssim_query_duration (GstSSim * ssim, GstQuery * query) { gint64 max, min; gboolean res; GstFormat format; GstIterator *it; gboolean done; /* parse format */ gst_query_parse_duration (query, &format, NULL); max = -1; min = G_MAXINT64; res = TRUE; done = FALSE; it = gst_element_iterate_sink...
false
false
false
false
false
0
chess_state_can_move (ChessState* self, ChessPlayer* player) { gboolean result = FALSE; gboolean have_pieces; gboolean _tmp27_; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (player != NULL, FALSE); have_pieces = FALSE; { gint start; start = 0; { gboolean _tmp0_; _tmp0_ = TRUE; ...
false
false
false
false
false
0
blitter_line_decx (void) { if (blinea_shift-- == 0) { blinea_shift = 15; bltcpt -= 2; } }
false
false
false
false
false
0
timeout(func, arg, secs, usecs) void (*func) __P((void *)); void *arg; int secs, usecs; { struct callout *newp, *p, **pp; /* * Allocate timeout. */ if ((newp = (struct callout *) malloc(sizeof(struct callout))) == NULL) fatal("Out of memory in timeout()!"); newp->c_arg = arg; ...
false
false
false
true
false
1
dinkc_bindings_quit() { if (bindings != NULL) hash_free(bindings); bindings = NULL; int i = 0; for (; i < 10; i++) { if (slist[i] != NULL) free(slist[i]); slist[i] = NULL; } }
false
false
false
false
false
0
macro_free(struct macro *macro) { struct macro *previous = NULL, *mac, *next; if (!macro) return; if (recording) recording = NULL; else if (macro_is_playing(macro)) macros_abort(); for (mac = macros; mac != macro; previous = mac, mac = next) { next = mac->next; if (mac == macro) if (previous) prev...
false
false
false
false
false
0
read_byte(std::ifstream& file) { if (!file.good()) return 0; unsigned char c; file.read((char*) &c, 1); return c; }
false
false
false
false
false
0
checkIfReply (PR *pr, ErrorDesc *err) { char *prID; char *prCat; AdmEntry *cat; const char *headerValue; struct re_pattern_buffer regex; struct re_registers regs; int i, len; reg_syntax_t old_syntax; headerValue = header_value (pr, SUBJECT); if (headerValue == NULL || *headerValue == '\0') { ...
false
false
false
false
false
0
simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *count) { struct vfsmount *mnt = NULL; spin_lock(&pin_fs_lock); if (unlikely(!*mount)) { spin_unlock(&pin_fs_lock); mnt = vfs_kern_mount(type, MS_KERNMOUNT, type->name, NULL); if (IS_ERR(mnt)) return PTR_ERR(mnt); spin_lock(&pin_fs_...
false
false
false
false
false
0
Write (ostream& out) { GraphicComp::Write(out); Iterator i; int count = 0; Graphic* g = GetGraphic(); for (First(i); !Done(i); Next(i), ++count); out << count << "\n"; for (First(i); !Done(i); Next(i)) { GraphicComp* comp = GetComp(i); unidraw->GetCatalog()->WriteComponent(...
false
false
false
false
false
0
message_create_record(record, body) struct index_record *record; struct body *body; { if (!record->internaldate) { if (config_getenum(IMAPOPT_INTERNALDATE_HEURISTIC) == IMAP_ENUM_INTERNALDATE_HEURISTIC_RECEIVEDHEADER && body->received_date) record->internaldate = message_parse_date( body->receiv...
false
false
false
false
false
0
_ipAddressTable_undo_setup_column(ipAddressTable_rowreq_ctx * rowreq_ctx, int column) { int rc = SNMPERR_SUCCESS; DEBUGMSGTL(("internal:ipAddressTable:_ipAddressTable_undo_setup_column", "called for %d\n", column)); netsnmp_assert(NULL != rowreq_ctx); swi...
false
false
false
false
false
0
write(hsStream* S, plResManager* mgr) { plMessageWithCallbacks::write(S, mgr); fCmd.write(S); if (S->getVer().isUru() || S->getVer().isUniversal()) { S->writeFloat(fBegin); S->writeFloat(fEnd); S->writeFloat(fLoopEnd); S->writeFloat(fLoopBegin); S->writeFloat(fSpeed)...
false
false
false
false
false
0
GenerateAssetstoreFilename(const char* assetstore) { srand ( (unsigned int)time(NULL) ); // Generate a 40 characters long string std::stringstream randomchars; for(unsigned int i=0;i<40;i++) { randomchars << rand() % 10; } std::string filename = randomchars.str(); std::string directory = ass...
false
false
false
false
false
0
insertNewFieldDef (DatabaseInfo database, FieldDef field) { DatabaseFieldInfo *dinfoPtr = getDatabaseFieldInfoWrite (database); DatabaseFieldInfo dinfo = *dinfoPtr; field->database = database; if (dinfoPtr == NULL) { abort (); } if (dinfo == NULL) { dinfo = (*dinfoPtr = (Data...
false
false
false
false
false
0
MyRandom(int UpperBound) { if (!UpperBound) return 0; float tmp; int PureRandom; int dice_val; /* the result in [0, UpperBound] */ PureRandom = rand(); tmp = 1.0 * PureRandom / RAND_MAX; /* random number in [0;1] */ /* * we always round OFF for the resulting int, therefore * we first add 0.99999 to m...
false
false
false
false
false
0
mxl1x1sf_demod_get_tps_code_rate(struct mxl111sf_demod_state *state, enum fe_code_rate *code_rate) { u8 val; int ret = mxl111sf_demod_read_reg(state, V6_CODE_RATE_TPS_REG, &val); /* bit<2:0> - 000:1/2, 001:2/3, 010:3/4, 011:5/6, 100:7/8 */ if (mxl_fail(ret)) goto fail; switch (val & V6_CODE_RATE_TPS_MA...
false
false
false
false
false
0
init_level(dgn, proto_index, pd) int dgn, proto_index; struct proto_dungeon *pd; { s_level *new_level; struct tmplevel *tlevel = &pd->tmplevel[proto_index]; pd->final_lev[proto_index] = (s_level *) 0; /* no "real" level */ #ifdef WIZARD if (!wizard) #endif if (tlevel->chance <= rn2(100)) return; pd->final...
false
false
false
false
false
0
openWallet(const QString& name, WId w, OpenType ot) { if( w == 0 ) kDebug(285) << "Pass a valid window to KWallet::Wallet::openWallet()."; #ifdef HAVE_KSECRETSSERVICE if (walletLauncher->m_useKSecretsService) { Wallet *wallet = new Wallet(-1, name); // FIXME: should we specify CreateCol...
false
false
false
false
false
0
photos_view_model_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PhotosViewModel *self = PHOTOS_VIEW_MODEL (object); PhotosViewModelPrivate *priv = self->priv; switch (prop_id) { case PROP_MODE: priv->mode = (PhotosWindowMode) g_value_get_enum (value); ...
false
false
false
false
false
0
next(){ if(!m_primed) { cerr << "Enumerating an unprimed HypPackEnumerator" << endl; exit(1); } for (size_t i = 0; i < m_num_lists; ++i) { ++m_featureDataIters[i]; ++m_scoreDataIters[i]; } m_sentenceId++; if(m_sentenceId % 100 == 0) cerr << "."; if(!finished()) prime(); }
false
false
false
false
false
0
dcmtk_import(const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { GList * data_sets=NULL; gboolean is_dir=FALSE; DcmFileFormat dcm_format; DcmMetaInfo * dcm_metainfo; OFCondition result; const char * re...
false
false
false
false
false
0
handle_read (int fd_) { trace("BTReader::handle_read"); IPv4Socket& s = *this; if (s.getHandler () != fd_) return -1; char buf[81]; register int len; while ((len = s.read (buf, 80)) > 0) { buf[len] = '\0'; cout << buf; } cout << flush; return BYTES_LEFT_IN_SOCKBUF(s); }
false
false
false
false
false
0
replace_daemon_at (const gchar *directory) { gboolean ret; /* * The first control_directory is the environment one, always * prefer that since it's the one that ssh and gpg will connect to */ if (control_directory == NULL) control_directory = g_strdup (directory); ret = gkd_control_quit (directory, GKD_CO...
false
false
false
false
false
0
keyString() const { if ( d->_name.isValid() ) { if ( d->_name.type() == QVariant::String ) { return d->_name.toString(); } else { return mapiNamedTagString( d->_name.toUInt(), d->_key ); } } else { return mapiTagString( d->_key ); } }
false
false
false
false
false
0
init() { MANGOS_ASSERT(!m_pTrans); // if we will get a nested transaction request - we MUST fix code!!! m_pTrans = new SqlTransaction; return m_pTrans; }
false
false
false
false
false
0
set_wear() { #ifdef TOURIST if (uarmu) (void) Shirt_on(); #endif if (uarm) (void) Armor_on(); if (uarmc) (void) Cloak_on(); if (uarmf) (void) Boots_on(); if (uarmg) (void) Gloves_on(); if (uarmh) (void) Helmet_on(); if (uarms) (void) Shield_on(); }
false
false
false
false
false
0
createRoom(const std::string &name) { if (!m_lobby->getConnection()->isConnected()) { error() << "creating room in room " << m_roomId << ", but connection is down"; return NULL; } Create cr; cr->setFrom(m_lobby->getAccount()->getId()); cr->setTo(m_roomId); cr->setSeria...
false
false
false
false
false
0
arm_mbo(struct mbo *mbo) { unsigned long flags; struct most_c_obj *c; BUG_ON((!mbo) || (!mbo->context)); c = mbo->context; if (c->is_poisoned) { trash_mbo(mbo); return; } spin_lock_irqsave(&c->fifo_lock, flags); ++*mbo->num_buffers_ptr; list_add_tail(&mbo->list, &c->fifo); spin_unlock_irqrestore(&c->fi...
false
false
false
false
false
0
mc13xxx_led_probe_dt( struct platform_device *pdev) { struct mc13xxx_leds *leds = platform_get_drvdata(pdev); struct mc13xxx_leds_platform_data *pdata; struct device_node *parent, *child; struct device *dev = &pdev->dev; int i = 0, ret = -ENODATA; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pda...
false
false
false
false
false
0
gst_jasper_enc_chain (GstPad * pad, GstBuffer * buf) { GstJasperEnc *enc; GstFlowReturn ret = GST_FLOW_OK; GstBuffer *outbuf = NULL; guint8 *data; gboolean discont = FALSE; enc = GST_JASPER_ENC (gst_pad_get_parent (pad)); if (enc->fmt < 0) goto not_negotiated; GST_LOG_OBJECT (enc, "buffer with ts...
false
false
false
false
false
0
_GD_DoLinterp(DIRFILE *D, gd_entry_t* E, off64_t first_samp, size_t num_samp, gd_type_t return_type, void *data_out) { size_t n_read = 0; double* data_in; dtrace("%p, %p, %lli, %zu, 0x%x, %p", D, E, first_samp, num_samp, return_type, data_out); if (E->e->u.linterp.table_len < 0) { _GD_ReadLinter...
false
false
false
false
false
0
nextGame() { char c; while ((c = readChar()) != 0) { if (c == '[') { rewindChar(); m_phase = InTags; return true; } } return false; }
false
false
false
false
false
0
CreateFromInput(Address* owner, const string& data, Address* start) { Changelist* out = new Changelist(current_changelist_number_++, owner); int i; for (i = 0; i < data.size() && start!=0; i++) { //cout << start << endl; out->add_change(start, data[i]); start = start->get_next(); } if (i != data.s...
false
false
false
false
false
0
s5c73m3_oif_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_mbus_frame_desc *fd) { struct s5c73m3 *state = oif_sd_to_s5c73m3(sd); int i; if (pad != OIF_SOURCE_PAD || fd == NULL) return -EINVAL; mutex_lock(&state->lock); fd->num_entries = 2; for (i = 0; i < fd->num_entries; i++) fd...
false
false
false
false
false
0
sftp_recv(void) { struct sftp_packet *pkt; char x[4]; unsigned char uc; if (!sftp_recvdata(x, 4)) { fxp_internal_error("sftp_recvdata failed, could not receive packet length"); return NULL; } pkt = snew(struct sftp_packet); pkt->savedpos = 0; pkt->length = pkt->maxlen = GET_32BIT(x);...
false
false
false
false
false
0
ebt_get_mac_and_mask(const char *from, unsigned char *to, unsigned char *mask) { char *p; int i; struct ether_addr *addr; if (strcasecmp(from, "Unicast") == 0) { memcpy(to, mac_type_unicast, ETH_ALEN); memcpy(mask, msk_type_unicast, ETH_ALEN); return 0; } if (strcasecmp(from, "Multicast") == 0) { memcp...
false
true
false
false
false
1
extraJoin(double facExtra, Event& event) { // Keep on looping while pairs found below joining threshold. int nJoin = 0; int iPsize = iParton.size(); while (iPsize > 2) { // Look for the pair of neighbour partons (along string) with // the smallest invariant mass (subtracting quark masses). int i...
false
false
false
false
false
0
Load(const Barry::GlobalConfigFile &config, const std::string &group_name) { string key = MakeBaseKey(group_name); m_favour_plugin_name = config.GetKey(key + "FavourPlugin"); string num = config.GetKey(key + "LastSyncTime"); m_last_sync_time = atol(num.c_str()); using OpenSync::Config::PSTString2Type; using ...
false
false
false
false
false
0
gst_tag_list_add_value (GstTagList * list, GstTagMergeMode mode, const gchar * tag, const GValue * value) { g_return_if_fail (GST_IS_TAG_LIST (list)); g_return_if_fail (gst_tag_list_is_writable (list)); g_return_if_fail (GST_TAG_MODE_IS_VALID (mode)); g_return_if_fail (tag != NULL); gst_tag_list_add_valu...
false
false
false
false
false
0
consys_free (consys_struct *consys) /* This routine frees the space allocated for a constraint system. Sigh. The trouble with complex data structures is they're a pain to disassemble. Parameter: consys: constraint system Returns: undefined */ { int ndx ; attvhdr_struct *attvhdr ; lnk_struct *lnk ;...
false
false
false
false
false
0
parse_whitespace_option(const char *option) { if (!option) { new_whitespace = warn_on_whitespace; return; } if (!strcmp(option, "warn")) { new_whitespace = warn_on_whitespace; return; } if (!strcmp(option, "nowarn")) { new_whitespace = nowarn_whitespace; return; } if (!strcmp(option, "error")) { ne...
false
false
false
false
false
0
NewConn(int sd) /* construct */ { struct cfd_connection *conn; #if defined HAVE_PTHREAD_H && (defined HAVE_LIBPTHREAD || defined BUILDTIN_GCC_THREAD) if (pthread_mutex_lock(&MUTEX_SYSCALL) != 0) { CfLog(cferror,"pthread_mutex_lock failed","lock"); } #endif conn = (struct cfd_connection *) malloc(sizeo...
false
false
false
true
false
1
print_stack(stack) STACK *stack; { printf("Stack: "); if (stack_empty(stack)) printf("(empty)\n"); else { list_traverse(stack, (char *) 0, print_element, (LIST_FRNT | LIST_FORW | LIST_SAVE)); printf("\n"); } }
false
false
false
false
false
0
environment_attr_handler(profile_state_t *psp, const char **attr) { int i; profile_environment_t *pep; #ifdef DEBUG printf("==> environment_attr_handler()\n"); #endif pep = (profile_environment_t *)calloc(1, sizeof(profile_environment_t)); pep->pe_type = -1; for (i = 0; attr[i] != NULL; i += 2) { if (strcmp...
false
false
false
false
false
0
qping_set_output_option(char* option_string) { char* option = NULL; char* value1 = NULL; char* value2 = NULL; int opt = 0; option = strstr(option_string, ":"); if (option) { option[0]=0; if (strcmp(option_string,"h") == 0) { opt = 1; option++; value1=option; ...
false
false
false
false
true
1
dec_factor(double dec) { if (cos(dec) > 0.2) return (1.0 / cos(dec)); else return 5.0; }
false
false
false
false
false
0
_system_remove(HSQUIRRELVM v) { const SQChar *s; sq_getstring(v,2,&s); if(scremove(s)==-1) return sq_throwerror(v,_SC("remove() failed")); return 0; }
false
false
false
false
false
0
led_delay_off_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct led_classdev *led_cdev = dev_get_drvdata(dev); unsigned long state; ssize_t ret = -EINVAL; ret = kstrtoul(buf, 10, &state); if (ret) return ret; led_blink_set(led_cdev, &led_cdev->blink_delay_on, &s...
false
false
false
false
false
0
snb_uncore_imc_event_start(struct perf_event *event, int flags) { struct intel_uncore_box *box = uncore_event_to_box(event); u64 count; if (WARN_ON_ONCE(!(event->hw.state & PERF_HES_STOPPED))) return; event->hw.state = 0; box->n_active++; list_add_tail(&event->active_entry, &box->active_list); count = snb_...
false
false
false
false
false
0
varint_to_int32( uint8_t* integer, size_t* bytes ) { int32_t result = 0; uint32_t* p_result = NULL; uint8_t* p_num = NULL; p_num = integer; p_result = (uint32_t*)(&result); *bytes = 0; *p_result |= (*p_num >> 2) & 0x0000001f; *bytes += 1; if (!(*p_num & 0x80)) { if (*p_...
false
false
false
false
false
0
DXLSend(DXLConnection *conn, const char *string) { DXLPacketTypeEnum ptype=PACK_FOREGROUND; if (conn->dxuiConnected) { if (conn->majorVersion <= 2) ptype = PACK_FOREGROUND; else ptype = PACK_LINK; return DXLSendPacket(conn, ptype, string) >= 0 ? OK : ERROR; } else if (conn->macroDef) {...
false
false
false
false
true
1
newPlugin(PluginBinary *pb, int pi, const std::string &api, int apiVersion, const std::string &pluginId, const std::string &rawId, int pluginMajorVersion, int pluginMinorVersion) { ImageEffectPlugin *plugin = new ImageEffectPlugin(*this, pb, pi, api...
false
false
false
false
false
0
free(int bytes) { totalSize -= bytes; Q_ASSERT(totalSize >= 0); forever { int nbs = readSize(); if (bytes < nbs) { head += bytes; if (head == tail && buffers.count() == 1) { buffers.first().resize(CHUNKSIZE); ...
false
false
false
false
false
0
gst_registry_lookup (GstRegistry * registry, const char *filename) { GstPlugin *plugin; gchar *basename; g_return_val_if_fail (GST_IS_REGISTRY (registry), NULL); g_return_val_if_fail (filename != NULL, NULL); basename = g_path_get_basename (filename); if (G_UNLIKELY (basename == NULL)) return NULL; ...
false
false
false
false
false
0
fs_uae_reconfigure_input_ports_amiga() { fs_emu_log("fs_uae_reconfigure_input_ports_amiga\n"); int modes = INPUTEVENT_AMIGA_JOYPORT_MODE_0_LAST - INPUTEVENT_AMIGA_JOYPORT_MODE_0_NONE + 1; //for (int i = 0; i < FS_UAE_NUM_INPUT_PORTS; i++) { // only the 4 real ports are reconfigured via input...
false
false
false
false
false
0
pfs_process_may_wake( struct pfs_process *parent, struct pfs_process *child ) { if(child->ppid == parent->pid ) { if( (child->state==PFS_PROCESS_STATE_DONE) || ( (child->state==PFS_PROCESS_STATE_WAITPID) && (parent->wait_options&WUNTRACED)) ) { if(parent->state==PFS_PROCESS_STATE_WAITPID) { if( (parent-...
false
false
false
false
false
0
nemo_file_get_deep_count_as_string_internal (NemoFile *file, gboolean report_size, gboolean report_directory_count, gboolean report_file_count) { NemoRequestStatus status; guint directory_count; guint file_count; guint unreadable_count; guint hidden_count; guint total_count; goffset total...
false
false
false
false
false
0
rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) { s32 index; struct list_head *phash_list; struct sta_info *psta; struct __queue *pfree_sta_queue; struct recv_reorder_ctrl *preorder_ctrl; int i = 0; u16 wRxSeqInitialValue = 0xffff; pfree_sta_queue = &pstapriv->free_sta_queue; spin_lock_bh(&(pfree_...
false
false
false
false
false
0
getChar() { d->reset(); if(!d->start(true)) { QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); return; } }
false
false
false
false
false
0
luaB_cocreate (lua_State *L) { lua_State *NL = lua_newthread(L); luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, "Lua function expected"); lua_pushvalue(L, 1); /* move function to top */ lua_xmove(L, NL, 1); /* move function from L to NL */ return 1; }
false
false
false
false
false
0
H5I_remove(hid_t id) { H5I_id_type_t *type_ptr; /*ptr to the atomic type */ H5I_id_info_t *curr_id; /*ptr to the current atom */ H5I_id_info_t *last_id; /*ptr to the last atom */ H5I_id_info_t *tmp_id_ptr; /*temp ptr to next atom */ H5I_type_t type; /*atom's atomic type */ unsigned ha...
false
false
false
false
false
0
gdm_session_handle_client_select_user (GdmDBusGreeter *greeter_interface, GDBusMethodInvocation *invocation, const char *username, GdmSession *self) { if (self->priv-...
false
false
false
false
false
0
folder_is_target_of_nick(char *longname, CONTEXT_S *cntxt) { register int i = 0; FOLDER_S *f; FLIST *flist = NULL; if(cntxt && cntxt == ps_global->context_list) flist = FOLDERS(cntxt); if(!(longname && *longname && flist)) return(NULL); while((f = folder_entry(i, flist)) != NULL...
false
false
false
false
false
0
find_loopbreaker_genotypes(ped,i, loopmax) int ped; int i; int *loopmax; { int geno, nextgeno; /*loop indices*/ int temploopmax; /*placeholder for value of loopmax[i]*/ thisarray *WITH1; /*placeholder for loop breaker genarray*/ if (i < num_loops[ped -1]) { WITH1 = looppers[ped - 1][i][0]->gen; for(gen...
false
false
false
false
true
1
closest_seq(blist) struct blocks_list *blist; { Block *block; int npair, s1, i; int aaint, qres, maxscore, maxs1; struct pair *pairs; /*SGI delete above declaration of pairs and use fixed below */ /*SGI struct pair pairs[MAXSEQS*(MAXSEQS-1)/2]; */ block = blist->block; qres = blist->binfo->query...
false
true
false
false
false
1
da9055_gpio_init(struct da9055_regulator *regulator, struct regulator_config *config, struct da9055_pdata *pdata, int id) { struct da9055_regulator_info *info = regulator->info; int ret = 0; if (!pdata) return 0; if (pdata->gpio_ren && pdata->gpio_ren[id]) { char name[18]; int gpio_mux = pdata...
false
false
false
false
false
0
solve(Input& problem, ClaspConfig& config, IncrementalControl* inc, Callback* c) { init(problem, config, inc, c); const bool onlyPre = config.enumerate.onlyPre; AutoState outer(this, state_start); LitVec assume; do { if (inc) { inc->initStep(*this); } result_ = result_unknown; more_ = true; if (confi...
false
false
false
false
false
0
HandleLinkGraveCommand(char* args) { uint32 g_id; if (!ExtractUInt32(&args, g_id)) { return false; } char* teamStr = ExtractLiteralArg(&args); Team g_team; if (!teamStr) { g_team = TEAM_BOTH_ALLOWED; } else if (strncmp(teamStr, "horde", strlen(teamStr)) == 0) { g_team =...
false
false
false
false
false
0
flmCurPrep( CURSOR * pCursor) { RCODE rc = FERR_OK; FLMBOOL bStratified; // Make sure we are in a good state. If pCursor->rc is bad, // we should not attempt to optimize, because we may crash. if (RC_BAD( pCursor->rc)) { rc = pCursor->rc; goto Exit; } // Finish the query and partition it. // Return e...
false
false
false
false
false
0