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
gfm_server_symlink(struct peer *peer, int from_client, int skip) { gfarm_error_t e; char *source_path, *name; struct host *spool_host = NULL; struct process *process; gfarm_int32_t cfd; struct inode *base; static const char diag[] = "GFM_PROTO_SYMLINK"; e = gfm_server_get_request(peer, diag, "ss", &source_path...
false
false
false
false
false
0
my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *nptr, size_t l, int base, char **endptr,int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize...
false
false
false
false
false
0
parse_ipmask(const char *mask) { static struct in_addr maskaddr; struct in_addr *addrp; unsigned int bits; if (mask == NULL) { /* no mask at all defaults to 32 bits */ maskaddr.s_addr = 0xFFFFFFFF; return &maskaddr; } if ((addrp = xtables_numeric_to_ipmask(mask)) != NULL) /* dotted_to_addr already return...
false
false
false
false
false
0
r_ref_insert(PyObject *o, Py_ssize_t idx, int flag, RFILE *p) { if (o != NULL && flag) { /* currently only FLAG_REF is defined */ PyObject *tmp = PyList_GET_ITEM(p->refs, idx); Py_INCREF(o); PyList_SET_ITEM(p->refs, idx, o); Py_DECREF(tmp); } return o; }
false
false
false
false
false
0
m_duplicate(const Grid &s) { // Clear out any spurious vars in Constructor::d_vars d_vars.clear(); // [mjohnson 10 Sep 2009] d_array_var = s.d_array_var->ptr_duplicate(); d_array_var->set_parent(this); d_vars.push_back(d_array_var); // so the Constructor::Vars_Iter sees it [mjohnson 10 Sep 2009] ...
false
false
false
false
false
0
irdadump_loop(GString *str) { struct sockaddr_ll from; socklen_t fromlen; int len; g_netbuf_recycle(frame_buf); /* Read packets from capture file */ if (config_captureread >= 0) { int dir; int prot; int ret; ret = capread_get(config_captureread, frame_buf, &len, &dir, &prot, ...
false
false
false
false
false
0
garcon_gtk_menu_item_drag_end (GarconGtkMenu *menu) { g_return_if_fail (GTK_IS_MENU (menu)); /* make sure the menu is not visible */ gtk_menu_popdown (GTK_MENU (menu)); /* always emit this signal */ g_signal_emit_by_name (G_OBJECT (menu), "selection-done", 0); }
false
false
false
false
false
0
findFrameParent( KParts::ReadOnlyPart *callingPart, const QString &frame ) { KHTMLPart *parentPart = m_part->d->findFrameParent(callingPart, frame, 0, true /* navigation*/); if (parentPart) return parentPart->browserHostExtension(); return 0; }
false
false
false
false
false
0
FileNameDotToUnderscore(string& fname) { string::size_type pos = fname.length(); while (pos >= 1 && fname[pos-1] != '/' && fname[pos-1] != '\\') { if (fname[pos-1] == '.') fname[pos-1] = '_'; if (fname[pos-1] == ' ') fname[pos-1] = '_'; pos--; } }
false
false
false
false
false
0
mdbGetColumns(Edi *edi, cchar *tableName) { Mdb *mdb; MdbTable *table; MdbSchema *schema; MprList *list; int i; mprAssert(edi); mprAssert(tableName && *tableName); mdb = (Mdb*) edi; lock(mdb); if ((table = lookupTable(mdb, tableName)) == 0) { un...
false
false
false
false
false
0
test_set_homepage (InfoTestFixture *fixture, gconstpointer user_data) { UnityWebappsApplicationInfo *info; GError *error; info = (fixture)->application_info; error = NULL; unity_webapps_application_info_ensure_desktop_file (info, &error); g_assert (error == NULL); g_assert (g_file_test ("te...
false
false
false
false
false
0
combine(uint32_t lead, uint32_t trail) { CombiningTriple *triples; uint32_t i, count; /* search for all triples with c as lead code point */ triples=utm_getStart(combiningTriplesMem); count=utm_countItems(combiningTriplesMem); /* triples are not sorted by code point but for each lead CP there ...
false
false
false
false
false
0
soc_button_lookup_gpio(struct device *dev, int acpi_index) { struct gpio_desc *desc; int gpio; desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index, GPIOD_ASIS); if (IS_ERR(desc)) return PTR_ERR(desc); gpio = desc_to_gpio(desc); gpiod_put(desc); return gpio; }
false
false
false
false
false
0
ipw_fw_dma_command_block_index(struct ipw_priv *priv) { u32 current_cb_address = 0; u32 current_cb_index = 0; IPW_DEBUG_FW("<< :\n"); current_cb_address = ipw_read_reg32(priv, IPW_DMA_I_CURRENT_CB); current_cb_index = (current_cb_address - IPW_SHARED_SRAM_DMA_CONTROL) / sizeof(struct command_block); IPW_D...
false
false
false
false
false
0
add_permission(permission, pattern) Permission *permission; const char *pattern; { Permission *permission_p = NULL; const char *pattern_p = pattern; struct in_addr ipv4_address, ipv4_net_mask; /* * Allocate memories for a new node and a host name. */ permission_p = (Permission *)m...
false
false
false
false
false
0
netevent_cb(struct notifier_block *nb, unsigned long event, void *data) { switch (event) { case NETEVENT_NEIGH_UPDATE: check_neigh_update(data); break; case NETEVENT_REDIRECT: default: break; } return 0; }
false
false
false
false
false
0
updateActions(FluxboxWindow &win) { /* From Extended Window Manager Hints, draft 1.3: * * _NET_WM_ALLOWED_ACTIONS, ATOM[] * * A list of atoms indicating user operations that the * Window Manager supports for this window. Atoms present in the * list indicate allowed actions, atoms not...
false
false
false
false
false
0
generic_next_matching_host_chanacs(mychan_t *mc, user_t *u, mowgli_node_t *first) { chanacs_t *ca; mowgli_node_t *n; char hostbuf[NICKLEN+USERLEN+HOSTLEN]; char hostbuf2[NICKLEN+USERLEN+HOSTLEN]; char ipbuf[NICKLEN+USERLEN+HOSTLEN]; snprintf(hostbuf, sizeof hostbuf, "%s!%s@%s", u->nick, u->user, u->vhost); snpr...
false
false
false
false
false
0
routeBool(unit *u, boolType type, unit *src) { /* routes bool value to another unit */ char **b, *bSrc; int i; if (u->scope == usGLOBAL) { /* unit to route is global -> src->unit has to be global too */ if (src->scope == usGLOBAL) { b = getBoolParamAddress(u, type, 0); /* get pointer to the value to route TODO...
false
false
false
false
false
0
Reset(bool forceReset) { if (forceReset) ClearBitBuffer(); else assert(m_bitsBuffered == 0); m_headerWritten = false; m_matchAvailable = false; m_dictionaryEnd = 0; m_stringStart = 0; m_lookahead = 0; m_minLookahead = MAX_MATCH; m_matchBufferEnd = 0; m_blockStart = 0; m_blockLength = 0; m_detectCount ...
false
false
false
false
false
0
driver_playing(ca_context *c, uint32_t id, int *playing) { int ret = CA_SUCCESS; struct private *p; struct backend *b; ca_return_val_if_fail(c, CA_ERROR_INVALID); ca_return_val_if_fail(playing, CA_ERROR_INVALID); ca_return_val_if_fail(c->private, CA_ERROR_STATE); ...
false
false
false
false
false
0
parse_args(int argc, char *argv[]) { int ch; input_format = NULL; table_ref = NULL; details.max_extent_len = MAX_EXTENT_LEN; details.comp = PSTORE_COMP_NONE; details.append = false; while ((ch = getopt_long(argc, argv, "ac:d:e:t:u:w:", options, NULL)) != -1) { switch (ch) { case 'a': details.append ...
false
true
true
false
true
1
savefile_configuration_command(CdlInterpreter interp, int argc, const char* argv[]) { CYG_REPORT_FUNCNAMETYPE("CdlConfiguration::savefile_configuration_command", "result %d"); CYG_PRECONDITION_CLASSC(interp); int result = TCL_OK; CdlToplevel toplevel = interp->get_toplevel(); CYG_ASSERT_CLASSC(topl...
false
false
false
false
false
0
operator>>=(to_wstring s) const { CORBA::TypeCode_var newtc = CORBA::TypeCode::NP_wstring_tc(s.bound); void* v; if (PR_extract(newtc, unmarshalWString_fn, marshalWString_fn, deleteWString_fn, v)) { s.val = (CORBA::WChar*)v; return 1; } return 0; }
false
false
false
false
false
0
qib_tune_pcie_coalesce(struct qib_devdata *dd) { int r; struct pci_dev *parent; u16 devid; u32 mask, bits, val; if (!qib_pcie_coalesce) return; /* Find out supported and configured values for parent (root) */ parent = dd->pcidev->bus->self; if (parent->bus->parent) { qib_devinfo(dd->pcidev, "Parent not ro...
false
false
false
false
false
0
theora_parse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { GstTheoraParse *parse = GST_THEORA_PARSE (object); switch (prop_id) { case PROP_SYNCHRONIZATION_POINTS: { GValueArray *array = NULL; guint i; array = g_value_array_new (parse->npairs * 2...
false
false
false
false
false
0
intel_rotate_fb_obj_pages(struct intel_rotation_info *rot_info, struct drm_i915_gem_object *obj) { unsigned int size_pages = rot_info->plane[0].width * rot_info->plane[0].height; unsigned int size_pages_uv; struct sg_page_iter sg_iter; unsigned long i; dma_addr_t *page_addr_list; struct sg_table *st; unsign...
false
false
false
false
false
0
index_context(const gs_scheduler_t *psched, long index) { gs_context_t *pctx; if (index == 0) return 0; pctx = psched->table[index % CTX_TABLE_SIZE]; while (pctx != 0 && pctx->index != index) pctx = pctx->table_next; return pctx; }
false
false
false
false
false
0
cw1200_bss_loss_work(struct work_struct *work) { struct cw1200_common *priv = container_of(work, struct cw1200_common, bss_loss_work.work); pr_debug("[CQM] Reporting connection loss.\n"); wsm_lock_tx(priv); if (queue_work(priv->workqueue, &priv->unjoin_work) <= 0) wsm_unlock_tx(priv); }
false
false
false
false
false
0
rt2x00usb_register_read_async_cb(struct urb *urb) { struct rt2x00_async_read_data *rd = urb->context; if (rd->callback(rd->rt2x00dev, urb->status, le32_to_cpu(rd->reg))) { if (usb_submit_urb(urb, GFP_ATOMIC) < 0) kfree(rd); } else kfree(rd); }
false
false
false
false
false
0
git_merge_file__normalize_inputs( git_merge_file_input *out, const git_merge_file_input *given) { memcpy(out, given, sizeof(git_merge_file_input)); if (!out->path) out->path = "file.txt"; if (!out->mode) out->mode = 0100644; return out; }
false
false
false
false
false
0
get_vpiconta_drv_valuep(struct h_t *hp, p_vpi_value value_p, struct conta_t *cap) { register int32 bi; int32 blen; byte *sbp; struct xstk_t *xsp, *xsp2; struct conta_t *pbcap; /* DBG remove --- */ if (hp->hin_itp == NULL) __vpi_terr(__FILE__, __LINE__); /* --- */ __push_itstk(hp->hin_itp); /* correct for...
false
false
false
false
false
0
mpcaf_grammar_char(mpc_val_t *x, void *s) { mpca_grammar_st_t *st = s; char *y = mpcf_unescape(x); mpc_parser_t *p = (st->flags & MPCA_LANG_WHITESPACE_SENSITIVE) ? mpc_char(y[0]) : mpc_tok(mpc_char(y[0])); free(y); return mpca_state(mpca_tag(mpc_apply(p, mpcf_str_ast), "char")); }
false
false
false
false
false
0
ensRegistryGetMarkerfeatureadaptor( EnsPDatabaseadaptor dba) { RegistryPEntry entry = NULL; RegistryPCoreStyle rcs = NULL; if (!dba) return NULL; entry = (RegistryPEntry) ajTableFetchmodV( registryGEntry, (const void *) ensDatabaseadaptorGetSpecies(dba)); if (!entry)...
false
false
false
false
false
0
gx_erase_colored_pattern(gs_state *pgs) { int code; gx_device_pattern_accum *pdev = (gx_device_pattern_accum *)gs_currentdevice(pgs); if ((code = gs_gsave(pgs)) < 0) return code; if ((code = gs_setgray(pgs, 1.0)) >= 0) { gs_rect rect; gx_device_memory *mask; pgs->log_op ...
false
false
false
false
false
0
goto_new_line(void) { put_till_end_and_adv_cursor(); if (cmdedit_x != 0) bb_putchar('\n'); }
false
false
false
false
false
0
checkGeneration (generation *gen, rtsBool after_major_gc USED_IF_THREADS) { nat n; gen_workspace *ws; ASSERT(countBlocks(gen->blocks) == gen->n_blocks); ASSERT(countBlocks(gen->large_objects) == gen->n_large_blocks); #if defined(THREADED_RTS) // heap sanity checking d...
false
false
false
false
false
0
Sorting_quickSortRearrange(SDSort *self, size_t lb, size_t ub) { SDSortCompareCallback *comp = self->comp; SDSortSwapCallback *swap = self->swap; void *context = self->context; do { while (ub > lb && (*comp)(context, ub, lb) >= 0) { ub --; } if (ub != lb) { (*swap)(context, ub, lb); while (lb ...
false
false
false
false
false
0
_lookup_address_cpa(struct cpa_data *cpa, unsigned long address, unsigned int *level) { if (cpa->pgd) return lookup_address_in_pgd(cpa->pgd + pgd_index(address), address, level); return lookup_address(address, level); }
false
false
false
false
false
0
k_prng_finish (struct k_prng_t* c) { if (c) { #ifndef __WINNT__ if (c->fd_urandom != -1) close(c->fd_urandom); if (c->fd_random != -1) close(c->fd_random); #endif if (c->ctx) k_locked_free(c->ctx, c->alloced_ctxsize); k_free(c); } }
false
false
false
false
false
0
ctanh(double complex z) { double x, y; double t, beta, s, rho, denom; uint32_t hx, ix, lx; x = creal(z); y = cimag(z); EXTRACT_WORDS(hx, lx, x); ix = hx & 0x7fffffff; /* * ctanh(NaN +- I 0) = d(NaN) +- I 0 * * ctanh(NaN + I y) = d(NaN,y) + I d(NaN,y) for y != 0 * * The imaginary part has the sign o...
false
false
false
false
false
0
port_has_drxk(struct i2c_adapter *i2c, int port) { u8 val; if (i2c_read(i2c, 0x29+port, &val) < 0) return 0; return 1; }
false
false
false
false
false
0
insert_fprint(const struct parser_table* entry, const char *filename) { struct predicate *our_pred = insert_primary (entry); if (filename) open_output_file (filename, &our_pred->args.printf_vec); else open_stdout (&our_pred->args.printf_vec); our_pred->side_effects = our_pred->no_default_print = true; ...
false
false
false
false
false
0
read_settings(Setting &settings) { //read global loglevel Logger::log_level_t loglevel; if( settings.value("loglevel", loglevel) ) Logger::log("Loglevel is missing in config file: ", cfg_filename, Logger::LOGLEVEL_WARN); else Logger::setLogLevel(loglevel); //read loglevel of stack if(settings.begin_group("st...
false
false
false
false
false
0
gst_structure_id_has_field_typed (const GstStructure * structure, GQuark field, GType type) { GstStructureField *f; g_return_val_if_fail (structure != NULL, FALSE); g_return_val_if_fail (field != 0, FALSE); f = gst_structure_id_get_field (structure, field); if (f == NULL) return FALSE; return (G_...
false
false
false
false
false
0
cpl_xmemory_addcell(size_t pos, const void * pointer, size_t size, unsigned char type) { /* Store information */ cpl_xmemory_p_val[pos] = pointer; cpl_xmemory_p_size[pos] = size; /* Allocatio...
false
false
false
false
false
0
java_check_reference (tree expr, int check) { if (!flag_syntax_only && check) { expr = save_expr (expr); expr = build3 (COND_EXPR, TREE_TYPE (expr), build2 (EQ_EXPR, boolean_type_node, expr, null_pointer_node), build_call_nary (void_type_node, build_address_of (soft_nu...
false
false
false
false
false
0
__find_catend(struct expr_t *catndp) { register struct expr_t *ndp; struct expr_t *last_ndp; for (ndp = catndp, last_ndp = NULL; ndp != NULL; ndp = ndp->ru.x) last_ndp = ndp; return(last_ndp); }
false
false
false
false
false
0
afr_sh_mark_source_sinks (call_frame_t *frame, xlator_t *this) { int i = 0; afr_local_t *local = NULL; afr_self_heal_t *sh = NULL; afr_private_t *priv = NULL; int active_sinks = 0; local = frame->local; sh = &local->self_heal;...
false
false
false
false
false
0
determine_scanner_serial (const char *hostname, const char * mac_address, char *serial) { char *dot; char copy[BJNP_HOST_MAX]; /* determine a "serial number" for the scanner */ /* if available we use the hostname or ipv4 address of the printer */ /* if we only have a literal ipv6 address, we use the mac-addr...
false
false
false
false
false
0
varDefOptGribInt(int varID, long lval, const char *keyword) { #if defined (HAVE_LIBGRIB_API) int idx = vartable[varID].opt_grib_int_nentries; vartable[varID].opt_grib_int_nentries++; if ( idx >= MAX_OPT_GRIB_ENTRIES ) Error("Too many optional keyword/integer value pairs!"); vartable[varID].opt_grib_int_val[id...
false
false
false
false
true
1
tnk3_draw_sprites( struct mame_bitmap *bitmap, int xscroll, int yscroll ) { const struct GfxElement *gfx = Machine->gfx[2]; struct rectangle *clip = &Machine->visible_area; int tile_number, attributes, color, sx, sy; int offs; for(offs = 0; offs < 50*4; offs+=4) { if(*(UINT32*)(spriteram+offs) == 0 ...
false
false
false
false
false
0
EnumerateNamedMDNode(const NamedMDNode *MD) { for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i) EnumerateMetadata(MD->getOperand(i)); }
false
false
false
false
false
0
ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, u32 headroom, int strategy) { u32 rxpktsize = IXGBE_RXPBSIZE_64KB; u8 i = 0; if (!num_pb) return; /* Setup Rx packet buffer sizes */ switch (strategy) { case PBA_STRATEGY_WEIGHTED: /* Setup the first four at 80KB */ rxpktsize = IXGBE_RXPBSIZE_8...
false
false
false
false
false
0
del_pmksa(struct wiphy *wiphy, struct net_device *netdev, struct cfg80211_pmksa *pmksa) { u32 i; s32 s32Error = 0; struct wilc_priv *priv = wiphy_priv(wiphy); PRINT_D(CFG80211_DBG, "Deleting PMKSA keys\n"); for (i = 0; i < priv->pmkid_list.numpmkid; i++) { if (!memcmp(pmksa->bssid, priv->pmkid_list.pm...
false
true
false
false
false
1
set_first_recipient (smtp_session_t session) { smtp_recipient_t recipient; if (session->current_message == NULL) return 0; for (recipient = session->current_message->recipients; recipient != NULL; recipient = recipient->next) if (!recipient->complete) break; session->cmd_recipien...
false
false
false
false
false
0
mandoc_template(SL_cmd *cmds, const char *extra_string) { SL_cmd *c, *prev; char timestr[64], cmd[64]; const char *p; time_t t; printf(".\\\" Things to fix:\n"); printf(".\\\" * correct section, and operating system\n"); printf(".\\\" * remove Op from mandatory flags\n"); printf("...
true
true
false
false
false
1
stub_dbus_message_get(value message) { CAMLparam1(message); CAMLlocal1(v); DBusMessage *c_msg; DBusMessageIter args; int has_next; c_msg = DBusMessage_val(message); has_next = dbus_message_iter_init(c_msg, &args); v = message_get_list(&args, has_next, 1); CAMLreturn(v); }
false
false
false
false
false
0
flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx) { flexcop_ibi_value v0x0,v0x4,v0xc; v0x0.raw = v0x4.raw = v0xc.raw = 0; v0x0.dma_0x0.dma_address0 = dma->dma_addr0 >> 2; v0xc.dma_0xc.dma_address1 = dma->dma_addr1 >> 2; v0x4.dma_0x4_write.dma_addr_size = dma->...
false
false
false
false
false
0
ife_print(struct interface *ptr) { #ifdef __linux__ int promisc = ptr->flags & IFF_PROMISC; struct packet_info *sniffer = has_packet_socket(ptr->index); struct packet_info *p; if (promisc || sniffer) { printf("%s:", ptr->name); if (promisc) printf(" PROMI...
false
false
false
false
false
0
BuildPos(PositionStruct &pos, const UcciCommStruct &UcciComm) { int i, mv; pos.FromFen(UcciComm.szFenStr); for (i = 0; i < UcciComm.nMoveNum; i ++) { mv = COORD_MOVE(UcciComm.lpdwMovesCoord[i]); if (mv == 0) { break; } if (pos.ucpcSquares[SRC(mv)] == 0) { break; } po...
false
false
false
false
false
0
reallocArrays(UNormIterator *uni, int32_t capacity, UBool addAtStart) { /* do not pass api so that the compiler knows it's an alias pointer to uni itself */ UCharIterator *api=&uni->api; uint32_t *states; UChar *chars; int32_t start, limit; states=(uint32_t *)uprv_malloc((capacity+1)*4+capacit...
false
false
false
false
false
0
bin_save_pipe(FILE * f, pipe_op_t * op_it) { int rv; int32_t i32; char c = OP_PIPE; write_char(c); write_int32(op_it->fd1); write_int32(op_it->fd2); write_int32(op_it->mode); write_int32(op_it->retval); if ( (rv = bin_write_info(f, &op_it->info)) != 0) { BIN_WRITE_ERROR; } return 0; }
false
false
false
false
false
0
test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture, gconstpointer data) { const TestConformSharedState *shared_state = data; static int counter = 0; if (counter != 0) g_critical ("We don't support running more than one test at a time\n" "in a single test run due to th...
false
false
false
false
false
0
TryCatchStatement() { SQObject exid; Lex(); _fs->AddInstruction(_OP_PUSHTRAP,0,0); _fs->_traps++; if(_fs->_breaktargets.size()) _fs->_breaktargets.top()++; if(_fs->_continuetargets.size()) _fs->_continuetargets.top()++; SQInteger trappos = _fs->GetCurrentPos(); Statement(); _fs->_traps--; _fs->AddI...
false
false
false
false
false
0
gda_handler_numerical_get_str_from_value (G_GNUC_UNUSED GdaDataHandler *iface, const GValue *value) { g_assert (value); return gda_value_stringify ((GValue *) value); }
false
false
false
false
false
0
ipoib_link_state_changed ( struct ib_device *ibdev ) { struct net_device *netdev = ib_get_ownerdata ( ibdev ); struct ipoib_device *ipoib = netdev->priv; struct ipoib_mac *mac = ( ( struct ipoib_mac * ) netdev->ll_addr ); int rc; /* Leave existing broadcast group */ ipoib_leave_broadcast_group ( ipoib ); /* Up...
false
false
false
false
false
0
t4_fw_tp_pio_rw(struct adapter *adap, u32 *vals, unsigned int nregs, unsigned int start_index, unsigned int rw) { int ret, i; int cmd = FW_LDST_ADDRSPC_TP_PIO; struct fw_ldst_cmd c; for (i = 0 ; i < nregs; i++) { memset(&c, 0, sizeof(c)); c.op_to_addrspace = cpu_to_be32(FW_CMD_OP_V(FW_LDST_CMD) | ...
false
false
false
false
false
0
is_good_ip(const struct in_addr &in) { char dst[128]; if (inet_ntop(AF_INET, &in, dst, sizeof(dst)) == NULL) return 0; if (global::good_ips.find(dst) != global::good_ips.end()) return 1; struct in_addr t = in; unsigned int n = 0xffffffff; for (int i = 1; i <= 24; ++i) { t.s_addr &= htonl(n<<i); inet_ntop...
false
false
false
false
false
0
gui_entry_create(int xpos, int ypos, int width, int utf8) { GUI_ENTRY_REC *rec; rec = g_new0(GUI_ENTRY_REC, 1); rec->xpos = xpos; rec->ypos = ypos; rec->width = width; rec->text_alloc = 1024; rec->text = g_new(unichar, rec->text_alloc); rec->text[0] = '\0'; rec->utf8 = utf8; retur...
false
false
false
false
false
0
intel_sprite_set_colorkey(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_intel_sprite_colorkey *set = data; struct drm_plane *plane; struct drm_plane_state *plane_state; struct drm_atomic_state *state; struct drm_modeset_acquire_ctx ctx; int ret = 0; /* Make sure we don't ...
false
false
false
false
false
0
gedit_encoding_get_from_charset (const gchar *charset) { gint i; g_return_val_if_fail (charset != NULL, NULL); gedit_encoding_lazy_init (); if (charset == NULL) return NULL; if (g_ascii_strcasecmp (charset, "UTF-8") == 0) return gedit_encoding_get_utf8 (); i = 0; while (i < GEDIT_ENCODING_LAST) { if ...
false
false
false
false
false
0
rsxx_save_config(struct rsxx_cardinfo *card) { struct rsxx_card_cfg cfg; int st; memcpy(&cfg, &card->config, sizeof(cfg)); if (unlikely(cfg.hdr.version != RSXX_CFG_VERSION)) { dev_err(CARD_TO_DEV(card), "Cannot save config with invalid version %d\n", cfg.hdr.version); return -EINVAL; } /* Convert dat...
false
true
false
false
false
1
pan_flower_size(PanWindow *pw, gint *width, gint *height) { GList *work; gint x1, y1, x2, y2; x1 = 0; y1 = 0; x2 = 0; y2 = 0; work = pw->list; while (work) { PanItem *pi; pi = work->data; work = work->next; if (x1 > pi->x) x1 = pi->x; if (y1 > pi->y) y1 = pi->y; if (x2 < pi->x + pi->width) x2 ...
false
false
false
false
false
0
MarkSet(m, line, column) Mark *m; LinePtr line; int column; { m->m_line = line; m->m_char = column; m->m_big_delete = NO; if (MarkHighlighting) makedirty(line); }
false
false
false
false
false
0
wheelEvent(QWheelEvent *event) { if (underMouse()) { //Cycle tabs with the circular array tecnique if (event->delta() < 0) { int index = currentIndex(); //search for an enabled tab for (int i = 0; i < count()-1; ++i) { index = (index + 1) % count()...
false
false
false
false
false
0
tracker_resources_check_graph_updated_signal (TrackerResources* self) { guint _tmp0_ = 0U; #line 309 "/home/martyn/Source/checkout/gnome/tracker/src/tracker-store/tracker-resources.vala" g_return_if_fail (self != NULL); #line 311 "/home/martyn/Source/checkout/gnome/tracker/src/tracker-store/tracker-resources.vala" _...
false
false
false
false
false
0
ubifs_new_inode(struct ubifs_info *c, const struct inode *dir, umode_t mode) { struct inode *inode; struct ubifs_inode *ui; inode = new_inode(c->vfs_sb); ui = ubifs_inode(inode); if (!inode) return ERR_PTR(-ENOMEM); /* * Set 'S_NOCMTIME' to prevent VFS form updating [mc]time of inodes and * marki...
false
false
false
false
false
0
test_timewarp_page(void){ Stmt q; login_check_credentials(); if( !g.perm.Read || !g.perm.Hyperlink ){ login_needed(); return; } style_header("Instances of timewarp"); cgi_printf("<ul>\n"); db_prepare(&q, "SELECT blob.uuid " " FROM plink p, plink c, blob" " WHERE p.cid=c.pid AND p.mtime>c.m...
false
false
false
false
false
0
menu_machine_pause( GtkAction *gtk_action GCC_UNUSED, gpointer data GCC_UNUSED ) { int error; if( paused ) { paused = 0; ui_statusbar_update( UI_STATUSBAR_ITEM_PAUSED, UI_STATUSBAR_STATE_INACTIVE ); timer_estimate_reset(); gtk_main_quit(); } else { /* Stop recording any competition mode ...
false
false
false
false
false
0
unload_unused_support_plugins (DocmanPlugin* docman_plugin, GList* needed_plugins) { GList* plugins = g_list_copy (docman_plugin->support_plugins); GList* node; DEBUG_PRINT ("Unloading plugins"); for (node = plugins; node != NULL; node = g_list_next (node)) { AnjutaPlugin* plugin = ANJUTA_PLUGIN (node-...
false
false
false
false
false
0
getDirectory(const char *fileName, char *result, size_t resultLen) { char separator; #ifndef WIN32 separator = '/'; #else separator = '\\'; #endif if (fileName == NULL || fileName[0] == '\0' || resultLen == 0) { ArLog::log(ArLog::Normal, "ArUtil: getDirectory, bad setup"); return false...
false
false
false
false
false
0
gst_rtsp_client_finalize (GObject * obj) { GstRTSPClient *client = GST_RTSP_CLIENT (obj); GST_INFO ("finalize client %p", client); client_cleanup_sessions (client); gst_rtsp_connection_free (client->connection); if (client->session_pool) g_object_unref (client->session_pool); if (client->media_mappin...
false
false
false
false
false
0
Handler_CSI(ccf_Context cc, int Code) { switch (Code) { case 0x30: /* 0 */ case 0x31: /* 1 */ case 0x32: /* 2 */ case 0x33: /* 3 */ case 0x34: /* 4 */ case 0x35: /* 5 */ case 0x36: /* 6 */ case 0x37: /* 7 */ case 0x38: /* 8 */ case 0x39: /* 9 */ if (cc->i.csi.state > CSI_STATE_PA...
false
false
false
false
false
0
fetch_deltas (EBookBackendEws *ebews) { EBookBackendEwsPrivate *priv = ebews->priv; GError *error = NULL; /* If the thread is already running just return back */ if (priv->dthread) return FALSE; if (!priv->dlock) { priv->dlock = g_new0 (SyncDelta, 1); g_mutex_init (&priv->dlock->mutex); g_cond_init (&pri...
false
false
false
false
false
0
JimParseListSep(struct JimParserCtx *pc) { pc->tstart = pc->p; pc->tline = pc->linenr; while (isspace(UCHAR(*pc->p))) { if (*pc->p == '\n') { pc->linenr++; } pc->p++; pc->len--; } pc->tend = pc->p - 1; pc->tt = JIM_TT_SEP; return JIM_OK; }
false
false
false
false
false
0
netsnmp_register_read_only_counter32_instance_context(const char *name, const oid * reg_oid, size_t reg_oid_len, u_long * it, ...
false
false
false
false
false
0
_IO_un_link (fp) struct _IO_FILE_plus *fp; { if (fp->file._flags & _IO_LINKED) { struct _IO_FILE **f; #ifdef _IO_MTSAFE_IO _IO_cleanup_region_start_noarg (flush_cleanup); _IO_lock_lock (list_all_lock); run_fp = (_IO_FILE *) fp; _IO_flockfile ((_IO_FILE *) fp); #endif if (_...
false
false
false
false
false
0
opt_med5(float *p) { PIX_SORT(p[0],p[1]) ; PIX_SORT(p[3],p[4]) ; PIX_SORT(p[0],p[3]) ; PIX_SORT(p[1],p[4]) ; PIX_SORT(p[1],p[2]) ; PIX_SORT(p[2],p[3]) ; PIX_SORT(p[1],p[2]) ; return(p[2]) ; }
false
false
false
false
false
0
book_insert(const char file_name[]) { int game_nb; pgn_t pgn[1]; board_t board[1]; int ply; int result; char string[256]; int move; int pos; ASSERT(file_name!=NULL); // init game_nb = 0; // scan loop pgn_open(pgn,file_name); while (pgn_next_game(pgn)) { board_star...
false
false
false
false
false
0
_getFreeLeaf( LeafCache *lc ) { int i; Leaf leaf; if ( lc->freeList ) { leaf = lc->freeList; lc->freeList = *( ( Leaf * ) leaf ); } else { if ( lc->blocks == NULL || lc->nextInBlock == LEAVES_PER_BLOCK ) { LeafBlock * lb; lb = ( LeafBlock * ) DXAllocate(...
false
false
false
false
false
0
repTextExtract(UText *ut, int64_t start, int64_t limit, UChar *dest, int32_t destCapacity, UErrorCode *status) { const Replaceable *rep=(const Replaceable *)ut->context; int32_t length=rep->length(); if(U_FAILURE(*status)) { return 0; } if(destC...
false
false
false
false
false
0
subrip_wr_init(const char *fname) { time_t gpstime_t; struct tm * ptm_gps; stnum = 1; time_offset = 0; prevwpp = NULL; if ((opt_gpstime != NULL) && (opt_gpsdate != NULL)) { time(&gpstime_t); ptm_gps = gmtime(&gpstime_t); if (opt_gpstime) { sscanf(opt_gpstime, "%2d%2d%2d", &ptm_gps->tm_...
false
false
false
false
false
0
clear_rec(CompactTrie *ct, Node *n, void (*clearer)(Leaf*, void*), void *data) { int i, off; int size = Scm__CountBitsInWord(n->emap); char is_leaf[MAX_NODE_SIZE]; for (i=0, off=0; i<MAX_NODE_SIZE; i++) { if (NODE_HAS_ARC(n, i)) { if (NODE...
true
true
false
false
false
1
_elm_widget_item_tooltip_text_set(Elm_Widget_Item *item, const char *text) { ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); EINA_SAFETY_ON_NULL_RETURN(text); text = eina_stringshare_add(text); _elm_widget_item_tooltip_content_cb_set (item, _elm_widget_item_tooltip_label_...
false
false
false
false
false
0
memory_indexed_operand (operand, mode) rtx operand; enum machine_mode mode ATTRIBUTE_UNUSED; { if (GET_CODE (operand) != MEM) return 0; operand = XEXP (operand, 0); if (GET_CODE (operand) == PLUS) { if (GET_CODE (XEXP (operand, 0)) == REG) operand = XEXP (operand, 0); else if (GET_...
false
false
false
false
false
0
getFmtHandle(PL_ListenerId lid) const { if (m_vecFmtHandle.size() == 0) return 0; return m_vecFmtHandle.getNthItem(lid); }
false
false
false
false
false
0
getOrOpenBin(const QString & binLocation, const QString & binTemplateLocation) { PartsBinPaletteWidget* partsBin = findBin(binLocation); if(!partsBin) { QString fileToOpen = QFileInfo(binLocation).exists() ? binLocation : createIfBinNotExists(binLocation, binTemplateLocation); partsBin = openB...
false
false
false
false
false
0
_midgard_sql_query_select_data_finalize (GObject *object) { MidgardSqlQuerySelectData *self = MIDGARD_SQL_QUERY_SELECT_DATA (object); g_free (self->query_string); /* DO NOT nullify resultset object, other objects might still hold * reference to it. */ if (MIDGARD_QUERY_EXECUTOR (self)->priv->resultset && G_IS_...
false
false
false
false
false
0
destroy_shmem(key_t key){ struct shmid_ds buf; int id, retval; id = shmget(key, 0, 0); if (id < 0) return 0; // assume it doesn't exist retval = shmctl(id, IPC_STAT, &buf); if (retval) { perror("shmctl STAT"); return ERR_SHMCTL; } retval = shmctl(id, IPC_RMID, ...
false
false
false
false
false
0