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
gretl_print_get_chunk (PRN *prn) { char *buf; if (prn == NULL || prn->buf == NULL || prn->savepos < 0 || prn->savepos > strlen(prn->buf)) { return NULL; } buf = gretl_strdup(prn->buf + prn->savepos); prn->savepos = -1; return buf; }
false
false
false
false
false
0
process(ast_procdef* p) { gps_opt_edge_iteration_t T; p->traverse_post(&T); if (T.has_targets()) T.post_process(); }
false
false
false
false
false
0
mlx4_en_stamp_wqe(struct mlx4_en_priv *priv, struct mlx4_en_tx_ring *ring, int index, u8 owner) { __be32 stamp = cpu_to_be32(STAMP_VAL | (!!owner << STAMP_SHIFT)); struct mlx4_en_tx_desc *tx_desc = ring->buf + index * TXBB_SIZE; struct mlx4_en_tx_info *tx_info = &ring->tx_info[index]; void *end = ...
false
false
false
false
false
0
fsbe_write_pe_statement_item_hook(cx, sp, p) fsbe_context *cx; Pe_statement *sp; Statement *p; { Block *current_bp = sp->block; int pe_no = ompfbe_current_pe_number_in_cluster_from_pe_statement(sp); if (current_bp->usage == USE_EMT || ompfbe_is_shared_loop_body(sp->block) || sp->vpe_n...
false
false
false
false
false
0
reservation_object_get_fences_rcu(struct reservation_object *obj, struct fence **pfence_excl, unsigned *pshared_count, struct fence ***pshared) { unsigned shared_count = 0; unsigned retry = 1; struct fence **shared = NULL, *fence_excl = NULL; int ret = 0; while (retry) { struct res...
false
false
false
false
false
0
out( MifOutputByteStream &os, unsigned properties, FontStatement fontStatement ) { const char *statementName = (fontStatement == stPgfFont) ? "PgfFont" : "Font"; if( properties ) { os << '\n' << MifOutputByteStream::INDENT << "<" << statemen...
false
false
false
false
false
0
ioctlcallback(CURL *handle, int cmd, void *clientp) { int *counter = (int *)clientp; (void)handle; /* unused */ if(cmd == CURLIOCMD_RESTARTREAD) { fprintf(stderr, "REWIND!\n"); *counter = 0; /* clear counter to make the read callback restart */...
false
false
false
false
false
0
get_user_func_name(xp, idx) expand_T *xp; int idx; { static long_u done; static hashitem_T *hi; ufunc_T *fp; if (idx == 0) { done = 0; hi = func_hashtab.ht_array; } if (done < func_hashtab.ht_used) { if (done++ > 0) ++hi; while (HASHITEM_EMPTY(hi)) ++hi; fp = HI...
false
false
false
true
false
1
has_modal_parent() const { CL_GUIManager *gui = get_gui_manager(); if (gui != NULL) { if (impl->parent) if (impl->parent == gui->get_modal_component()) return true; else return impl->parent->has_modal_parent(); } return false; }
false
false
false
false
false
0
cb_build_perform_once (cb_tree body) { cb_tree x; if (body == cb_error_node) { return cb_error_node; } x = cb_build_perform (CB_PERFORM_ONCE); CB_PERFORM (x)->body = body; return x; }
false
false
false
true
false
1
syn_cmd_reset(eap, syncing) exarg_T *eap; int syncing UNUSED; { eap->nextcmd = check_nextcmd(eap->arg); if (!eap->skip) { set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"reset"); do_cmdline_cmd((char_u *)"runtime! syntax/syncolor.vim"); do_unlet((char_u *)"g:syntax_cmd", TRUE); } ...
false
false
false
false
false
0
save_to_buffer_thread (GSimpleAsyncResult *result, GObject *object, GCancellable *cancellable) { SaveArguments *arguments; GthImageSaveData *data; GError *error = NULL; arguments = g_simple_async_result_get_op_res_gpointer (result); data = _gth_image_save_to_buffer_common (arg...
false
false
false
false
false
0
StartButtonInit(int height) { FvwmPicture *p = NULL; int pw; FvwmPictureAttributes fpa; StartAndLaunchButtonItem *tempPtr; fpa.mask = FPAM_NO_ALLOC_PIXELS; /* if no start button params were specified, trick the program into * thinking that they were */ if (First_Start_Button == NULL && !NoDefaultStar...
false
false
false
false
true
1
load(ifstream & fp){ size_t r = loadValue<size_t>(fp); size_t pos = fp.tellg(); fp.seekg(pos-sizeof(size_t)); cout << "Loading "<< r << endl; switch(r) { case CSTY: return SuffixTreeY::load(fp); } return NULL; }
false
false
false
false
false
0
get_kungfum_bg_tile_info( int offs ) { int code; int color; int flags; code = m62_tileram[ offs ]; color = m62_tileram[ offs + 0x800 ]; flags = 0; if( ( color & 0x20 ) ) { flags |= TILE_FLIPX; } SET_TILE_INFO( 0, code | ( ( color & 0xc0 ) << 2 ), color & 0x1f, flags ); /* is the following ri...
false
false
false
false
false
0
semantic_type_new (uniqstr tag, const location *loc) { semantic_type *res = xmalloc (sizeof *res); uniqstr_assert (tag); res->tag = tag; res->location = loc ? *loc : empty_location; res->status = undeclared; { int i; for (i = 0; i < CODE_PROPS_SIZE; ++i) code_props_none_init (&res->props[i]);...
false
false
false
false
false
0
TRANS_mid() { PATTERN *str; PATTERN *pos; PATTERN *len; PATTERN *save; TRANS_want(RS_LBRA, "Left bracket"); str = JOB->current; TRANS_expression(FALSE); TRANS_want(RS_COMMA, "Comma"); pos = JOB->current; TRANS_expression(FALSE); CODE_push_number(1); CODE_op(C_SUB, 0, 2, TRUE); TRANS_subr(TS_SUBR_LE...
false
false
false
false
false
0
vpn_provider_new(void) { struct vpn_provider *provider; provider = g_try_new0(struct vpn_provider, 1); if (provider == NULL) return NULL; provider->refcount = 1; DBG("provider %p", provider); provider_initialize(provider); return provider; }
false
false
false
false
false
0
GetSortOrders (OrderMaker &left, OrderMaker &right) { // initialize the size of the OrderMakers left.numAtts = 0; right.numAtts = 0; // loop through all of the disjunctions in the CNF and find those // that are acceptable for use in a sort ordering for (int i = 0; i < numAnds; i++) { // if we don't have a ...
false
false
false
false
false
0
unity_filter_set_model_and_iter (UnityFilter* self, DeeModel* model, DeeModelIter* iter) { DeeModel* _tmp0_ = NULL; DeeModel* _tmp1_ = NULL; DeeModelIter* _tmp2_ = NULL; DeeModel* _tmp3_ = NULL; DeeModel* _tmp4_ = NULL; DeeModelIter* _tmp5_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (model != NUL...
false
false
false
false
false
0
CERT_FindCertByIssuerAndSN(CERTCertDBHandle *handle, CERTIssuerAndSN *issuerAndSN) { PK11SlotInfo *slot; CERTCertificate *cert; cert = PK11_FindCertByIssuerAndSN(&slot,issuerAndSN,NULL); if (cert && slot) { PK11_FreeSlot(slot); } return cert; }
false
false
false
false
false
0
listen(const std::string& ip, unsigned short int port, int backlog) { log_info("listen ip=" << ip << " port=" << port); _impl->listen(ip, port, backlog); }
false
false
false
false
false
0
sbs_get_property_index(struct i2c_client *client, enum power_supply_property psp) { int count; for (count = 0; count < ARRAY_SIZE(sbs_data); count++) if (psp == sbs_data[count].psp) return count; dev_warn(&client->dev, "%s: Invalid Property - %d\n", __func__, psp); return -EINVAL; }
false
false
false
false
false
0
plugin_print_lists(void) { int i; struct slapdplugin *list = NULL; struct slapdplugin *tmp = NULL; for (i = 0; i < PLUGIN_LIST_GLOBAL_MAX; i++) { if ((list = get_plugin_list(i))) { slapi_log_error(SLAPI_LOG_PLUGIN, NULL, "---- Plugin List (type %d) ----\n", i); for ( tmp = list; tmp; tmp = tmp->plg_n...
false
false
false
false
false
0
GlobalizeReference(i::Object** obj) { if (IsDeadCheck("V8::Persistent::New")) return NULL; LOG_API("Persistent::New"); i::Handle<i::Object> result = i::GlobalHandles::Create(*obj); return result.location(); }
false
false
false
false
false
0
xol_free_insn_slot(struct task_struct *tsk) { struct xol_area *area; unsigned long vma_end; unsigned long slot_addr; if (!tsk->mm || !tsk->mm->uprobes_state.xol_area || !tsk->utask) return; slot_addr = tsk->utask->xol_vaddr; if (unlikely(!slot_addr)) return; area = tsk->mm->uprobes_state.xol_area; vma_en...
false
false
false
false
false
0
insert_table (CTL_MSG * request, CTL_RESPONSE * response) { table_t *ptr; ptr = malloc (sizeof *ptr); if (!ptr) { syslog (LOG_ERR, "Out of memory"); exit (EXIT_FAILURE); } request->id_num = new_id (); if (debug) print_request ("insert_table", request); response->id_num = htonl (r...
false
false
false
false
false
0
g3d_vector_transform(G3DVector *x, G3DVector *y, G3DVector *z, G3DMatrix *matrix) { G3DVector vector[4], result[4]; guint32 i, k; vector[0] = *x; vector[1] = *y; vector[2] = *z; vector[3] = 1.0; for(i = 0; i < 4; i ++) { result[i] = 0.0; for(k = 0; k < 4; k ++) #if 0 result[i] += matrix[i * 4 + k] * v...
false
false
false
false
false
0
gconf_notifier_wrapper_trigger (G_GNUC_UNUSED GConfClient *client_, guint identifier, GConfEntry *entry, gpointer user_data) { GConfNotifierWrap *wrapper = NULL; g_return_if_fail (user_data != NULL); wrapper = (GConfNotifierWrap *)user_data; wrapper->real_notifier (GUINT_TO_POINTER (identifier), ...
false
false
false
false
false
0
aim_tx_completion(struct most_interface *iface, int channel_id) { struct aim_channel *channel; if (!iface) { pr_info("Bad interface pointer\n"); return -EINVAL; } if ((channel_id < 0) || (channel_id >= iface->num_channels)) { pr_info("Channel ID out of range\n"); return -EINVAL; } channel = get_channel(...
false
false
false
false
false
0
isl_ast_node_alloc(isl_ctx *ctx, enum isl_ast_node_type type) { isl_ast_node *node; node = isl_calloc_type(ctx, isl_ast_node); if (!node) return NULL; node->ctx = ctx; isl_ctx_ref(ctx); node->ref = 1; node->type = type; return node; }
false
false
false
false
false
0
reference_create( git_reference **ref_out, git_repository *repo, const char *name, git_rtype type) { char normalized[MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH]; int error = GIT_SUCCESS, size; git_reference *reference = NULL; assert(ref_out && repo && name); if (type == GIT_REF_SYMBOLIC) size = sizeof(reference...
true
true
false
false
true
1
test_empty (hb_set_t *s) { hb_codepoint_t next = HB_SET_VALUE_INVALID; g_assert_cmpint (hb_set_get_population (s), ==, 0); g_assert_cmpint (hb_set_get_min (s), ==, HB_SET_VALUE_INVALID); g_assert_cmpint (hb_set_get_max (s), ==, HB_SET_VALUE_INVALID); g_assert (!hb_set_has (s, 13)); g_assert (!hb_set_next (s...
false
false
false
false
false
0
d_laplace( FMField *out, FMField *gradP1, FMField *gradP2, FMField *coef, VolumeGeometry *vg, int32 *elList, int32 elList_nRow ) { int32 ii, iel, dim, nQP, ret = RET_OK; FMField *dgp2 = 0, *gp1tdgp2 = 0; nQP = vg->bfGM->nLev; dim = vg->bfGM->nRow; fmf_createAlloc( &dgp2, 1, nQP, dim, 1 ); fmf_create...
false
false
false
false
false
0
imap_vprintf( const char *fmt, va_list ap ) { const char *s, *es; char *d, *ed; int maxlen; char c; char buf[1024]; /* Minimal supported command buffer size per IMAP spec. */ d = buf; ed = d + sizeof(buf); s = fmt; for (;;) { c = *fmt; if (!c || c == '%') { int l = fmt - s; if (d + l > ed) oob()...
false
false
false
false
false
0
ev_signal_stop (EV_P_ ev_signal *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; wlist_del (&signals [w->signum - 1].head, (WL)w); ev_stop (EV_A_ (W)w); if (!signals [w->signum - 1].head) { #if EV_MULTIPLICITY signals [w->signum - 1...
false
false
false
false
false
0
mpickstuff(struct monst *mtmp, const char *str) { struct obj *otmp, *otmp2; /* prevent shopkeepers from leaving the door of their shop */ if(mtmp->isshk && inhishop(mtmp)) return false; for(otmp = level.objects[mtmp->mx][mtmp->my]; otmp; otmp = otmp2) { otmp2 = otmp->nexthere; /* N...
false
false
false
false
false
0
l2tp_send_OCCN(struct l2tp_sess_t *sess) { struct l2tp_packet_t *pack = NULL; log_session(log_info2, sess, "sending OCCN\n"); pack = l2tp_packet_alloc(2, Message_Type_Outgoing_Call_Connected, &sess->paren_conn->peer_addr, sess->hide_avps, sess->paren_conn->secret, sess->paren_conn->secret_len); if ...
false
false
false
false
false
0
queueMultiCommand(redisClient *c, struct redisCommand *cmd) { multiCmd *mc; int j; c->mstate.commands = zrealloc(c->mstate.commands, sizeof(multiCmd)*(c->mstate.count+1)); mc = c->mstate.commands+c->mstate.count; mc->cmd = cmd; mc->argc = c->argc; mc->argv = zmalloc(sizeof(robj*...
false
false
false
false
false
0
iio_map_array_unregister(struct iio_dev *indio_dev) { int ret = -ENODEV; struct iio_map_internal *mapi; struct list_head *pos, *tmp; mutex_lock(&iio_map_list_lock); list_for_each_safe(pos, tmp, &iio_map_list) { mapi = list_entry(pos, struct iio_map_internal, l); if (indio_dev == mapi->indio_dev) { list_del...
false
false
false
false
false
0
expandDim(const QSize& orig, WidgetType wt, int baseMarginMetric, const QStyleOption* opt, const QWidget* w, bool rotated) const { int addWidth = 2*widgetLayoutProp(wt, baseMarginMetric + MainMargin, opt, w) + widgetLayoutProp(wt, baseMarginMetric + Left, opt, w) + ...
false
false
false
false
false
0
parseInt(char* &p, int& i) { while (*p==' ' || *p=='\t') p++; char* start=p; if (*p=='-') p++; else if (*p=='+') { p++;start++; } while ((*p>='1' && *p<='9') || *p=='0') p++; //now p is on a non-digit; if (*start=='-' && p==start+1) return false; char saved=*p; *p='\0'; char* endptr=p; long l=strtol(st...
false
false
false
false
false
0
rerere_io_putmem(const char *mem, size_t sz, struct rerere_io *io) { if (io->output) ferr_write(mem, sz, io->output, &io->wrerror); }
false
false
false
false
false
0
dwConfigure(dwDevice_t* dev) { dwEnableClock(dev, dwClockAuto); delayms(5); // Reset the chip if (dev->ops->reset) { dev->ops->reset(dev); } else { dwSoftReset(dev); } if (dwGetDeviceId(dev) != 0xdeca0130) { return DW_ERROR_WRONG_ID; } // Set default address memset(dev->networkAndAddr...
false
false
false
false
false
0
gst_object_get_name (GstObject * object) { gchar *result = NULL; g_return_val_if_fail (GST_IS_OBJECT (object), NULL); GST_OBJECT_LOCK (object); result = g_strdup (object->name); GST_OBJECT_UNLOCK (object); return result; }
false
false
false
false
false
0
processingStarted() { ProgressDialog->setLabelText( tr( "Please wait while gpsbabel is processing data..." ) ); ProgressDialog->setMinimum( 0 ); ProgressDialog->setMaximum( 0 ); ProgressDialog->exec(); ProgressDialog->setValue( 0 ); }
false
false
false
false
false
0
es_freeSurface(sdl_data *sd, int len, char * buff) { char *bp; SDL_Surface * sptr; bp = buff; POPGLPTR(sptr, bp); if(sptr == NULL) error(); SDL_FreeSurface(sptr); }
false
false
false
false
false
0
convergeephemerons (global_State *g) { int changed; do { GCObject *w; GCObject *next = g->ephemeron; /* get ephemeron list */ g->ephemeron = NULL; /* tables may return to this list when traversed */ changed = 0; while ((w = next) != NULL) { next = gco2t(w)->gclist; if (traverseephe...
false
false
false
false
false
0
find_uses_to_rename_stmt (gimple stmt, bitmap *use_blocks, bitmap need_phis) { ssa_op_iter iter; tree var; basic_block bb = gimple_bb (stmt); if (is_gimple_debug (stmt)) return; FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES) find_uses_to_rename_use (bb, var, use_blocks, need_phis); }
false
false
false
false
false
0
unputcmdline() { if (cmd_silent) return; msg_no_more = TRUE; if (ccline.cmdlen == ccline.cmdpos) msg_putchar(' '); #ifdef FEAT_MBYTE else if (has_mbyte) draw_cmdline(ccline.cmdpos, (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos)); #endif else draw_cmdline(ccline.cmdpos, 1); msg_no_mo...
false
false
false
false
false
0
reset_pattern(void) { int i, j; maxi = 0; maxj = 0; ci = -1; cj = -1; where = 0; el = 0; num_stars = 0; strcpy(helper_fn_names[patno], "NULL"); for (i = 0; i < 256; i++) label_coords[i][0] = -1; current_c_i = 0; constraint[0] = 0; action[0] = 0; for (i = 0; i < MAX_BOARD+2; i++) { f...
false
false
false
false
false
0
xstrcmp (char *s1, char *s2, size_t len) { /* Repeat until we run into null byte or white space in either string. */ while (len--) { if (tolower (*s1) != tolower (*s2)) return false; s1++; s2++; } return true; }
false
false
false
false
false
0
unpack_broken_parameters(ParseContext *context, Octstr *decoded) { int ret = 0; int first = 1; long pos; while (ret >= 0 && !parse_error(context) && parse_octets_left(context) > 0) { pos = octstr_len(decoded); ret = unpack_parameter(context, decoded); if (ret >= 0) { ...
false
false
false
false
false
0
highestUndoLevel(Solver& s) const { return up_ != undoStart() ? s.level(lits_->var(undoTop().idx())) : 0; }
false
false
false
false
false
0
spif_dlinked_list_item_init(spif_dlinked_list_item_t self) { ASSERT_RVAL(!SPIF_DLINKED_LIST_ITEM_ISNULL(self), FALSE); self->data = SPIF_NULL_TYPE(obj); self->prev = SPIF_NULL_TYPE(dlinked_list_item); self->next = SPIF_NULL_TYPE(dlinked_list_item); return TRUE; }
false
false
false
false
false
0
unix_wait(value unit) { int pid, status; enter_blocking_section(); pid = wait(&status); leave_blocking_section(); if (pid == -1) uerror("wait", Nothing); return alloc_process_status(pid, status); }
false
false
false
false
true
1
fbtft_register_backlight(struct fbtft_par *par) { struct backlight_device *bd; struct backlight_properties bl_props = { 0, }; if (par->gpio.led[0] == -1) { fbtft_par_dbg(DEBUG_BACKLIGHT, par, "%s(): led pin not set, exiting.\n", __func__); return; } bl_props.type = BACKLIGHT_RAW; /* Assume backlight is o...
false
false
false
false
false
0
common_find_ctrl_id(const char *name) { if (ctrl_str2q.find(name) == ctrl_str2q.end()) return 0; return ctrl_str2q[name].id; }
false
false
false
false
false
0
asle_set_backlight(struct drm_device *dev, u32 bclp) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_connector *intel_connector; struct opregion_asle *asle = dev_priv->opregion.asle; DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp); if (acpi_video_get_backlight_type() == acpi_backlight_native) { ...
false
false
false
false
false
0
shell_exec_memory_show_options(struct gnutella_shell *sh, int argc, const char *argv[]) { show_vec_t v[3]; shell_check(sh); g_assert(argv); g_assert(argc > 0); v[0].cb = xmalloc_show_settings_log; v[0].prefix = NULL; v[1].cb = malloc_show_settings_log; v[1].prefix = "malloc "; v[2].cb = shell_vtable_setting...
false
false
false
false
false
0
worker(void *arg) { struct worker *ego = (struct worker *)arg; struct work *w; for (;;) { /* wait until work becomes available */ os_sem_down(&ego->ready); w = ego->w; /* !w->proc ==> terminate worker */ if (!w->proc) break; /* do the work */ w->proc(&w->d); /* signal ...
false
false
false
false
false
0
hdrl_image_get_sqsum(const hdrl_image * self, double * result, double * error) { /* TODO should be collapse object */ cpl_ensure_code(result, CPL_ERROR_NULL_INPUT); *result = cpl_image_get_sqflux(self->image); if (error) { return cpl_error_set_message(cpl_func, CPL_ERROR_UNSUPPORTED_MODE, ...
false
false
false
false
false
0
applianceCommand(int command) { qWarning("AbstractAppliance::applianceCommand: current appliance '%s' doesn't handle command %d", qPrintable(applianceName()), command); return false; }
false
false
false
false
false
0
speakup_add_virtual_keyboard(void) { int err; virt_keyboard = input_allocate_device(); if (!virt_keyboard) return -ENOMEM; virt_keyboard->name = "Speakup"; virt_keyboard->id.bustype = BUS_VIRTUAL; virt_keyboard->phys = "speakup/input0"; virt_keyboard->dev.parent = NULL; __set_bit(EV_KEY, virt_keyboard->ev...
false
false
false
false
false
0
_parse_appinfo(BITSTREAM *bits, MPLS_AI *ai) { int len; off_t pos; if (!bs_is_align(bits, 0x07)) { fprintf(stderr, "_parse_appinfo: alignment error\n"); } pos = bs_pos(bits) >> 3; len = bs_read(bits, 32); // Reserved bs_skip(bits, 8); ai->playback_type = bs_read(bits, 8); ...
false
false
false
false
false
0
find_referenced_vars_in (gimple stmt) { size_t i; if (gimple_code (stmt) != GIMPLE_PHI) { for (i = 0; i < gimple_num_ops (stmt); i++) walk_tree (gimple_op_ptr (stmt, i), find_vars_r, NULL, NULL); } else { walk_tree (gimple_phi_result_ptr (stmt), find_vars_r, NULL, NULL); for (i = ...
false
false
false
false
false
0
set_nports(int new_ninputs, int new_noutputs) { // exit on bad counts, or if already initialized if (new_ninputs < 0 || new_noutputs < 0) return -EINVAL; if (_router && _router->_have_connections) { if (_router->_state >= Router::ROUTER_PREINITIALIZE) return -EBUSY; _router->_have_connections = fals...
false
false
false
false
false
0
handle_edit_startpos(struct connection *pconn, const struct packet_edit_startpos *packet) { struct tile *ptile = index_to_tile(packet->id); bool changed; /* Check. */ if (NULL == ptile) { notify_conn(pconn->self, NULL, E_BAD_COMMAND, ftc_editor, _("Invalid tile ind...
false
false
false
false
false
0
service_string_to_list(char *services) { GSList *l = NULL; char *start = services; int i, finished = 0; for (i = 0; !finished; i++) { if (services[i] == '\0') finished = 1; if (services[i] == ' ' || services[i] == '\0') { services[i] = '\0'; l = g_slist_append(l, start); start = services + i + 1; ...
false
false
false
false
false
0
Eigenvalues(TVector Re, TVector Im, TMatrix X) { int n; if (!Re || !Im || !X) { dw_Error(NULL_ERR); return 0; } if (Re == Im) { dw_Error(ARG_ERR); return 0; } n=RowM(X); if ((ColM(X) != n) || (DimV(Re) != n) || (DimV(Im) != n)) { dw_Error(SIZ...
false
false
false
false
false
0
main (int argc, char **argv) { GError *error = NULL; char *base; const char *clients[2][2] = { {DHCLIENT_PATH, "dhclient"}, {DHCPCD_PATH, "dhcpcd"} }; guint32 i; g_type_init (); if (!nm_utils_init (&error)) FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); /* The tests */ for (...
true
true
false
false
false
1
_bfd_elf_strtab_delref (struct elf_strtab_hash *tab, bfd_size_type idx) { if (idx == 0 || idx == (bfd_size_type) -1) return; BFD_ASSERT (tab->sec_size == 0); BFD_ASSERT (idx < tab->size); BFD_ASSERT (tab->array[idx]->refcount > 0); --tab->array[idx]->refcount; }
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
getARClassRegisterMask(StringRef Reg, StringRef Flags) { // The mask operand contains the special register (R Bit) in bit 4, whether // the register is spsr (R bit is 1) or one of cpsr/apsr (R bit is 0), and // bits 3-0 contains the fields to be accessed in the special register, set by // the flags provided wit...
false
false
false
false
false
0
DownloadPitFile(unsigned char **pitBuffer) const { Interface::Print("Downloading device's PIT file...\n"); int devicePitFileSize = ReceivePitFile(pitBuffer); if (!*pitBuffer) { Interface::PrintError("Failed to download PIT file!\n"); return (0); } Interface::Print("PIT file download successful.\n\n"); ret...
false
false
false
false
false
0
tag2_status_changed(MpdObj * mi, ChangedStatusType what, gpointer data) { if (what & MPD_CST_DATABASE) { if (tag2_ht) { g_list_foreach(tag2_ht, (GFunc) tag2_connection_changed_foreach, NULL); /* GList *list = g_list_first(tag2_ht); for(;list;list = g_list_next(list)) { ...
false
false
false
false
false
0
vmw_dmabuf_alloc_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct vmw_private *dev_priv = vmw_priv(dev); union drm_vmw_alloc_dmabuf_arg *arg = (union drm_vmw_alloc_dmabuf_arg *)data; struct drm_vmw_alloc_dmabuf_req *req = &arg->req; struct drm_vmw_dmabuf_rep *rep = &arg->rep...
false
false
false
false
false
0
_slurm_rpc_dump_jobs(slurm_msg_t * msg) { DEF_TIMERS; char *dump; int dump_size; slurm_msg_t response_msg; job_info_request_msg_t *job_info_request_msg = (job_info_request_msg_t *) msg->data; /* Locks: Read config job, write node (for hiding) */ slurmctld_lock_t job_read_lock = { READ_LOCK, READ_LOCK, NO_LOC...
false
false
false
false
false
0
bdev_readpage(void *_sb, struct page *page) { struct super_block *sb = _sb; struct block_device *bdev = logfs_super(sb)->s_bdev; int err; err = sync_request(page, bdev, READ); if (err) { ClearPageUptodate(page); SetPageError(page); } else { SetPageUptodate(page); ClearPageError(page); } unlock_page(pag...
false
false
false
false
false
0
test_strfunc(const char *str, char **ret) { char *s = strdup(str); int x = 0; if (s == NULL) return nerr_raise(NERR_NOMEM, "Unable to duplicate string in test_strfunc"); while (s[x]) { s[x] = tolower(s[x]); x++; } *ret = s; return STATUS_OK; }
false
false
false
false
false
0
main (int argc, char **argv) { CphIfaceMechanism *proxy; gboolean ret; GError *error; g_type_init (); error = NULL; proxy = cph_iface_mechanism_proxy_new_for_bus_sync ( G_BUS_TYPE_SYSTEM, ...
false
false
false
false
false
0
ibus_bus_preload_engines_async (IBusBus *bus, const gchar * const *names, gint timeout_msec, GCancellable *cancellable, GAsyncReadyCallback callback, ...
false
false
false
false
false
0
add_new_pl_or_spl_user_name(iTunesDB *itdb, gchar *dflt, gint32 position) { ExtraiTunesDBData *eitdb; gboolean is_spl = FALSE; gchar *name; g_return_if_fail (itdb); eitdb = itdb->userdata; g_return_if_fail (eitdb); if (!eitdb->itdb_imported) { gtkpod_warning_simple(_("Please load ...
false
false
false
false
false
0
cfg_layout_delete_block (basic_block bb) { rtx insn, next, prev = PREV_INSN (BB_HEAD (bb)), *to, remaints; if (bb->rbi->header) { next = BB_HEAD (bb); if (prev) NEXT_INSN (prev) = bb->rbi->header; else set_first_insn (bb->rbi->header); PREV_INSN (bb->rbi->header) = prev; insn = ...
false
false
false
false
false
0
gc_menu_board_free(GcomprisBoard *board) { g_free(board->type); g_free(board->mode); g_free(board->name); g_free(board->title); g_free(board->description); g_free(board->icon_name); g_free(board->author); g_free(board->boarddir); g_free(board->filename); g_free(board->difficulty...
false
false
false
false
false
0
betap(double phi, const void *a) { double s2, *c, sum; int i = MAX_C; s2 = sin(phi); s2 = s2 * s2; c = A->CP + MAX_C; sum = *--c; while (--i) sum = *--c + s2 * sum; return(cos(phi) * sum); }
false
false
false
false
false
0
findchar(char *str, int c) { while (*str) { if (t_iseq(str, c)) return str; str += pg_mblen(str); } return NULL; }
false
false
false
false
false
0
svg_appearance_flag_dirty(u32 flags) { #if 1 /* fill-related */ if (flags & GF_SG_SVG_FILL_DIRTY) return 1; if (flags & GF_SG_SVG_FILLOPACITY_DIRTY) return 1; if (flags & GF_SG_SVG_FILLRULE_DIRTY) return 1; /* stroke-related */ if (flags & GF_SG_SVG_STROKE_DIRTY) return 1; if (flags & GF_SG_SVG_STROKED...
false
false
false
false
false
0
slip_read(ifp, m) struct interface *ifp; struct message *m; { int n; struct slippy *s; CK_IFNULL(ifp); CK_IFTYPE(ifp,IF_TYPE_SLIP); CK_IFOPEN(ifp); CK_MNULL(m); s = (struct slippy *)ifp->private; ifp->status &= ~IF_STAT_CALL_AGAIN; m->length = 0; for(;;){ if(s->bnext >= s->bcount){ /* we need more data! ...
false
false
false
false
false
0
player_quit() { // to let other player know a player quit voluntarily, not by error condition err_when( id != MSG_PLAYER_QUIT ); // packet structure : <nation recno> <retire flag> short *shortPtr = (short *)data_buf; if( shortPtr[1]) news_array.multi_retire(*shortPtr); else news_array.multi_quit_game(*shortP...
false
false
false
false
true
1
iigcd(long i1, long i2) { FULL f1, f2, temp; f1 = (FULL) ((i1 >= 0) ? i1 : -i1); f2 = (FULL) ((i2 >= 0) ? i2 : -i2); while (f1) { temp = f2 % f1; f2 = f1; f1 = temp; } return (long) f2; }
false
false
false
false
false
0
gee_read_only_sorted_set_real_sub_set (GeeSortedSet* base, gconstpointer from, gconstpointer to) { GeeReadOnlySortedSet * self; GeeSortedSet* result = NULL; GeeCollection* _tmp0_ = NULL; gconstpointer _tmp1_ = NULL; gconstpointer _tmp2_ = NULL; GeeSortedSet* _tmp3_ = NULL; GeeSortedSet* _tmp4_ = NULL; GeeSorted...
false
false
false
false
false
0
rfc822_dequote_comment (char *s) { char *w = s; for (; *s; s++) { if (*s == '\\') { if (!*++s) break; /* error? */ *w++ = *s; } else if (*s != '\"') { if (w != s) *w = *s; w++; } } *w = 0; }
false
false
false
false
false
0
Pair_consistentp (int *ncanonical, struct T *pairs, int npairs, int cdna_direction) { bool in_intron = false; struct T *this; int i; *ncanonical = 0; for (i = 0; i < npairs; i++) { this = pairs++; if (this->gapp) { if (!in_intron) { if (cdna_direction > 0) { if (this->comp == REV_CANONICAL_...
false
false
false
false
false
0
beginswith_helper (const gchar *ps1, const gchar *ps2) { gchar *p, *res; gchar *s1 = e_util_utf8_remove_accents (ps1); gchar *s2 = e_util_utf8_remove_accents (ps2); if ((p = (gchar *) e_util_utf8_strstrcase (s1, s2)) && (p == s1)) res = (gchar *) ps1; else res = NULL; g_free (s1); g...
false
false
false
false
false
0
pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { char buf[PIPE_PROGRESS_SIZE]; time_t t = time(NULL); int len; while ((len = safe_read(STDIN_FILENO, buf, PIPE_PROGRESS_SIZE)) > 0) { time_t new_time = time(NULL); if (new_time != t) { t = new_time; bb_putchar_stderr('.'); } full_wr...
false
false
false
false
false
0
Definition (ostream& out) { const Coord* x; const Coord* y; int n; ArrowSplineOvComp* comp = (ArrowSplineOvComp*) GetSubject(); n = comp->GetVertices()->GetOriginal(x, y); ArrowOpenBSpline* aml = comp->GetArrowOpenBSpline(); float arrow_scale = aml->ArrowScale(); boolean head, tail; ...
false
false
false
false
false
0
_clean_effect_sequence(BD_IG_EFFECT_SEQUENCE *p) { unsigned ii; for (ii = 0; ii < p->num_effects; ii++) { _clean_effect(&p->effect[ii]); } X_FREE(p->effect); X_FREE(p->window); }
false
false
false
false
false
0
write_one_cache_group(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_block_group_cache *cache) { int ret; struct btrfs_root *extent_root = root->fs_info->extent_root; unsigned long bi; struct extent_buffer *leaf; ret = btrfs_search_slot(trans, exten...
false
false
false
false
false
0
static_export_seed (gamgi_cluster *cluster, gamgi_polyhedron *polyhedron, int *n_polyhedrons, int *n_points, gamgi_voronoi *voronoi) { if (polyhedron == NULL) return; static_export_point (cluster, polyhedron->position, n_points); *n_polyhedrons += 1; }
false
false
false
false
false
0