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
DoBuildSymbolGeometry (View *pView) { // Building atom geometry if necessary double ascent; char const *symbol = GetSymbol (); if (!symbol) return; PangoContext* pc = gccv::Text::GetContext (); PangoLayout *layout = pango_layout_new (pc); pango_layout_set_font_description (layout, pView->GetPangoFontDesc ()); ...
false
false
false
false
false
0
unlistAction(QAction* action) { // ATTENTION: // This method is called with an QObject formerly known as a QAction // during _k_actionDestroyed(). So don't do fancy stuff here that needs a // real QAction! // Get the index for the action int index = actions.indexOf(action); // Action not found. ...
false
false
false
false
false
0
shadow_lut_init_one(int32_t *lut, int bits, int shift) { int i; if (bits > 8) for (i = 0; i < 256; i++) lut[i] = (i << (bits + shift - 8)); else for (i = 0; i < 256; i++) lut[i] = (i >> (8 - bits)) << shift; }
false
false
false
false
false
0
emit_jump_if_reachable (rtx label) { if (GET_CODE (get_last_insn ()) != BARRIER) emit_jump (label); }
false
false
false
false
false
0
static_style (GtkWidget *widget, void *data) { gamgi_window *window = GAMGI_CAST_WINDOW data; GtkWidget *dialog = window->dialog0; GtkWidget *entry; GtkWidget *label_size, *label_variancy; GtkWidget *combo_style, *combo_size, *combo_variancy; char token[GAMGI_ENGINE_TOKEN]; int row; /**************** * update style *...
true
true
false
false
false
1
dump_netbios_ns(packet_t *pkt) { netbios_ns_t nb_ns; u_int8_t holder[64]; u_int8_t r, opcode, flags, rcode; u_int8_t flag_aa, flag_tc, flag_rd, flag_ra, flag_zeros, flag_b; /* Set the layer */ set_layer(LAYER_APPLICATION); /* * Mark the beginning of the NS portion so that labels can be s...
false
false
false
false
false
0
IsAHistogram (Object obj) { Array ad; Array ac; Array ap; Class c; int n; Object attr; char *str; if (obj == NULL) return (FALSE); if (DXGetObjectClass (obj) != CLASS_FIELD) return (FALSE); ad = (Array) DXGetComponentValue ((Field) obj, "data"); ac = (Array) DXGetCom...
false
false
false
false
false
0
push_conditional (GISourceScanner *scanner, gint type) { g_assert (type != 0); g_queue_push_head (&scanner->conditionals, GINT_TO_POINTER (type)); }
false
false
false
false
false
0
InitializeTypeMap(const Module &M) { if (!TypeMapInitialized) if (NamedMDNode *CU_Nodes = M.getNamedMetadata("llvm.dbg.cu")) { TypeIdentifierMap = generateDITypeIdentifierMap(CU_Nodes); TypeMapInitialized = true; } }
false
false
false
false
false
0
obt_paths_mkdir(const gchar *path, gint mode) { gboolean ret = TRUE; g_return_val_if_fail(path != NULL, FALSE); g_return_val_if_fail(path[0] != '\0', FALSE); if (!g_file_test(path, G_FILE_TEST_IS_DIR)) if (mkdir(path, mode) == -1) ret = FALSE; return ret; }
false
false
false
false
false
0
Tspi_Context_CloseSignTransport(TSS_HCONTEXT hContext, /* in */ TSS_HKEY hSigningKey, /* in */ TSS_VALIDATION* pValidationData) /* in, out */ { TSS_RESULT result; TSS_HPOLICY hPolicy; TSS_BOOL usesAuth; UINT32 sigLen; BYTE *sig; UINT64 offset; Trspi_HashCtx hashCtx; TPM_DIGEST digest; TPM_S...
false
false
false
false
false
0
icalcomponent_vanew (icalcomponent_kind kind, ...) { va_list args; struct icalcomponent_impl *impl = icalcomponent_new_impl(kind); if (impl == 0){ return 0; } va_start(args,kind); icalcomponent_add_children(impl, args); va_end(args); return (icalcomponent*) impl; }
false
false
false
false
false
0
cph_mechanism_server_get_settings (CphIfaceMechanism *object, GDBusMethodInvocation *context) { CphMechanism *mechanism = CPH_MECHANISM (object); gboolean ret; GVariant *settings = NULL; _cph_mechanism_emit_called (mechanism); if ...
false
false
false
false
false
0
exit_if_over_time_limit() { int sec = run_time() / 1000; if (sec > MACE_Parms[MAX_TP_SECONDS].val) exit_with_message(MACE_MAX_SECONDS_EXIT, 1); }
false
false
false
false
false
0
borg_object_similar(borg_item *o_ptr, borg_item *j_ptr) { /* NOTE: This assumes the giving of one item at a time */ int total = o_ptr->iqty + 1; /* Require identical object types */ if (o_ptr->kind != j_ptr->kind) return (0); /* Analyze the items */ switch (o_ptr->tval) { /* Che...
false
false
false
false
false
0
gf_node_allow_cyclic_traverse(GF_Node *node) { #ifdef GF_CYCLIC_TRAVERSE_ON if (node) node->sgprivate->flags &= ~GF_NODE_IN_TRAVERSE; #endif }
false
false
false
false
false
0
da9150_charger_unregister_irq(struct platform_device *pdev, const char *irq_name) { struct device *dev = &pdev->dev; struct da9150_charger *charger = platform_get_drvdata(pdev); int irq; irq = platform_get_irq_byname(pdev, irq_name); if (irq < 0) { dev_err(dev, "Failed to get IRQ CHG_STATUS: %d\n", irq);...
false
false
false
false
false
0
post(Space& home) { GECODE_ES_FAIL(Meta::NoGoodsProp::post(home,*this)); } }}}
false
false
false
false
false
0
nfs_block_sillyrename(struct dentry *dentry) { struct nfs_inode *nfsi = NFS_I(d_inode(dentry)); wait_event(nfsi->waitqueue, atomic_cmpxchg(&nfsi->silly_count, 1, 0) == 1); }
false
false
false
false
false
0
AddServer(CServer* in_server, bool fromUser) { if ( !in_server->GetPort() ) { if ( fromUser ) { AddLogLineC(CFormat( _("Server not added: [%s:%d] does not specify a valid port.") ) % in_server->GetAddress() % in_server->GetPort() ); } return false; } else if ( !in_server->HasDynIP() && ...
false
false
false
false
false
0
write_regs(struct fp_img_dev *dev, uint16_t first_reg, uint16_t num_regs, unsigned char *values, write_regs_cb_fn callback, void *user_data) { struct write_regs_data *wrdata; struct libusb_transfer *transfer = libusb_alloc_transfer(0); unsigned char *data; int r; if (!transfer) return -ENOMEM; wrdata = g_ma...
false
false
false
false
false
0
move_chunk(struct syslinux_movelist ***moves, struct syslinux_memmap **mmap, struct syslinux_movelist **fp, addr_t copylen) { addr_t copydst, copysrc; addr_t freebase, freelen; addr_t needlen; int reverse; struct syslinux_movelist *f = *fp, *mv; if (f->src < f->dst && (f->dst - f->src) ...
false
false
false
false
false
0
GetControl() const { // return the focused control (left or right) if (m_pControl2) { wxWindow* focused = wxWindow::FindFocus(); if (focused == m_pControl2) return m_pControl2; } return m_pControl; }
false
false
false
false
false
0
uwb_radio_reset_state(struct uwb_rc *rc) { struct uwb_pal *pal; mutex_lock(&rc->uwb_dev.mutex); list_for_each_entry(pal, &rc->pals, node) { if (pal->channel) { pal->channel = -1; if (pal->channel_changed) pal->channel_changed(pal, -1); } } rc->beaconing = -1; rc->scanning = -1; mutex_unlock(&rc...
false
false
false
false
false
0
restartVideoStreaming(const char* vc) { int r = -1; if (m_pVideostream) { m_pVideostream->StopStreaming(); r = m_pVideostream->StartStreaming(vc); if (r == 0) { if (!GetRtConfig(VIDEO_CODECS) || !GetCodecInfo().FindAttribute("maxauto") || CodecGetAttr(GetCodecInfo(), "maxauto", &m_iMaxA...
false
false
false
false
false
0
fsm_rconfreq(f, id, inp, len) fsm *f; u_char id; u_char *inp; int len; { int code, reject_if_disagree; switch( f->state ){ case CLOSED: /* Go away, we're closed */ fsm_sdata(f, TERMACK, id, NULL, 0); return; case CLOSING: case STOPPING: return; case OPENED: /* Go down and ...
false
false
false
false
false
0
IsDefPhoEndKey( int key, int kbtype ) { if ( PhoneInxFromKey( key, 3, kbtype, 1 ) ) return 1; if ( key == ' ' ) return 1; return 0; }
false
false
false
false
false
0
qib_wantpiobuf_7322_intr(struct qib_devdata *dd, u32 needint) { unsigned long flags; spin_lock_irqsave(&dd->sendctrl_lock, flags); if (needint) dd->sendctrl |= SYM_MASK(SendCtrl, SendIntBufAvail); else dd->sendctrl &= ~SYM_MASK(SendCtrl, SendIntBufAvail); qib_write_kreg(dd, kr_sendctrl, dd->sendctrl); qib_wr...
false
false
false
false
false
0
bfa_plog_add(struct bfa_plog_s *plog, struct bfa_plog_rec_s *pl_rec) { u16 tail; struct bfa_plog_rec_s *pl_recp; if (plog->plog_enabled == 0) return; if (plkd_validate_logrec(pl_rec)) { WARN_ON(1); return; } tail = plog->tail; pl_recp = &(plog->plog_recs[tail]); memcpy(pl_recp, pl_rec, sizeof(struct ...
false
false
false
false
false
0
real_distance_to_land(const struct tile *ptile, int max) { square_dxy_iterate(ptile, max, atile, dx, dy) { if (!terrain_has_flag(tile_terrain(atile), TER_OCEANIC)) { return map_vector_to_real_distance(dx, dy); } } square_dxy_iterate_end; return max + 1; }
false
false
false
false
false
0
mtnic_process_rx_cq(struct mtnic_port *priv, struct net_device *dev, struct mtnic_cq *cq) { struct mtnic_cqe *cqe; struct mtnic_ring *ring = &priv->rx_ring; int index; int err; struct io_buffer *rx_iob; unsigned int length; /* We assume a 1:1 mapping between CQEs and Rx descriptors, so Rx * descriptor ...
false
false
false
false
false
0
checkInvalidPrintOption(GBool option, char *option_name) { if (option) { fprintf(stderr, "Error: %s may only be used with the -png or -jpeg output options.\n", option_name); exit(99); } }
false
false
false
false
false
0
pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal) { if (!EnableTBAA) return AAResultBase::pointsToConstantMemory(Loc, OrLocal); const MDNode *M = Loc.AATags.TBAA; if (!M) return AAResultBase::pointsToConstantMemory(Loc, OrLocal); // If this ...
false
false
false
false
false
0
Profile(JackClientInterface** table, JackGraphManager* manager, jack_time_t period_usecs, jack_time_t cur_cycle_begin, jack_time_t prev_cycle_end) { fAudioCycle = (fAudioCycle ...
false
false
false
false
false
0
get_mode (GtkWidget *widget, int *width, int *height, int *rate, GnomeRRRotation *rot) { GtkTreeIter iter; GtkTreeModel *model; GtkComboBox *box = GTK_COMBO_BOX (widget); int dummy; if (!gtk_combo_box_get_active_iter (box, &iter)) return FALSE; if (!width) width = &dummy; if (!height) heigh...
false
false
false
false
false
0
store_dh_state(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct scsi_device *sdev = to_scsi_device(dev); struct scsi_device_handler *scsi_dh; int err = -EINVAL; if (sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL) return -ENODEV; if (!sdev-...
false
false
false
false
false
0
lbtf_complete_command(struct lbtf_private *priv, struct cmd_ctrl_node *cmd, int result) { cmd->result = result; cmd->cmdwaitqwoken = 1; wake_up_interruptible(&cmd->cmdwait_q); if (!cmd->callback) __lbtf_cleanup_and_insert_cmd(priv, cmd); priv->cur_cmd = NULL; }
false
false
false
false
false
0
add_special_defines(void) { time_t now = time(NULL); pp_entry_t *ppp; char buf[32]; strftime(buf, sizeof(buf), "\"%b %d %Y\"", localtime(&now)); pp_add_define( "__DATE__", buf ); strftime(buf, sizeof(buf), "\"%H:%M:%S\"", localtime(&now)); pp_add_define( "__TIME__", buf ); ppp = pp_ad...
true
true
false
false
false
1
XFastConvertUtf8ToUcs(const unsigned char *buf, int len, unsigned int *ucs) { if (buf[0] & 0x80) { if (buf[0] & 0x40) { if (buf[0] & 0x20) { if (buf[0] & 0x10) { if (buf[0] & 0x08) { if (buf[0] & 0x04) { if (buf[0] & 0x02) { /* bad UTF-8 ...
false
false
false
false
false
0
slurmdbd_unpack_roll_usage_msg(dbd_roll_usage_msg_t **msg, uint16_t rpc_version, Buf buffer) { dbd_roll_usage_msg_t *msg_ptr = xmalloc(sizeof(dbd_roll_usage_msg_t)); *msg = msg_ptr; if (rpc_version >= SLURMDBD_2_3_VERSION) { safe_unpack16(&msg_ptr->archive_data, buffer); safe_unpack_time(&msg_ptr->en...
false
false
false
false
false
0
decode_extension_label(char *ext, void **data) { char *end = ext; while (*end != '\n') end++; *end = '\0'; *data = strdup(ext); *end = '\n'; while (*end != '}') end++; return end; }
false
false
false
false
false
0
project_targets_changed (GladeProject *project, GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GList *list; GSList *radios, *l; /* For each catalog */ for (list = glade_app_get_catalogs (); list; list = g_list_next (list)) { GladeTargetab...
false
false
false
false
false
0
defreds() { register int i; defred = NEW2(nstates, short); for (i = 0; i < nstates; i++) defred[i] = sole_reduction(i); }
false
false
false
false
false
0
gnc_locale_decimal_places (void) { static gboolean got_it = FALSE; static int places; struct lconv *lc; if (got_it) return places; lc = gnc_localeconv(); places = lc->frac_digits; /* frac_digits is already initialized by gnc_localeconv, hopefully * to a reasonable default. */...
false
false
false
false
false
0
PopDownMenu() { if (ActiveMenu == NULL) return; menu_on--; if (ActiveItem) ActiveItem->state = 0; XUnmapWindow(dpy, ActiveMenu->w); UninstallRootColormap(); XFlush(dpy); if (Context & (C_WINDOW | C_FRAME | C_TITLE | C_SIDEBAR)) menuFromFrameOrWindowOrTitlebar = TRUE; else menuFrom...
false
false
false
false
false
0
int_dotimes(num) VALUE num; { if (FIXNUM_P(num)) { long i, end; end = FIX2LONG(num); for (i=0; i<end; i++) { rb_yield(LONG2FIX(i)); } } else { VALUE i = INT2FIX(0); for (;;) { if (!RTEST(rb_funcall(i, '<', 1, num))) break; rb_yield(i); i = rb_funcall(i, '+', 1, INT2FIX(1)); ...
false
false
false
false
false
0
file() { int m,n; while (1) { // read a line from input script // n = length of line including str terminator, 0 if end of file // if line ends in continuation char '&', concatenate next line if (me == 0) { m = 0; while (1) { if (maxline-m < 2) reallocate(line,maxlin...
false
false
false
false
false
0
fs_binding_get(fs_binding *b, rasqal_variable *var) { #ifdef DEBUG_BINDING if (!strcmp(DEBUG_BINDING, name)) printf("@@ get_var("DEBUG_BINDING")\n"); #endif if (var->user_data) { long col = (long)var->user_data; return b+col; } const char *vname = (char *)var->name; fs_binding *vb ...
false
false
false
false
false
0
is16BitEquivalent(const char* orig, const char* equiv) { off_t i; for (i = 0;; i++) { if (orig[i] == '\0' && equiv[i] == '\0') return true; if (orig[i] == '\0' || equiv[i] == '\0') return false; if (orig[i] != equiv[i]) { if ((orig[i] == 'Q' || orig[i] == 'L') && equiv[i] == 'W') ...
false
false
false
false
false
0
vect_get_slp_defs (VEC (tree, heap) *ops, slp_tree slp_node, VEC (slp_void_p, heap) **vec_oprnds, int reduc_index) { gimple first_stmt, first_def; int number_of_vects = 0, i; unsigned int child_index = 0; HOST_WIDE_INT lhs_size_unit, rhs_size_unit; slp_tree child = NULL; VEC (tree, heap) ...
false
false
false
false
false
0
equal_independent_guards(__isl_keep isl_ast_graft_list *list, __isl_keep isl_ast_build *build) { int i, n; int depth; isl_ast_graft *graft_0; int equal = 1; int skip; graft_0 = isl_ast_graft_list_get_ast_graft(list, 0); if (!graft_0) return -1; depth = isl_ast_build_get_depth(build); skip = isl_set_involv...
false
false
false
false
false
0
process_packet_motion_v4(struct psmouse *psmouse) { struct input_dev *dev = psmouse->dev; struct elantech_data *etd = psmouse->private; unsigned char *packet = psmouse->packet; int weight, delta_x1 = 0, delta_y1 = 0, delta_x2 = 0, delta_y2 = 0; int id, sid; id = ((packet[0] & 0xe0) >> 5) - 1; if (id < 0) retu...
false
false
false
false
false
0
gst_registry_scan_plugin_file (GstRegistryScanContext * context, const gchar * filename, off_t file_size, time_t file_mtime) { gboolean changed = FALSE; GstPlugin *newplugin = NULL; #ifdef G_OS_WIN32 /* Disable external plugin loader on Windows until it is ported properly. */ context->helper_state = REGIST...
false
false
false
false
false
0
gcr_pkcs11_initialize_finish (GAsyncResult *result, GError **error) { g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL, gcr_pkcs11_initialize_async), FALSE); if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error)) ret...
false
false
false
false
false
0
Gif_NewStream(void) { Gif_Stream *gfs = Gif_New(Gif_Stream); if (!gfs) return 0; gfs->global = 0; gfs->background = 0; gfs->screen_width = gfs->screen_height = 0; gfs->loopcount = -1; gfs->comment = 0; gfs->images = 0; gfs->nimages = gfs->imagescap = 0; gfs->extensions = 0; gfs->errors = 0; ...
false
false
false
false
false
0
decNumberFromUInt32(decNumber *dn, uInt uin) { Unit *up; /* work pointer */ decNumberZero(dn); /* clean */ if (uin==0) return dn; /* [or decGetDigits bad call] */ for (up=dn->lsu; uin>0; up++) { *up=(Unit)(uin%(DECDPUNMAX+1)); uin=uin/(DECDPUNMAX+1); } dn->digits=decGetDigits(dn->lsu, up-dn-...
false
false
false
false
true
1
__bld_systf_iterator(struct h_t *hp) { register int32 ti; register struct hrec_t *hrp2; int32 num_vpi_systfs; vpiHandle ihref; struct pviter_t *iterp; struct h_t *hp2; if (hp != NULL) { __vpi_err(1866, vpiError, "vpi_iterate for vpiUserSystf requires NULL handle - %s illegal", __to_vpionam(__wrks...
false
false
false
false
false
0
process(ast_procdef* proc) { // (1) create gen-name gm_vocabulary & V = CPP_BE.get_language_voca(); gm_prepare_genname(proc, &V); // (2) rename property names A --> G_A rename_prop_name_t T; proc->traverse_pre(&T); }
false
false
false
false
false
0
niu_alloc_rx_ring_info(struct niu *np, struct rx_ring_info *rp) { BUILD_BUG_ON(sizeof(struct rxdma_mailbox) != 64); rp->rxhash = kcalloc(MAX_RBR_RING_SIZE, sizeof(struct page *), GFP_KERNEL); if (!rp->rxhash) return -ENOMEM; rp->mbox = np->ops->alloc_coherent(np->device, sizeof(struct rxdm...
false
false
false
false
false
0
dir_s_mkdir(argc, argv, obj) int argc; VALUE *argv; VALUE obj; { VALUE path, vmode; int mode; if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) { mode = NUM2INT(vmode); } else { mode = 0777; } check_dirname(&path); if (mkdir(RSTRING(path)->ptr, mode) == -1) rb_sys_...
false
false
false
false
false
0
lWriteElemTo(const lListElem *ep, FILE *fp) { dstring buffer = DSTRING_INIT; const char *str; DENTER(CULL_LAYER, "lWriteElemTo"); lWriteElem_(ep, &buffer, 0); str = sge_dstring_get_string(&buffer); if (str != NULL) { fprintf(fp, "%s", str); } sge_dstring_free(&buffer); DRETURN_VOID; ...
false
false
false
false
false
0
subid_block(Block *block_head) { Block *bpt; bpt = block_head; while (bpt != NULL) { subid_pe(bpt->pre_head); subid_pe(bpt->post_head); if (bpt->inner != NULL) { subid_block(bpt->inner); } bpt = bpt->next; } }
false
false
false
false
false
0
fromHex(char ch) { return (ch >= '0' && ch <= '9') ? ch-'0' : (toupper(ch)-'A')+10; }
false
false
false
false
false
0
search_name(char* name, befig_list* befig) { bereg_list* bereg; beaux_list* beaux; bebux_list* bebux; biabl_list* biabl; for (beaux=befig->BEAUX; beaux; beaux=beaux->NEXT) { if (beaux->NAME!=name) continue; search_abl(beaux->ABL,befig); eval_delay(beaux->NAME,beaux->ABL); ret...
false
false
false
false
false
0
text_editor_set_popup_menu (TextEditor *te, GtkWidget *popup_menu) { if (popup_menu) g_object_ref (popup_menu); if (te->popup_menu) g_object_unref (te->popup_menu); te->popup_menu = popup_menu; }
false
false
false
false
false
0
register_state(void) { bx_list_c *list = new bx_list_c(SIM->get_bochs_root(), "virt_timer", "Virtual Timer State", 17); bx_list_c *vtimers = new bx_list_c(list, "timer", numTimers); for (unsigned i = 0; i < numTimers; i++) { char name[4]; sprintf(name, "%d", i); bx_list_c *bxtimer = new bx_list_c(vtim...
false
false
false
false
false
0
Process() { mPass = 0; mSecondPassDisabled = false; InitPass1(); this->CopyInputTracks(); // Set up mOutputTracks. bool bGoodResult = ProcessPass(); if (bGoodResult && !mSecondPassDisabled) { mPass = 1; if (InitPass2()) bGoodResult = ProcessPass(); ...
false
false
false
false
false
0
cam_calc_length_field_size (guint length) { guint field_len; if (length < G_MAXUINT8) field_len = 1; else if (length <= G_MAXUINT16) field_len = 3; else if (length <= (1 << 24) - 1) field_len = 4; else field_len = 5; return field_len; }
false
false
false
false
false
0
ReportFailedLevels(void) { lump_t *cur; int lev_count = 0; int fail_soft = 0; int fail_hard = 0; int fail_v5 = 0; boolean_g need_spacer = FALSE; for (cur=wad.dir_head; cur; cur=cur->next) { if (! (cur->lev_info && ! (cur->lev_info->flags & LEVEL_IS_GL))) continue; lev_count++; ...
false
false
false
false
false
0
dbAllocBottomUp(struct inode *ip, s64 blkno, s64 nblocks) { struct metapage *mp; struct dmap *dp; int nb, rc; s64 lblkno, rem; struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap; struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; IREAD_LOCK(ipbmap, RDWRLOCK_DMAP); /* block to be allocated better be within the mapsize....
false
false
false
false
false
0
next_tk(iseoferr) /* This function reads the next token from the token list and places a */ /* pointer to the token (structure) in the global variable "token". */ /* The "iseoferr" determines whether a fuss should be made if the next token */ /* fetched is TK_EOF. If iseoferr==TRUE and the next token ...
false
false
false
false
false
0
perror (const char *s) { int errnum = errno; FILE *fp; int fd = -1; /* The standard says that 'perror' must not change the orientation of the stream. What is supposed to happen when the stream isn't oriented yet? In this case we'll create a new stream which is using the same underlying file d...
false
false
false
false
false
0
__connman_service_read_ip6config(struct connman_service *service) { GKeyFile *keyfile; if (service->ipconfig_ipv6 == NULL) return; keyfile = connman_storage_load_service(service->identifier); if (keyfile == NULL) return; __connman_ipconfig_load(service->ipconfig_ipv6, keyfile, service->identifier, "IPv6...
false
false
false
false
false
0
is_ccd_grayscale (pixma_t * s) { return (has_ccd_sensor (s) && (s->param->channels == 1)); }
false
false
false
false
false
0
glade_widget_write_special_child_prop (GladeWidget * parent, GObject * object, GladeXmlContext * context, GladeXmlNode * node) { gchar *buff, *special_child_type; buff = g_object_get_data (object, "...
false
false
false
false
false
0
bnx2x_vf_mbx_set_q_flags(struct bnx2x *bp, u32 mbx_q_flags, unsigned long *sp_q_flags) { if (mbx_q_flags & VFPF_QUEUE_FLG_TPA) __set_bit(BNX2X_Q_FLG_TPA, sp_q_flags); if (mbx_q_flags & VFPF_QUEUE_FLG_TPA_IPV6) __set_bit(BNX2X_Q_FLG_TPA_IPV6, sp_q_flags); if (mbx_q_flags & VFPF_QUEUE_FLG_TPA_GRO) __set...
false
false
false
false
false
0
ols_bat_release (MSOleBAT *bat) { if (bat->block != NULL) { bat->num_blocks = 0; g_free (bat->block); bat->block = NULL; } }
false
false
false
false
false
0
fixit (const char *type, const char *orig) { definition *def; def = findval (defined, type, findit); if (def == NULL || def->def_kind != DEF_TYPEDEF) { return orig; } switch (def->def.ty.rel) { case REL_VECTOR: if (streq (def->def.ty.old_type, "opaque")) return ("char"); else...
false
false
false
false
false
0
gfarm_ldap_db_deadfilecopy_set_field( void *vinfo, char *attribute, char **vals) { gfarm_error_t err = GFARM_ERR_NO_ERROR; struct db_deadfilecopy_arg *info = vinfo; static const char diag[] = "gfarm_ldap_db_deadfilecopy_set_field"; if (strcasecmp(attribute, "inumber") == 0) { info->inum = gfarm_strtoi64(vals[...
false
false
false
false
false
0
hash_sync(const DB *dbp, uint flags) { HTAB *hashp; if (flags != 0) { errno = EINVAL; return (DBM_ERROR); } if (!dbp) return (DBM_ERROR); hashp = (HTAB *)dbp->internal; if(!hashp) return (DBM_ERROR); if (!hashp->save_file) return (0); if (__buf_free(hashp, 0, 1) || flush_meta(hashp)) return (DBM...
false
false
false
false
false
0
decode_CMSVersion(const unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, CMSVersion *data, size_t *size) { size_t ret = 0; size_t l HEIMDAL_UNUSED_ATTRIBUTE; int e HEIMDAL_UNUSED_ATTRIBUTE; memset(data, 0, sizeof(*data)); { size_t Top_datalen, Top_oldlen; Der_type Top_type; int is_indefi...
false
false
false
false
false
0
iptux_get_section_string(const char *msg, char ch, uint8_t times) { const char *pptr, *ptr; char *string; size_t len; if (!(pptr = iptux_skip_section(msg, ch, times))) return NULL; ptr = strchr(pptr, ch); if ((len = ptr ? ptr - pptr : strlen(pptr)) == 0) ...
false
false
false
false
false
0
wopen_internal(const wcstring &pathname, int flags, mode_t mode, bool cloexec) { ASSERT_IS_NOT_FORKED_CHILD(); cstring tmp = wcs2string(pathname); /* Prefer to use O_CLOEXEC. It has to both be defined and nonzero */ #ifdef O_CLOEXEC if (cloexec && O_CLOEXEC) { flags |= O_CLOEXEC; clo...
false
false
false
false
false
0
auth_token_get(char *item_type, char *username) { char *token_str; Auth_token *token; if ((token_str = auth_token_get_flattened(item_type, username)) == NULL) return(NULL); if ((token = auth_token_unflatten(token_str, item_type)) == NULL) return(NULL); return(token); }
false
false
false
false
false
0
LoadSubmittedMetadata( const AACENC_MetaData * const hMetadata, const INT nChannels, const INT metadataMode, AAC_METADATA * const pAacMetaData ) { FDK_METADATA_ERROR err = METADATA_OK; if (pAacMetaData==NULL) { ...
false
false
false
false
false
0
main(int argc, char **argv) { struct store *st; struct inode root; struct revrec frev; struct dentry dots; time_t now; int fd; char tbuf[1024]; if(argc < 2) { fprintf(stderr, "usage; mkfs.vc DIR\n"); exit(1); } if(mkfstore(argv[1])) exit(1); if((st = newfstore(argv[1]...
true
true
false
false
true
1
discriminatorHasChanged() { // Retrieve the integer value of the discriminator from // the buffer of the DynAny which it is stored in. TypeCode_union::Discriminator newdisc; try { pd_disc->pd_buf.rewindInputPtr(); newdisc = TypeCode_union_helper::unmarshalLabel(pd_disc_type, pd_disc->pd_buf); } ...
false
false
false
false
false
0
optimize_double_finally (gimple one, gimple two) { gimple oneh; gimple_stmt_iterator gsi; gsi = gsi_start (gimple_try_cleanup (one)); if (!gsi_one_before_end_p (gsi)) return; oneh = gsi_stmt (gsi); if (gimple_code (oneh) != GIMPLE_TRY || gimple_try_kind (oneh) != GIMPLE_TRY_CATCH) return; ...
false
false
false
false
false
0
mpd_sync_poll(struct mpd_async *async, struct timeval *tv) { unsigned fd; fd_set rfds, wfds, efds; int ret; enum mpd_async_event events; fd = mpd_async_get_fd(async); while (1) { events = mpd_async_events(async); if (events == 0) return 0; FD_ZERO(&rfds); FD_ZERO(&wfds); FD_ZERO(&efds); if (eve...
false
false
false
false
false
0
tns_render_log_start(tns_outbuf *outbuf) { check(tns_outbuf_init(outbuf) != -1, "Failed to init buffer."); check(tns_outbuf_putc(outbuf, ']') != -1, "Failed ending request."); return outbuf->used_size; error: return -1; }
false
false
false
false
false
0
make_move (int player, int start_pos, int end_pos) { if (valid_start_pos (player, start_pos) == FALSE) { return FALSE; } if (valid_end_pos (end_pos) == FALSE) { return FALSE; } if (is_legal_move (player, start_pos, end_pos) == FALSE) { return FALSE; } move_piece (st...
false
false
false
false
false
0
ibus_text_new_from_string (const gchar *str) { g_assert (str); IBusText *text; text= g_object_new (IBUS_TYPE_TEXT, NULL); text->is_static = FALSE; text->text = g_strdup (str); return text; }
false
false
false
false
false
0
instantiateMatch(const Token *instance, const std::string &name, std::size_t numberOfArguments, const char patternAfter[]) { if (!Token::simpleMatch(instance, (name + " <").c_str())) return false; if (numberOfArguments != TemplateSimplifier::templateParameters(instance->next())) return false; ...
false
false
false
false
false
0
_on_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info) { Evas_Event_Mouse_Up *ev = event_info; Elm_Object_Item *item; Elm_Index_Item *id_item; ELM_INDEX_DATA_GET(data, sd); if (ev->button != 1) return; sd->down = 0; item = ...
false
false
false
false
false
0
snmp_collator_stop() { int err; if (snmp_collator_stopped) { return 0; } /* Abort any pending events */ slapi_eq_cancel(snmp_eq_ctx); snmp_collator_stopped = 1; /* acquire the semaphore */ snmp_collator_sem_wait(); /* close the memory map */ if ((err = agt_mclose_stats(hdl)) != 0) { f...
false
false
false
false
false
0
data_stack_grow(SRE_STATE* state, Py_ssize_t size) { Py_ssize_t minsize, cursize; minsize = state->data_stack_base+size; cursize = state->data_stack_size; if (cursize < minsize) { void* stack; cursize = minsize+minsize/4+1024; TRACE(("allocate/grow stack %" PY_FORMAT_SIZE_T "d\n"...
false
false
false
false
false
0
xopen FCN((file_name,path,extensions,iomode)) outer_char*file_name C0("") outer_char HUGE*path C0("") SEQUENCES*extensions C0("") CONST outer_char*iomode C1("") { outer_char HUGE*p1; FILE*file_ptr; outer_char total_name[2*MAX_FILE_NAME_LENGTH]; outer_char prefix_end_str[2]; if(!*file_name) return FOPEN(wt_style.null_f...
false
false
true
false
true
1
constant_expression_value() { ir_constant *array = this->array->constant_expression_value(); ir_constant *idx = this->array_index->constant_expression_value(); if ((array != NULL) && (idx != NULL)) { void *ctx = ralloc_parent(this); if (array->type->is_matrix()) { /* Array access of a matrix res...
false
false
false
false
false
0
avc1394_init_target( raw1394handle_t handle, avc1394_command_handler_t cmd_handler) { if (cmd_handler == NULL) return -1; g_command_handler = cmd_handler; if (raw1394_set_fcp_handler( handle, target_fcp_handler ) < 0) return -1; return raw1394_start_fcp_listen( handle ); }
false
false
false
false
false
0
clearSelection(TreeMapItem* parent) { TreeMapItemList old = _selection; // remove any selection which is child of <parent> foreach(TreeMapItem* i, _selection) if (i->isChildOf(parent)) _selection.removeAll(i); TreeMapItem* changed = diff(old, _selection).commonParent(); if (changed) { changed->...
false
false
false
false
false
0