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
mvumi_release_mem_resource(struct mvumi_hba *mhba) { struct mvumi_res *res, *tmp; list_for_each_entry_safe(res, tmp, &mhba->res_list, entry) { switch (res->type) { case RESOURCE_UNCACHED_MEMORY: pci_free_consistent(mhba->pdev, res->size, res->virt_addr, res->bus_addr); break; case RESOURCE_CACHED_M...
false
false
false
false
false
0
cb_program(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { struct program *prog; void **pdata = cb_data; switch (cmd) { case grecs_callback_section_begin: if (!value || value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("tag ...
false
false
false
false
false
0
ACL_MethodRegister(NSErr_t *errp, const char *name, ACLMethod_t *t) { ACLMethod_t rv; ACL_CritEnter(); /* See if this is already registered */ rv = (ACLMethod_t) PR_HashTableLookup(ACLMethodHash, name); if (rv != NULL) { *t = rv; ACL_CritExit(); return 0; } /* To prevent the ...
false
false
false
false
false
0
add_string2d( render2d *s, double *xinc, /* Add increment to next character */ double *yinc, font2d fo, /* Font to use */ char *string, /* Character code to be printed */ double x, double y, /* Location of bottom left of normal orientation text */ double h, /* Height of text in normal orientation */ int or, /*...
false
false
false
false
false
0
complete_read_buffer (GcrParsing *self, gssize count, GError *error) { g_assert (GCR_IS_PARSING (self)); g_assert (self->buffer); /* A failure */ if (count == -1) { g_propagate_error (&self->error, error); next_state (self, state_failure); } else { g_return_if_fail (count >= 0 && count <= BLOCK); g_byte_...
false
false
false
false
false
0
itoa( t_CKINT val ) { char buffer[128]; sprintf( buffer, "%li", val ); return string(buffer); }
false
false
false
false
false
0
parse_capture_source(struct hda_codec *codec, hda_nid_t pin, int cfg_idx, int num_adcs, const char *label, int anchor) { struct hda_gen_spec *spec = codec->spec; struct hda_input_mux *imux = &spec->input_mux; int imux_idx = imux->num_items; bool imux_added = false; int c; for (c = 0; c < num_adcs; c++) {...
false
false
false
false
false
0
muscle_syncline_grow (char const *key, location loc) { char *extension = NULL; obstack_printf (&muscle_obstack, "]b4_syncline(%d, ", loc.start.line); obstack_quote (&muscle_obstack, quotearg_style (c_quoting_style, loc.start.file)); obstack_sgrow (&muscle_obstack, ")["); extension = obstack_f...
false
false
false
false
false
0
SN76496_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { int i; int chan = -1; #if 0 fprintf(stderr, "Note [%02x : %02x %02x]\n", command, argc?argv[0] : 0, (argc > 1)? argv[1] : 0); #endif if ((command & 0xe0) == 0x80) { int chan_nr = command & 0xf; /* First, test for channel having been assi...
false
false
false
false
true
1
string_list_pos_params (pchar, list, quoted) int pchar; WORD_LIST *list; int quoted; { char *ret; WORD_LIST *tlist; if (pchar == '*' && (quoted & Q_DOUBLE_QUOTES)) { tlist = quote_list (list); word_list_remove_quoted_nulls (tlist); ret = string_list_dollar_star (tlist); }...
false
false
false
false
false
0
ixgbe_set_dcb_sriov_queues(struct ixgbe_adapter *adapter) { int i; u16 vmdq_i = adapter->ring_feature[RING_F_VMDQ].limit; u16 vmdq_m = 0; #ifdef IXGBE_FCOE u16 fcoe_i = 0; #endif u8 tcs = netdev_get_num_tc(adapter->netdev); /* verify we have DCB queueing enabled before proceeding */ if (tcs <= 1) return false...
false
false
false
false
false
0
set_path_length(__isl_take isl_map *map, int exactly, int length) { isl_space *dim; struct isl_basic_map *bmap; unsigned d; unsigned nparam; int k; isl_int *c; if (!map) return NULL; dim = isl_map_get_space(map); d = isl_space_dim(dim, isl_dim_in); nparam = isl_space_dim(dim, isl_dim_param); bmap = isl_...
false
false
false
false
false
0
preempt(int preempt_type, int reason) { bool remove=false; switch (preempt_type) { case REMOVE_NEVER: remove = false; break; case REMOVE_MAYBE_USER: case REMOVE_MAYBE_SCHED: // GPU jobs: always remove from mem, since it's tying up GPU RAM // if (result->uses_...
false
false
false
false
false
0
names_from_string(name_table * nt, const ref * psref, ref * pnref) { int exec = r_has_attr(psref, a_executable); int code = names_ref(nt, psref->value.bytes, r_size(psref), pnref, 1); if (code < 0) return code; if (exec) r_set_attrs(pnref, a_executable); return code; }
false
false
false
false
false
0
modsin_date( xml *node, fields *info, int level, int part ) { /* char *month[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };*/ newstr s; char *p = NULL; /* int m;*/ if ( node->value ) p = node->value->data; if ( p ) { newstr_i...
false
false
false
false
false
0
release_bts_buffer(int cpu) { struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds; if (!ds || !x86_pmu.bts) return; dsfree((void *)(unsigned long)ds->bts_buffer_base, BTS_BUFFER_SIZE); ds->bts_buffer_base = 0; }
false
false
false
false
false
0
bus_engine_proxy_real_update_property (BusEngineProxy *engine, IBusProperty *prop) { g_return_if_fail (prop); if (engine->prop_list) ibus_prop_list_update_property (engine->prop_list, prop); }
false
false
false
false
false
0
allocate_bufs(void) { int i; int bufsize; bufsize = (G_window_cols() + 2 * ncb.nsize) * sizeof(DCELL); ncb.buf = (DCELL **) G_malloc(ncb.nsize * sizeof(DCELL *)); for (i = 0; i < ncb.nsize; i++) { ncb.buf[i] = (DCELL *) G_malloc(bufsize); G_set_d_null_value(ncb.buf[i], G_window_cols() + 2 * ncb....
false
false
false
false
false
0
ParseLine(char *line) { static bool inExtension = false; static int ifLevel = 0; Tokenizer tokens(line); std::string firstToken = tokens.GetNextToken(); if (Extension::isExtension(line)) { currentExtension = Extension(line); #ifdef DEBUG_PARSE cerr << "Recognized extension: " << line << endl; #e...
false
false
false
false
false
0
schedule(struct ast_sched_context *con, struct sched *s) { ast_heap_push(con->sched_heap, s); if (!ast_hashtab_insert_safe(con->schedq_ht, s)) { ast_log(LOG_WARNING,"Schedule Queue entry %d is already in table!\n", s->id); } con->schedcnt++; if (con->schedcnt > con->highwater) { con->highwater = con->schedc...
false
false
false
false
false
0
numa_set_distance(int from, int to, int distance) { if (!numa_distance && numa_alloc_distance() < 0) return; if (from >= numa_distance_cnt || to >= numa_distance_cnt || from < 0 || to < 0) { pr_warn_once("NUMA: Warning: node ids are out of bound, from=%d to=%d distance=%d\n", from, to, distance); ret...
false
false
false
false
false
0
getElement(int index, DirectedBodyElement& dbe) { int direction = 1; if ( index < 0 || index >= nofElements ) { dbe.element = NULL; } else { int elem_id = elementIds[index]; if (elem_id < 0) { direction = -1; elem_id = -1 * elem_id; } dbe.element = getBodyElementById(elem_id);...
false
false
false
false
false
0
chipset_init(struct cc770_priv *priv) { int mo, id, data; /* Enable configuration and put chip in bus-off, disable interrupts */ cc770_write_reg(priv, control, (CTRL_CCE | CTRL_INI)); /* Set CLKOUT divider and slew rates */ cc770_write_reg(priv, clkout, priv->clkout); /* Configure CPU interface / CLKOUT enable...
false
false
false
false
false
0
HtmlNodeIndexOfChild(pParent, pChild) HtmlNode *pParent; HtmlNode *pChild; { int ii; for (ii = 0; ii < HtmlNodeNumChildren(pParent); ii++) { if (HtmlNodeChild(pParent, ii) == pChild) return ii; } return -1; }
false
false
false
false
false
0
dsm_get(string blockId) throw (DsmException) { ostringstream outs; // Declare an output string stream. outs << "dsm_get " << this->nid << " " << blockId; this->send(outs.str()); char * content = NULL; long bytesRead = this->receive(content); DsmData data; data.size = bytesRead; data.addr ...
false
false
false
false
false
0
operator>>(QDataStream& stream, Country* country) { country->reset(); quint32 nbArmies, nbAddedArmies; QString ownerName; stream >> ownerName >> nbArmies >> nbAddedArmies; kDebug() << ownerName << nbArmies << nbAddedArmies; // country->owner(country->automaton()->playerNamed(ownerName)); return stream; } ...
false
false
false
false
false
0
test_diff_tree__larger_hunks(void) { const char *a_commit = "d70d245ed97ed2aa596dd1af6536e4bfdb047b69"; const char *b_commit = "7a9e0b02e63179929fed24f0a3e0f19168114d10"; size_t d, num_d, h, num_h, l, num_l, header_len, line_len; const git_diff_delta *delta; git_diff_patch *patch; const git_diff_range *range; co...
false
false
false
false
false
0
requires_tex_pdf(CmdLineArgSet* device, CmdLineObj* cmdline) { if (!cmdline->hasOption(GLE_OPT_CREATE_INC)) { if (device->hasValue(GLE_DEVICE_PDF)) return true; } if (hasGenerated(GLE_DEVICE_PDF)) { if (device->hasValue(GLE_DEVICE_JPEG)) return true; if (device->hasValue(GLE_DEVICE_PNG)) return true; } retur...
false
false
false
false
false
0
qla8044_watchdog(struct scsi_qla_host *vha) { uint32_t dev_state, halt_status; int halt_status_unrecoverable = 0; struct qla_hw_data *ha = vha->hw; /* don't poll if reset is going on or FW hang in quiescent state */ if (!(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || test_bit(FCOE_CTX_RESET_NEEDED, &vha->dp...
false
false
false
false
false
0
bet_historical_set_empty_sub_div ( GtkTreeModel *model, GtkTreeIter *parent ) { GtkTreeIter fils_iter; if ( gtk_tree_model_iter_children ( GTK_TREE_MODEL ( model ), &fils_iter, parent ) ) { gchar *str_amount; gint account_nb; gint div_number; gint sub_div_nb; do ...
false
false
false
false
false
0
addWord( const UChar *word, int32_t length, UErrorCode &status ) { #if 0 if (length <= 0) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } #endif TernaryNode *parent; UBool pMatched; int count; fIter = utext_openUChars...
false
false
false
true
false
1
is_temporary_mirror_layer(const struct logical_volume *lv) { if (lv->status & MIRROR_IMAGE && lv->status & MIRRORED && !(lv->status & LOCKED)) return 1; return 0; }
false
false
false
false
false
0
L109() {register object *base=vs_base; register object *sup=base+VM109; VC109 vs_reserve(VM109); ihs_check; {object V565; check_arg(1); V565=(base[0]); vs_top=sup; goto TTL; TTL:; base[1]=symbol_function(((object)VV[336])); base[3]=symbol_function(((object)VV[286])); base[4]= (V565); vs_top=(vs_base=base+4)...
false
false
false
false
false
0
jdns_error(int id, QJDns::Error e) { QJDns *jdns = (QJDns *)sender(); JDnsSharedRequest *obj = findRequest(jdns, id); Q_ASSERT(obj); // "cancel" it for(int n = 0; n < obj->d->handles.count(); ++n) { Handle h = obj->d->handles[n]; if(h.jdns == jdns && h.id == id) { obj->d->handles.removeAt(n); request...
false
false
false
false
false
0
_CON_AppendChar( char new_char ) { int lStart = _CON_FindLineStart( CON_console.curLine ); CON_console.text[ CON_console.curLine ][ CON_console.offset ] = new_char; CON_console.offset = ( CON_console.offset + 1 ) % CON_LINE_LENGTH; CON_console.heights[ lStart ] = 0; if ( CON_console.offset == 0 ) { //...
false
false
false
false
false
0
rc_deptree_update_needed(time_t *newest, char *file) { bool newer = false; RC_STRINGLIST *config; RC_STRING *s; int i; /* Create base directories if needed */ for (i = 0; depdirs[i]; i++) if (mkdir(depdirs[i], 0755) != 0 && errno != EEXIST) fprintf(stderr, "mkdir `%s': %s\n", depdirs[i], strerror(errno)); ...
false
false
false
false
false
0
ff_posix_ioctl(int fd, int request, void * arg) { return ioctl(fd, request, arg) == 0 ? 0 : errno; }
false
false
false
false
false
0
__free_specify(struct mod_t *mdp) { struct spfy_t *spfp; spfp = mdp->mspfy; if (spfp->spfsyms != NULL) free_frozen_symtab(spfp->spfsyms); if (spfp->spcpths != NULL) free_spcpths(spfp->spcpths); if (spfp->tchks != NULL) __free_tchks(spfp->tchks); if (spfp->msprms != NULL) free_spcparms(spfp->msprms, spfp->sprmnum...
false
false
false
false
false
0
updateInfo(const DiscoItem &item) { copyItem( item ); if ( isRoot && !isVisible() ) setVisible (true); }
false
false
false
false
false
0
netfs_close(netfs_interface_t *this, UINTN fd) { netfs_priv_state_t *nfs; netfs_fd_t *f; if (this == NULL || fd >= NETFS_FD_MAX) return EFI_INVALID_PARAMETER; nfs = FS_PRIVATE(this); f = NETFS_FD2F(nfs, fd); if (NETFS_F_INVALID(f)) return EFI_INVALID_PARAMETER; netfs_fd_free(nfs, f); return EFI_SUCC...
false
false
false
false
false
0
__lambda4_ (FsoFrameworkTestMultiSignalWaiter* self) { guint _tmp0_ = 0U; guint _tmp1_ = 0U; GList* _tmp2_ = NULL; guint _tmp3_ = 0U; _tmp0_ = self->priv->succeeded_count; self->priv->succeeded_count = _tmp0_ + 1; _tmp1_ = self->priv->succeeded_count; _tmp2_ = self->priv->signals; _tmp3_ = g_list_length (_tmp2...
false
false
false
false
false
0
adapter_unlock1(char *FILE, int line, int aid) { adapter *ad; ad = get_adapter_nw(aid); if (!ad) return; mutex_unlock1(FILE, line, &ad->mutex); }
false
false
false
false
false
0
found_suffixed_cell( name, insert ) char *name; int insert; { int index; char *pt; pt = strrchr( name, '_' ); if( !pt ) { return NULL; } pt++; for( index = 0; index < nb_lib; index ++ ) { if( strcmp( pt, suffixes[index] ) == 0 ) { if( (!insert)...
false
false
false
false
false
0
snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode, unsigned int *ptr, u32 op, u32 r, u32 a, u32 x, u32 y) { u_int32_t *code; if (snd_BUG_ON(*ptr >= 1024)) return; code = (u_int32_t __force *)icode->code + (*ptr) * 2; set_bit(*ptr, icode->code_valid); code[0] = ((x & 0x7ff) << 12) | (y &...
false
false
false
false
false
0
filesys_hsync() { if (!uae_deterministic_mode()) { return; } //printf("%d\n", g_hsync_line++); static uint64_t counter = 0; static uint64_t next = 0; while (counter == next) { // set packet delay to default value of 10, which means to process // one packet every other hsy...
false
false
false
false
false
0
alloc_dhcpv6_option(uint16_t code, uint8_t *option, uint16_t len) { uint8_t *storage; storage = g_malloc(2 + 2 + len); if (storage == NULL) return NULL; storage[0] = code >> 8; storage[1] = code & 0xff; storage[2] = len >> 8; storage[3] = len & 0xff; memcpy(storage + 2 + 2, option, len); return storag...
false
false
false
false
false
0
ai_choose_paratrooper(struct player *pplayer, struct city *pcity, struct adv_choice *choice) { int profit; Tech_type_id tech_req; Tech_type_id requirements[A_LAST]; int num_requirements = 0; int i; /* military_advisor_choose_build does something idiotic, * this function should not be called if the...
false
false
false
false
false
0
ario_playlist_view_key_press_cb (GtkWidget *widget, GdkEventKey *event, ArioPlaylist *playlist) { ARIO_LOG_FUNCTION_START; if (event->keyval == GDK_Delete) { /* Del key removes songs from playlist */ ario_...
false
false
false
false
false
0
keyDown (uint32_t key) { switch (key) { case SDLK_DOWN: selectNextMenuOption (); break; case SDLK_ESCAPE: selectBackOption (); break; case SDLK_LEFT: (*m_SelectedOption)->previous (); break; case SDLK_RETURN: ...
false
false
false
false
false
0
i915_gem_userptr_dmabuf_export(struct drm_i915_gem_object *obj) { if (obj->userptr.mmu_object) return 0; return i915_gem_userptr_init__mmu_notifier(obj, 0); }
false
false
false
false
false
0
ifparser_getif(const char* iface) { if_block *curr = first; while(curr!=NULL) { if (strcmp(curr->type,"iface")==0 && strcmp(curr->name,iface)==0) return curr; curr = curr->next; } return NULL; }
false
false
false
false
false
0
wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *page_table, pmd_t *pmd, pte_t orig_pte, struct page *old_page) { struct page *new_page = NULL; spinlock_t *ptl = NULL; pte_t entry; int page_copied = 0; const unsigned long mmun_start = address & PAGE_MASK; /* For mm...
false
false
false
false
false
0
fb_changemode(FB_Mode *cur_mode, unsigned int width, unsigned int height, unsigned int pdepth, unsigned int refresh) { FB_Mode *modes; unsigned int i, num_modes; modes = fb_list_modes(&num_modes); if (modes) { for (i = 0; i < num_modes; i++) { if ((modes[i].width == w...
false
false
false
false
false
0
static_cell (GtkWidget *widget, void *data) { gamgi_window *window = GAMGI_CAST_WINDOW data; gamgi_cell *cell; GtkWidget *dialog = window->dialog0; GtkWidget *combo; int row; /***************** * get link mode * *****************/ combo = (GtkWidget *) g_object_get_data (G_OBJECT (dialog), "combo_method"); row = gt...
false
false
false
false
false
0
inet_pton6(const char *src, u_char *dst) { static const char xdigits[] = "0123456789abcdef"; u_char tmp[IN6ADDRSZ], *tp, *endp, *colonp; const char *curtok; int ch, saw_xdigit; u_int val; tp = memset(tmp, '\0', IN6ADDRSZ); endp = tp + IN6ADDRSZ; colonp = NULL; /* Leading :: requires some special handling. */ ...
false
true
false
true
false
1
_tpl_text_channel_prepare_core_async (TpProxy *proxy, const TpProxyFeature *feature, GAsyncReadyCallback callback, gpointer user_data) { TplTextChannel *self = (TplTextChannel *) proxy; if (!tp_proxy_has_interface_by_id (self, TP_IFACE_QUARK_CHANNEL_INTERFACE_MESSAGES)) { g_simple_a...
false
false
false
false
false
0
rtl_init_mdio_ops(struct rtl8169_private *tp) { struct mdio_ops *ops = &tp->mdio_ops; switch (tp->mac_version) { case RTL_GIGA_MAC_VER_27: ops->write = r8168dp_1_mdio_write; ops->read = r8168dp_1_mdio_read; break; case RTL_GIGA_MAC_VER_28: case RTL_GIGA_MAC_VER_31: ops->write = r8168dp_2_mdio_write; ops...
false
false
false
false
false
0
isLogFileOpen(const char* filename) const { CMT3LOG("L3: isLogFileOpen \"%s\"\n",filename?filename:""); if (m_logFile.isOpen()) { if (filename != NULL && filename[0] != 0) { char fn[CMT_MAX_FILENAME_LENGTH]; m_logFile.getName(fn); if (_strnicmp(filename,fn,CMT_MAX_FILENAME_LENGTH) != 0) return fals...
false
false
false
false
false
0
keyspan_print(struct usb_keyspan* dev) /*unsigned char* data)*/ { char codes[4 * RECV_SIZE]; int i; for (i = 0; i < RECV_SIZE; i++) snprintf(codes + i * 3, 4, "%02x ", dev->in_buffer[i]); dev_info(&dev->udev->dev, "%s\n", codes); }
false
false
false
false
false
0
setUDSEntry( const KIO::UDSEntry& _entry, const KUrl& _url, bool _delayedMimeTypes, bool _urlIsDirectory ) { if (!d) return; d->m_entry = _entry; d->m_url = _url; d->m_strName.clear(); d->m_strText.clear(); d->m_iconName.clear(); d->m_strLowerCaseName.cl...
false
false
false
false
false
0
btreeRemoveIdentEntryOne(AjPBtcache cache, ajulong pagepos, const AjPBtId btid) { AjPBtpage page = NULL; AjPIdbucket bucket = NULL; AjPStr *karray = NULL; ajulong *parray = NULL; ajulong blockno = 0UL; ajuint nkeys = 0U; ajuint nentries =...
false
false
false
false
false
0
is_address_protected (MonoJitInfo *ji, MonoJitExceptionInfo *ei, gpointer ip) { MonoTryBlockHoleTableJitInfo *table; int i; guint32 offset; guint16 clause; if (ei->try_start > ip || ip >= ei->try_end) return FALSE; if (!ji->has_try_block_holes) return TRUE; table = mono_jit_info_get_try_block_hole_table_i...
false
false
false
false
false
0
SDP_CheckConnection(GF_SDPConnection *conn) { if (!conn) return GF_BAD_PARAM; if (!conn->host || !conn->add_type || !conn->net_type) return GF_REMOTE_SERVICE_ERROR; if (gf_sk_is_multicast_address(conn->host)) { if (conn->TTL < 0 || conn->TTL > 255) return GF_REMOTE_SERVICE_ERROR; } else { conn->TTL = -1; conn...
false
false
false
false
false
0
collectRelocatedSymbols(const ObjectFile *Obj, const SectionRef &Sec, uint64_t SecAddress, uint64_t SymAddress, uint64_t SymSize, StringRef *I, StringRef *E) { uint64_t SymOffset = SymAddress - SecAddress; ui...
false
false
false
false
false
0
internal_nis_getservent_r (struct servent *serv, char *buffer, size_t buflen, int *errnop) { struct parser_data *pdata = (void *) buffer; int parse_res; char *p; if (intern.start == NULL) internal_nis_setservent (); if (intern.next == NULL) /* Not one entry in the map. */ return NSS_STATU...
false
false
false
false
false
0
find(int x, int y) { GtkTreePath *path; if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree->widget), x, y, &path, NULL, NULL, NULL)) return tree->pathToKey(path); else return NULL; }
false
false
false
false
false
0
open(const GooString *fileName) { #ifdef VMS int fd = ::open(fileName->getCString(), Q_RDONLY, "ctx=stm"); #else int fd = ::open(fileName->getCString(), O_RDONLY); #endif return fd < 0 ? NULL : new GooFile(fd); }
false
false
false
false
false
0
activation_message(object_type *o_ptr, const char *message) { char buf[1024] = "\0"; const char *next; const char *s; const char *tag; const char *in_cursor; size_t end = 0; in_cursor = message; next = strchr(in_cursor, '{'); while (next) { /* Copy the text leading up to this { */ strnfcat(buf, 1024, &e...
true
true
false
false
false
1
SPI_prepare_cursor(const char *src, int nargs, Oid *argtypes, int cursorOptions) { _SPI_plan plan; SPIPlanPtr result; if (src == NULL || nargs < 0 || (nargs > 0 && argtypes == NULL)) { SPI_result = SPI_ERROR_ARGUMENT; return NULL; } SPI_result = _SPI_begin_call(true); if (SPI_result < 0) return NU...
false
false
false
false
false
0
xml_write_tree_recursive(GNode *node, FILE *fp) { gint i, depth; XMLTag *tag; GList *cur; cm_return_val_if_fail(node != NULL, -1); cm_return_val_if_fail(fp != NULL, -1); depth = g_node_depth(node) - 1; for (i = 0; i < depth; i++) TRY(fputs(" ", fp) != EOF); tag = ((XMLNode *) node->data)->tag; TRY(fpr...
false
false
false
false
false
0
gee_hash_set_remove_helper (GeeHashSet* self, gconstpointer key) { gboolean result = FALSE; GeeHashSetNode** node = NULL; gconstpointer _tmp0_ = NULL; GeeHashSetNode** _tmp1_ = NULL; GeeHashSetNode** _tmp2_ = NULL; g_return_val_if_fail (self != NULL, FALSE); _tmp0_ = key; _tmp1_ = gee_hash_set_lookup_node (self...
false
false
false
false
false
0
as_read() { s_state ret = as_state; const int len = as_players->counter +1; struct pollfd as_ufds[len]; int i = 0; struct s_as_player *p = as_players->head; char *line; for (i = 0; i < len-1; SWITCH(p), i++) { as_ufds[i].fd = p->socket; as_ufds[i].events = POLLIN; as_ufds[i].revents = 0; } as_ufds[i]...
false
false
false
false
false
0
file_excluded_p (const char *name) { struct string_list *p; int len = strlen (name); for (p = exclude_list; p; p = p->next) if (!strcmp (name + len - strlen (p->name), p->name) && IS_DIR_SEPARATOR (name[len - strlen (p->name) - 1])) return 1; return 0; }
false
false
false
false
false
0
find_device(struct list_head *l, dev_t dev) { struct dm_dev_internal *dd; list_for_each_entry (dd, l, list) if (dd->dm_dev->bdev->bd_dev == dev) return dd; return NULL; }
false
false
false
false
false
0
_dmalloc_memcpy(const char *file, const int line, void *to, const void *from, const DMALLOC_SIZE len) { if (BIT_IS_SET(_dmalloc_flags, DEBUG_CHECK_FUNCS)) { if ((! dmalloc_verify_pnt(file, line, "memcpy", to, 0 /* not exact */, len)) || (! dmalloc_verify_pnt(file, line, "memcpy", from, 0 /* not...
false
false
false
false
false
0
set_pending_timer_val(int *val, u32 us) { u8 mult = 0; u8 shift = 0; if (us >= 0x3f) { mult = 1; /* mult with 4 */ shift = 2; } if (us >= 0x3f * 4) { mult = 2; /* mult with 16 */ shift = 4; } if (us >= 0x3f * 16) { mult = 3; /* mult with 64 */ shift = 6; } *val = (mult << 6) | ((us >> shift) & 0x...
false
false
false
false
false
0
generateLog(const std::string& dir) { //does directory have a .hg ? std::string hgdir = dir + std::string("/.hg"); struct stat dirinfo; int stat_rc = stat(hgdir.c_str(), &dirinfo); if(stat_rc!=0 || !(dirinfo.st_mode & S_IFDIR)) { return 0; } // do we have this client installed ...
false
false
false
false
false
0
ic_getoptval(int *p_argc, char **argv) { register int argc, index; if /* -s60 case, beyond_optchar is 's' */ ( icce_beyond_optchar /* option character found */ && /* and */ *icce_optval...
false
false
false
false
false
0
ReadAutomocInfoFile(cmMakefile* makefile, const char* targetDirectory, const char *config) { std::string filename(cmSystemTools::CollapseFullPath(targetDirectory)); cmSystemTools::ConvertToUnixSlashes(filename); filename += "/AutomocInfo....
false
false
false
false
false
0
textDeleted(UT_sint32 iOffset, UT_sint32 iLength) { // Ignore operations on shadow blocks if (m_pOwner->isHdrFtr()) return; // Return if auto spell-checking disabled if (!m_pOwner->getDocLayout()->getAutoSpellCheck()) return; xxx_UT_DEBUGMSG(("fl_Squiggles::textDeleted(%d, %d)\n", iOffset, iLength)); ...
false
false
false
false
false
0
ValidateIFName(const char *ifname, struct ifreq *ifr) { int skfd = -1; char *colonptr; if ( (skfd = socket(PF_INET, SOCK_DGRAM, 0)) == -1 ) { fprintf(stderr, "%s\n", strerror(errno)); return -2; } strncpy(ifr->ifr_name, ifname, IFNAMSIZ); /* Contain a ":"? Probably an error, but treat as warning at...
false
false
false
false
false
0
emit_prolog(struct buffer *buf, struct stack_frame *frame, unsigned long nr_locals) { /* Unconditionally push callee-saved registers */ __emit_push_reg(buf, MACH_REG_EDI); __emit_push_reg(buf, MACH_REG_ESI); __emit_push_reg(buf, MACH_REG_EBX); __emit_push_reg(buf, MACH_REG_EBP); __emit_mov_reg_reg(buf, MACH...
false
false
false
false
false
0
get_bool_q(BCArray *bca) { Query *q; const int clause_count = bca->size; if (clause_count == 0) { q = NULL; free(bca->clauses); } else if (clause_count == 1) { BooleanClause *bc = bca->clauses[0]; if (bc->is_prohibited) { q = bq_new(false); bq...
false
false
false
false
false
0
test_compressed_SDSs(int32 fid) { int32 sds_id, esds_id; int32 start[2], edges[2], dim_sizes[2]; int32 comp_type; /* Compression flag */ comp_info c_info; /* Compression structure */ int32 data[Y_LENGTH][X_LENGTH]; intn status; int i, j; int num_errs = ...
false
false
false
false
false
0
str_matchb(const str* s, const char* pptr, unsigned plen) { const char* sptr; long slen = s->len; if (plen == 0) return slen == 0; for (sptr = s->s; plen > 0; ++sptr, --slen, ++pptr, --plen) { char p = *pptr; if (p == '*') { ++pptr, --plen; if (plen == 0) return 1; p = *pptr; whi...
false
false
false
false
false
0
operator<<(std::ostream &os, const ModuleParameterGroup &group) { os << " Advanced: " << group.GetAdvanced() << std::endl; os << " Label: " << group.GetLabel() << std::endl; os << " Description: " << group.GetDescription() << std::endl; os << " Parameters: " << std::endl; std::vector<ModuleParameter>::co...
false
false
false
false
false
0
table_to_str(HTable table, int print_braces, int butify, int spaces) { char *b, *fs; int len=0, allocated; SField *f; if (! table) return NULL; allocated = 100; b = (char*)malloc(allocated); if (! b) return NULL; if (print_braces) { if (butify) strcpy(b, "{\n"); ...
false
false
false
false
false
0
gather_data_for_subcel(SubcelEvaluation *subcel, int x, int y, RoqContext *enc, RoqTempdata *tempData) { uint8_t mb4[4*4*3]; uint8_t mb2[2*2*3]; int cluster_index; int i, best_dist; static const int bitsUsed[4] = {2, 10, 10, 34}; if (enc->framesSinceKeyframe ...
false
false
false
false
false
0
camel_db_abort_transaction (CamelDB *cdb, GError **error) { gint ret; ret = cdb_sql_exec (cdb->db, "ROLLBACK", NULL, NULL, error); cdb->priv->transaction_is_on = FALSE; WRITER_UNLOCK (cdb); CAMEL_DB_RELEASE_SQLITE_MEMORY; return ret; }
false
false
false
false
false
0
stream_read_uint32 (estream_t stream, u32 *uint32) { unsigned char buffer[4]; size_t bytes_read; gpg_error_t err; int ret; ret = es_read (stream, buffer, sizeof (buffer), &bytes_read); if (ret) err = gpg_error_from_syserror (); else { if (bytes_read != sizeof (buffer)) err = gpg_error (GPG...
false
false
false
false
false
0
fscache_select_cache_for_object( struct fscache_cookie *cookie) { struct fscache_cache_tag *tag; struct fscache_object *object; struct fscache_cache *cache; _enter(""); if (list_empty(&fscache_cache_list)) { _leave(" = NULL [no cache]"); return NULL; } /* we check the parent to determine the cache to use...
false
false
false
false
false
0
readString(Source & source) { unsigned int len = readInt(source); unsigned char * buf = new unsigned char[len]; AutoDeleteArray<unsigned char> d(buf); source(buf, len); readPadding(len, source); return string((char *) buf, len); }
false
false
false
false
false
0
irplib_strehl_disk_flux(const cpl_image * im, double xpos, double ypos, double rad, double bg) { const int nx = cpl_image_get_size_x(im); ...
false
false
false
false
false
0
link(const char *to) { if ( to == NULL ) { quit_listening(); unlink(); } else { if ( !lpeobject_href || ( strcmp(to, lpeobject_href) != 0 ) ) { g_free(lpeobject_href); lpeobject_href = g_strdup(to); try { attach(Inkscape::URI(to)); ...
false
false
false
false
false
0
print_color_ordered_new(const stpi_dither_t *d, stpi_dither_channel_t *dc, int val, int x, int y, unsigned char bit, int length) { int i; int j; unsigned bits; int levels = dc->nlevels - 1; unsigned dpoint = ditherpoint(d, &(dc->dithermat), x); const stpi_ordered_t *o = (const stpi_ordered_t *) dc->aux_d...
false
false
false
false
false
0
scanw(int y, int x, const char* fmt, ...) { int result = ERR; if (::wmove(w, y, x) != ERR) { va_list args; va_start(args, fmt); result = ::vw_scanw (w, const_cast<NCURSES_CONST char *>(fmt), args); va_end(args); } return result; }
false
false
false
false
false
0
gx_install_DeviceN(gs_color_space * pcs, gs_state * pgs) { int code; code = check_DeviceN_component_names(pcs, pgs); if (code < 0) return code; /* See if we have an ICC profile that we can associate with this DeviceN color space */ if (pgs->icc_manager->device_n != NULL) { /* A...
false
false
false
false
false
0
__kernel_sinl(long double x, long double y, int iy) { long double z,r,v; z = x*x; v = z*x; r = S2+z*(S3+z*(S4+z*(S5+z*(S6+z*(S7+z*S8))))); if(iy==0) return x+v*(S1+z*r); else return x-((z*(half*y-v*r)-y)-v*S1); }
false
false
false
false
false
0
WalSndShmemInit(void) { bool found; int i; WalSndCtl = (WalSndCtlData *) ShmemInitStruct("Wal Sender Ctl", WalSndShmemSize(), &found); if (!found) { /* First time through, so initialize */ MemSet(WalSndCtl, 0, WalSndShmemSize()); for (i = 0; i < max_wal_senders; i++) { WalSnd *walsnd = &WalSn...
false
false
false
false
false
0
Java_ncsa_hdf_hdf5lib_H5_H5Tconvert (JNIEnv *env, jclass clss, jint src_id, jint dst_id, jlong nelmts, jbyteArray buf, jbyteArray background, jint plist_id) { hid_t status; jbyte *bufP, *bgP=NULL; jboolean isCopy; if (nelmts <= 0) { h5badArgument( env, "H5Tconvert: name nelmts < ...
false
false
false
false
false
0