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
get_block( libspectrum_rzx *rzx, size_t where ) { libspectrum_rzx_iterator it; for( it = libspectrum_rzx_iterator_begin( rzx ); it && where; where--, it = libspectrum_rzx_iterator_next( it ) ) ; /* Do nothing */ return it; }
false
false
false
false
false
0
dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, int n1, int n2, int r, int nskip) { int i; dAASSERT(A && p && L && d && n1 > 0 && n2 > 0 && r >= 0 && r < n2 && n1 >= n2 && nskip >= n1); #ifndef dNODEBUG for (i=0; i<n2; i++) dIASSERT(p[i] >= 0 && p[i] < n1); #endif if (r==n2-1) { retur...
false
false
false
false
true
1
yy_get_next_buffer() { char *dest = yy_current_buffer->yy_ch_buf; char *source = yytext_ptr; int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buf...
false
false
false
false
false
0
sigaddset (set, signo) sigset_t *set; int signo; { if (set == NULL || signo <= 0 || signo >= NSIG) { __set_errno (EINVAL); return -1; } return __sigaddset (set, signo); }
false
false
false
false
false
0
parser_parse_opt (struct parser *parser, int opt, char *val) { /* The group key encoded in the high bits; 0 for short opts or group_number + 1 for long opts. */ int group_key = opt >> USER_BITS; error_t err = EBADKEY; if (group_key == 0) /* A short option. By comparing OPT's position in SHORT_OPTS t...
false
false
false
false
false
0
max9768_probe(struct snd_soc_component *component) { struct max9768 *max9768 = snd_soc_component_get_drvdata(component); int ret; if (max9768->flags & MAX9768_FLAG_CLASSIC_PWM) { ret = regmap_write(max9768->regmap, MAX9768_CTRL, MAX9768_CTRL_PWM); if (ret) return ret; } if (gpio_is_valid(max9768->mute_...
false
false
false
false
false
0
analysis_tool_fourier_calc_length (analysis_tools_data_fourier_t *info) { int m = 1, n = analysis_tool_calc_length (&info->base); while (m < n) m *= 2; return m; }
false
false
false
false
false
0
bt_str_ensure_length(torrent_ctx* ctx, size_t length) { char* new_str; if(length >= ctx->torrent_allocated && !ctx->error) { length++; /* allocate one character more */ if(length < 64) length = 64; else length = (length + 255) & ~255; new_str = (char*)realloc(ctx->torrent_str, length); if(new_str == NULL) {...
false
false
false
false
false
0
utest_seqboot(void) { char msg[] = "seqboot unit test failed"; char tmpfile[32]; FILE *ofp; int expected_fmt; int expected_alphatype; int expected_nseq; int expected_alen; int expected_nali; int i; ESL_ALPHABET *abc = NULL; ESLX_MSAFILE *afp = NULL; ESL_MSA *msa = NULL; /* ...
true
true
false
false
true
1
s48_ulong_to_bignum(unsigned long n) { bignum_digit_type result_digits [BIGNUM_DIGITS_FOR_LONG]; bignum_digit_type * end_digits = result_digits; /* Special cases win when these small constants are cached. */ if (n == 0) return (BIGNUM_ZERO ()); if (n == 1) return (BIGNUM_ONE (0)); { unsigned long accumu...
false
false
false
false
true
1
lru_walkNext(RemovalPolicyWalker * walker) { LruWalkData *lru_walk = walker->_data; LruNode *lru_node = lru_walk->current; if (!lru_node) return NULL; lru_walk->current = (LruNode *) lru_node->node.next; return (StoreEntry *) lru_node->node.data; }
false
false
false
false
false
0
find(Message &msg, MessageInfo &, const char *expr, const char *opts, Buffer *foreachp) { if (init(expr, opts)) return (-1); msg.Rewind(); return (strchr(opts, 'w') ? findinsection(msg, expr, foreachp): findinline(msg, expr, foreachp)); }
false
false
false
false
false
0
isAssumeIntrinsic(ImmutableCallSite CS) { const IntrinsicInst *II = dyn_cast<IntrinsicInst>(CS.getInstruction()); return II && II->getIntrinsicID() == Intrinsic::assume; }
false
false
false
false
false
0
gw_am_get_catalog_path_name_from_recents_files ( const guint index) { gchar *files = NULL; gchar **files_list = NULL; gchar *result = NULL; gint i = 0; #if GW_DEBUG_MODE gw_am_log_msg ( 0, __FILE__, __LINE__, __PRETTY_FUNCTION__, NULL); gw_am_log_msg ( 0, __FILE__, __LINE__, __PRETTY_FUNCTION__, "getting catalo...
false
false
false
false
false
0
SameKernelInfo(const KernelInfo *kernel1, const KernelInfo *kernel2) { register size_t i; /* check size and origin location */ if ( kernel1->width != kernel2->width || kernel1->height != kernel2->height || kernel1->x != kernel2->x || kernel1->y != kernel2->y ) return MagickFa...
false
false
false
false
false
0
read_attribute(GkmObject *object, CK_ATTRIBUTE_TYPE type, CK_ATTRIBUTE_PTR *result) { CK_ATTRIBUTE attr; CK_RV rv; g_assert (GKM_IS_OBJECT (object)); g_assert (result); *result = NULL; attr.type = type; attr.pValue = NULL; attr.ulValueLen = 0; /* Figure out memory length */ rv = gkm_object_get_attribute (...
false
false
false
false
false
0
comCalcMedValue(const EmbPComUjsim SetUj,EmbPComUjwin MedUj, EmbPComUjwin SDUj, ajint Nsim, ajint Nwin, ajint Nword) { ajint i; ajint j; ajint k; float *sum; float *var; AJCNEW0(sum, Nword); AJCNEW0(var, Nword); for(j=0;j<Nwin;j...
false
false
false
false
false
0
rproc_disable_iommu(struct rproc *rproc) { struct iommu_domain *domain = rproc->domain; struct device *dev = rproc->dev.parent; if (!domain) return; iommu_detach_device(domain, dev); iommu_domain_free(domain); }
false
false
false
false
false
0
opt_setmembership(lua_State *L, p_socket ps, int level, int name) { struct ip_mreq val; /* obj, name, table */ if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); lua_pushstring(L, "multiaddr"); lua_gettable(L, 3); if (!lua_isstring(L, -1)) luaL_ar...
false
false
false
false
false
0
toAlias() { if (aliasId) return mod; return this; }
false
false
false
false
false
0
demangle_new_symbols (void) { symbol *sym; while ((sym = symbol_pop ()) != NULL) { demangled *dem; const char *p = cplus_demangle (sym->key, DMGL_PARAMS | DMGL_ANSI); if (! p) continue; dem = demangled_hash_lookup (p, true); VEC_safe_push (str, heap, dem->mangled, sym->key); ...
false
false
false
false
false
0
createForeignInt64(void *buf, uint64 i, int size, Endianess to_endianess) { if (size <= 4) { return createForeignInt(buf, i, size, to_endianess); } uint8 *b = (uint8*)buf; uint32 hi = i >> 32; uint32 lo = i; switch (to_endianess) { case big_endian: b[0] = hi>>24; b[1] = hi>>16; b[2] = hi>>8; b[3] = hi;...
false
false
false
false
false
0
editor_insert_text_block(GeanyEditor *editor, const gchar *text, gint insert_pos, gint cursor_index, gint newline_indent_size, gboolean replace_newlines) { ScintillaObject *sci = editor->sci; gint line_start = sci_get_line_from_position(sci, insert_pos); GString *buf; const gchar *eol = editor_get_eol_char(editor...
false
false
false
false
false
0
open_pnm_input_file(context *con) { int c, max, one=1; rewind(con->file); c=get_uint8(con); if (c!='P') error("unexpected character 0x%02x (%c) at start of PNM file %s", c, c, con->name); switch (c=get_uint8(con)) { case '1' : case '2' : case '3' : case '4' :...
false
false
false
false
false
0
Alignment_display_gff_utr(Alignment *alignment, Sequence *query, Sequence *target, gboolean report_on_query, gboolean post_cds, gint cds_query_start, gint cds_target_start, gint cds_query_end, gint cds_target...
false
false
false
false
false
0
sanei_genesys_init_structs (Genesys_Device * dev) { unsigned int i, sensor_ok = 0, gpo_ok = 0, motor_ok = 0; /* initialize the sensor data stuff */ for (i = 0; i < sizeof (Sensor) / sizeof (Genesys_Sensor); i++) { if (dev->model->ccd_type == Sensor[i].sensor_id) { memcpy (&dev->sensor, &Sensor[i], ...
false
false
false
false
false
0
g_load_file_in_buffer (GFile *file, void **buffer, gsize *size, GError **error) { GFileInputStream *istream; gboolean retval; guchar *local_buffer; gsize count; gssize n; char tmp_buffer[BUFFER_SIZE]; istream = g_file_read (...
false
false
false
false
false
0
m_tgamma(double x) { double absx, r, y, z, sqrtpow; /* special cases */ if (!Py_IS_FINITE(x)) { if (Py_IS_NAN(x) || x > 0.0) return x; /* tgamma(nan) = nan, tgamma(inf) = inf */ else { errno = EDOM; return Py_NAN; /* tgamma(-inf) = nan, invalid */ ...
false
false
false
false
false
0
nextBody(int& tag, int& meshControl, int& loopC, int *loopv) { int i; fstream& str = geometryFileStream[BODIES]; if(step == bodies) { step = 0; return -1; } str >> tag >> meshControl >> loopC; for(i = 0; i < loopC; ++i) { str >> loopv[i]; } ++step; return 0; }
false
false
false
false
false
0
nsc_ircc_init(void) { chipio_t info; nsc_chip_t *chip; int ret; int cfg_base; int cfg, id; int reg; int i = 0; ret = platform_driver_register(&nsc_ircc_driver); if (ret) { net_err_ratelimited("%s, Can't register driver!\n", driver_name); return ret; } /* Register wi...
false
false
false
false
false
0
csg_export_redalert() { int idx, j, list_size = 0; int count; red_alert_ship_status *ras; startSection(Section::RedAlert); list_size = (int)csg->wingman_status.size(); cfwrite_int(list_size, cfp); if (list_size) { cfwrite_string_len(csg->precursor_mission.c_str(), cfp); for (idx = 0; idx < list_size; id...
false
false
false
false
false
0
ajStrAppendSubS(AjPStr* Pstr, const AjPStr str, ajlong pos1, ajlong pos2) { size_t ilen; size_t ibegin; size_t iend; AjBool ret = ajFalse; AjPStr thys; size_t j; thys = *Pstr; ibegin = ajCvtSposToPosStart(str->Len, 0, pos1); iend = ajCvtSposToPosStart(str->Len, ibegin, pos2); ...
false
false
false
false
false
0
modperl_boot(pTHX_ void *data) { MP_dBOOT_DATA; int i; modperl_env_clear(aTHX); modperl_env_default_populate(aTHX); modperl_env_configure_server(aTHX_ p, s); modperl_perl_core_global_init(aTHX); for (i=0; MP_xs_loaders[i]; i++) { char *name = Perl_form(aTHX_ MP_xs_loader_name, M...
false
false
false
false
false
0
internalStart(request_t * request, StoreEntry * entry) { ErrorState *err; const char *upath = strBuf(request->urlpath); debug(76, 3) ("internalStart: %s requesting '%s'\n", inet_ntoa(request->client_addr), upath); if (0 == strcmp(upath, "/squid-internal-dynamic/netdb")) { netdbBinaryExchange(entry); ...
false
false
false
false
false
0
_ircclient_handle_kill(struct ircproxy *p, struct ircmessage msg) { struct ircproxy *proxy; /* User wants to kill a user */ if (msg.numparams >= 2) { struct ircconnclass *c; struct ircproxy *cp; int i; /* Check the user list */ proxy = 0; c = connclasses; i = 0; whil...
false
false
false
false
true
1
add_lexmin_ineq(struct isl_tab *tab, isl_int *ineq) { int r; if (!tab) return NULL; if (tab->bmap) { tab->bmap = isl_basic_map_add_ineq(tab->bmap, ineq); if (isl_tab_push(tab, isl_tab_undo_bmap_ineq) < 0) goto error; if (!tab->bmap) goto error; } r = isl_tab_add_row(tab, ineq); if (r < 0) goto er...
false
false
false
false
false
0
inv_mpu6050_select_bypass(struct i2c_adapter *adap, void *mux_priv, u32 chan_id) { struct iio_dev *indio_dev = mux_priv; struct inv_mpu6050_state *st = iio_priv(indio_dev); int ret = 0; /* Use the same mutex which was used everywhere to protect power-op */ mutex_lock(&indio_dev->mlock); if (!st->powerup...
false
false
false
false
false
0
qhvec_alloc(uint size) { query_hashvec_t *qhvec; size = MIN(QRP_HVEC_MAX, size); WALLOC(qhvec); qhvec->count = 0; qhvec->size = size; qhvec->has_urn = FALSE; WALLOC_ARRAY(qhvec->vec, size); return qhvec; }
false
false
false
false
false
0
ofld_xmit(struct adapter *adap, struct sge_txq *q, struct sk_buff *skb) { int ret; unsigned int ndesc = calc_tx_descs_ofld(skb), pidx, gen; spin_lock(&q->lock); again: reclaim_completed_tx(adap, q, TX_RECLAIM_CHUNK); ret = check_desc_avail(adap, q, skb, ndesc, TXQ_OFLD); if (unlikely(ret)) { if (ret == ...
false
false
false
false
false
0
ajListstrNewList(const AjPList list) { AjPList newlist = NULL; AjPListNode node = NULL; AjPStr tmpstr = NULL; if(!list) return NULL; newlist = listNew(&listDelStr); newlist->Fitemdel = list->Fitemdel; for( node=list->First; node->Next; node=node->Next) { tmpstr = ajS...
false
false
false
false
false
0
subscribe_got_response (G_GNUC_UNUSED SoupSession *session, SoupMessage *msg, GUPnPServiceProxy *proxy) { GError *error; /* Cancelled? */ if (msg->status_code == SOUP_STATUS_CANCELLED) return; /* Remo...
false
false
false
false
true
1
gst_rtp_gsm_pay_handle_buffer (GstBaseRTPPayload * basepayload, GstBuffer * buffer) { GstRTPGSMPay *rtpgsmpay; guint size, payload_len; GstBuffer *outbuf; guint8 *payload, *data; GstClockTime timestamp, duration; GstFlowReturn ret; rtpgsmpay = GST_RTP_GSM_PAY (basepayload); size = GST_BUFFER_SIZE ...
false
true
false
false
false
1
cz_smu_initialize_toc_empty_job_list(struct amdgpu_device *adev) { int i; struct cz_smu_private_data *priv = cz_smu_get_priv(adev); struct TOC *toc = (struct TOC *)priv->toc_buffer.kaddr; for (i = 0; i < NUM_JOBLIST_ENTRIES; i++) toc->JobList[i] = (uint8_t)IGNORE_JOB; return 0; }
false
false
false
false
false
0
gst_rtp_ac3_pay_handle_buffer (GstRTPBasePayload * basepayload, GstBuffer * buffer) { GstRtpAC3Pay *rtpac3pay; GstFlowReturn ret; gsize avail, left, NF; GstMapInfo map; guint8 *p; guint packet_len; GstClockTime duration, timestamp; rtpac3pay = GST_RTP_AC3_PAY (basepayload); gst_buffer_map (buffe...
false
false
false
false
false
0
register_mtd_blktrans(struct mtd_blktrans_ops *tr) { struct mtd_info *mtd; int ret; /* Register the notifier if/when the first device type is registered, to prevent the link/init ordering from fucking us over. */ if (!blktrans_notifier.list.next) register_mtd_user(&blktrans_notifier); mutex_lock(&mtd_...
false
false
false
false
false
0
decode_envelope(int number_of_regions, float *decoder_standard_deviation, int *absolute_region_power_index, int esf_adjustment) { int index; int i; int envelope_bits = 0; index = 0; for (i = 0; i < 5; i++) index = (index<<1) | next_bit(); envelope_bits = 5; absolute_region_power_index[0] = index - e...
false
false
false
false
false
0
getenv_fun( EnvT* e) { SizeT nParam=e->NParam(); static int environmentIx = e->KeywordIx( "ENVIRONMENT" ); bool environment = e->KeywordSet( environmentIx ); SizeT nEnv; DStringGDL* env; if( environment) { if(nParam != 0) e->Throw( "Incorrect number of arguments."); ...
false
false
false
false
false
0
mysql_list_realm_options(u08bits *realm) { int ret = -1; donot_print_connection_success = 1; char statement[TURN_LONG_STRING_SIZE]; MYSQL * myc = get_mydb_connection(); if(myc) { if(realm && realm[0]) { snprintf(statement,sizeof(statement),"select realm,opt,value from turn_realm_option where realm='%s' order...
false
false
false
false
false
0
fpga_mgr_class_init(void) { pr_info("FPGA manager framework\n"); fpga_mgr_class = class_create(THIS_MODULE, "fpga_manager"); if (IS_ERR(fpga_mgr_class)) return PTR_ERR(fpga_mgr_class); fpga_mgr_class->dev_groups = fpga_mgr_groups; fpga_mgr_class->dev_release = fpga_mgr_dev_release; return 0; }
false
false
false
false
false
0
CORD_substr_closure(CORD x, size_t i, size_t n, CORD_fn f) { register struct substr_args * sa = GC_NEW(struct substr_args); CORD result; if (sa == 0) OUT_OF_MEMORY; sa->sa_cord = (CordRep *)x; sa->sa_index = i; result = CORD_from_fn(f, (void *)sa, n); ((CordRep *)result) -> function.hea...
false
false
false
false
false
0
get_statusbar_page_start(size_t start_col, size_t column) { if (column == start_col || column < COLS - 1) return 0; else return column - start_col - (column - start_col) % (COLS - start_col - 1); }
false
false
false
false
false
0
gen_mem_addressof (rtx reg, tree decl, int rescan) { rtx r = gen_rtx_ADDRESSOF (Pmode, gen_reg_rtx (GET_MODE (reg)), REGNO (reg), decl); /* Calculate this before we start messing with decl's RTL. */ HOST_WIDE_INT set = decl ? get_alias_set (decl) : 0; /* If the original REG was a user-variable, then ...
false
false
false
false
true
1
i40evf_config_rss(struct i40e_vsi *vsi, const u8 *seed, u8 *lut, u16 lut_size) { struct i40evf_adapter *adapter = vsi->back; if (RSS_AQ(adapter)) return i40evf_config_rss_aq(vsi, seed, lut, lut_size); else return i40evf_config_rss_reg(vsi, seed, lut, lut_size); }
false
false
false
false
false
0
kmo_calc_mode_for_flux_image(const cpl_image *data, const cpl_image *xcal, int ifu_nr, double *noise) { cpl_image *mask = NULL; kmclipm_vector *vec = NULL, ...
false
false
false
false
false
0
gt_newSequentialsuffixarrayreaderfromfile( const char *indexname, unsigned int demand, Sequentialaccesstype seqactype, GtLogger *logger, ...
false
false
false
false
false
0
VerifySaved() { m_bClosing = true; if (!GetDirty ()) return true; GtkWidget* mbox; int res; do { mbox = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("\"%s\" has been modified. Do you wish to save it?"), GetLabel ()); gtk_dialog_add_button(GTK_DIALOG(mbox), GTK...
false
false
false
false
false
0
form_recipient_list (EEwsConnection *cnc, const GSList *recipients, GCancellable *cancellable) { const GSList *l; GString *str = NULL; const gchar *ret; if (!recipients) return NULL; for (l = recipients; l != NULL; l = g_slist_next (l)) { EwsMailbox *mb = (EwsMailbox...
false
false
false
false
false
0
parse_ldbm_instance_config_entry(ldbm_instance *inst, Slapi_Entry *e, config_info *config_array) { Slapi_Attr *attr = NULL; for (slapi_entry_first_attr(e, &attr); attr; slapi_entry_next_attr(e, attr, &attr)) { char *attr_name = NULL; Slapi_Value *sval = NULL; struct berva...
true
true
false
false
false
1
handle_cli_core_show_translation(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { static const char * const option[] = { "recalc", "paths", NULL }; switch (cmd) { case CLI_INIT: e->command = "core show translation"; e->usage = "Usage: 'core show translation' can be used in two ways.\n" " ...
false
false
false
false
false
0
ddf_SelectPreorderedNext(ddf_ConePtr cone, ddf_rowset excluded, ddf_rowrange *hh) { ddf_rowrange i,k; *hh=0; for (i=1; i<=cone->m && *hh==0; i++){ k=cone->OrderVector[i]; if (!set_member(k, excluded)) *hh=k ; } }
false
false
false
false
false
0
ll_slice(struct llist_t *head, int index) { while (index > 0 && head->next != NULL) { head = head->next; index--; } if (index == 0) { return head; } else { return NULL; } }
false
false
false
false
false
0
tegra_spi_isr_thread(int irq, void *context_data) { struct tegra_spi_data *tspi = context_data; if (!tspi->is_curr_dma_xfer) return handle_cpu_based_xfer(tspi); return handle_dma_based_xfer(tspi); }
false
false
false
false
false
0
ladish_load_studio(struct cdbus_method_call * call_ptr) { const char * name; bool autostart; dbus_error_init(&cdbus_g_dbus_error); if (!dbus_message_get_args(call_ptr->message, &cdbus_g_dbus_error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) { cdbus_error(call_ptr, DBUS_ERROR_INVALID_ARGS, "Invalid arg...
false
false
false
false
false
0
output_target(double value) { if(y_scaling) { if(value == y_min) value = y_lower; else if(value == y_max) value = y_upper; else value = y_lower + (y_upper-y_lower) * (value - y_min)/(y_max-y_min); } printf("%g ",value); }
false
false
false
false
false
0
display_system_info (bmc_info_state_data_t *state_data) { int ret; assert (state_data); if ((ret = display_system_info_system_firmware_version (state_data)) < 0) return (-1); if (!ret) return (0); if ((ret = display_system_info_system_name (state_data)) < 0) return (-1); if (!ret) retur...
false
false
false
false
false
0
g_proxy_volume_enumerate_identifiers (GVolume *volume) { GProxyVolume *proxy_volume = G_PROXY_VOLUME (volume); GPtrArray *res; res = g_ptr_array_new (); G_LOCK (proxy_volume); if (proxy_volume->identifiers != NULL) g_hash_table_foreach (proxy_volume->identifiers, (GHFunc) add_identifier_key, res); G_U...
false
false
false
false
false
0
task_exists(ulong task) { int i; struct task_context *tc; tc = FIRST_CONTEXT(); for (i = 0; i < RUNNING_TASKS(); i++, tc++) if (tc->task == task) return TRUE; return FALSE; }
false
false
false
false
false
0
insertObject(PT_DocPosition dpos, PTObjectType pto, const gchar ** attributes, const gchar ** properties, pf_Frag_Object ** ppfo) { if(m_pDocument->isMarkRevisions()) { PP_RevisionAttr Revisions(NULL); const gchar ** ppRevAttrs = NULL; const gchar ** ppRevProps = NULL; pf_Frag *...
false
false
false
false
false
0
printMixedStruct(mixedStruct *structToPrint) { printf("%s\t%s\t%s\t", structToPrint->generic.name, GucContext_Names[structToPrint->generic.context], _(config_group_names[structToPrint->generic.group])); switch (structToPrint->generic.vartype) { case PGC_BOOL: printf("BOOLEAN\t%s\t\t\t", ...
false
false
false
false
false
0
shrink() { int i,j; for(j=0; j<NUM_DIMENSIONS; j++) { minCorner.x[j] = maxCorner.x[j] = points[0].x[j]; } for(i=1; i < pointsLength; i++) { for(j=0; j<NUM_DIMENSIONS; j++) { minCorner.x[j] = std::min(minCorner.x[j], points[i].x[j]); maxCorner.x[j] = ...
false
false
false
false
false
0
DFSDsetdims(intn rank, int32 dimsizes[]) { intn i; CONSTR(FUNC, "DFSDsetdims"); intn ret_value = SUCCEED; HEclear(); /* Perform global, one-time initialization */ if (library_terminate == FALSE) if(DFSDIstart()==FAIL) HGOTO_ERROR(DFE_CANTINIT, FAIL); if (Sfile_id != D...
false
false
false
false
false
0
clish_shell_command_generator(clish_shell_t *this, const char *line, unsigned offset, unsigned state) { char *result = NULL; const clish_command_t *cmd = NULL; if(0 == state) { ...
false
false
false
false
false
0
file_close(node *state,node *self,node *obj,node *block,node *parameters) { //close a file node *value = get_false_class(state); //printf("closing file\n"); //node_PrintTree(obj); node *privates = node_GetItemByKey(obj,"privates"); node *handle = node_GetItemByKey(privates,"file_handle"); if(handl...
false
false
false
false
false
0
ts2es_opt(int fdin, uint16_t pidv, ipack *p, int verb) { uint8_t buf[IN_SIZE]; uint8_t mbuf[TS_SIZE]; int i; int count = 1; uint64_t length =0; uint64_t l=0; int perc =0; int last_perc =0; uint16_t pid; if (verb) { length = lseek(fdin, 0, SEEK_END); lseek(fdin,0,SEEK_SET); } count = save_read(fdin,m...
false
true
false
false
false
1
shrink_wrap_conditional_dead_built_in_calls (VEC (gimple, heap) *calls) { bool changed = false; unsigned i = 0; unsigned n = VEC_length (gimple, calls); if (n == 0) return false; for (; i < n ; i++) { gimple bi_call = VEC_index (gimple, calls, i); changed |= shrink_wrap_one_built_in_call...
false
false
false
false
false
0
prologue_epilogue_contains (const_rtx insn) { if (contains (insn, prologue_insn_hash)) return 1; if (contains (insn, epilogue_insn_hash)) return 1; return 0; }
false
false
false
false
false
0
be_pair_enable(struct bufferevent *bufev, short events) { struct bufferevent_pair *bev_p = upcast(bufev); struct bufferevent_pair *partner = bev_p->partner; incref_and_lock(bufev); if (events & EV_READ) { BEV_RESET_GENERIC_READ_TIMEOUT(bufev); } if ((events & EV_WRITE) && evbuffer_get_length(bufev->output)) ...
false
false
false
false
false
0
openRideFile(QFile &file, QStringList &errors, QList<RideFile*>*) const { RideFile *rideFile = new RideFile; rideFile->setDeviceType("PowerTap"); rideFile->setFileFormat("GoldenCheetah Raw PowerTap (raw)"); if (!file.open(QIODevice::ReadOnly)) { delete rideFile; return NULL; } FI...
false
false
false
false
false
0
groups_search(const struct group_info *group_info, kgid_t grp) { unsigned int left, right; if (!group_info) return 0; left = 0; right = group_info->ngroups; while (left < right) { unsigned int mid = (left+right)/2; if (gid_gt(grp, GROUP_AT(group_info, mid))) left = mid + 1; else if (gid_lt(grp, GROUP_...
false
false
false
false
false
0
block7_data_unref (void * _userdata_) { Block7Data* _data7_; _data7_ = (Block7Data*) _userdata_; if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) { GeeTraversable * self; GType a_type; GBoxedCopyFunc a_dup_func; GDestroyNotify a_destroy_func; self = _data7_->self; a_type = _data7_->a_type; a_dup_...
false
false
false
false
false
0
deleteFieldFrag(pf_Frag * pf) { UT_return_val_if_fail (m_pts==PTS_Editing,false); bool bSuccess = true; UT_Stack stDelayStruxDelete; PT_DocPosition dpos1 = getFragPosition(pf); UT_return_val_if_fail (dpos1,false); PT_DocPosition dpos2 = dpos1 + pf->getLength(); // If the delete is sure to be within a frag...
false
false
false
false
false
0
fpixProjective(FPIX *fpixs, l_float32 *vc, l_float32 inval) { l_int32 i, j, w, h, wpld; l_float32 val; l_float32 *datas, *datad, *lined; l_float32 x, y; FPIX *fpixd; PROCNAME("fpixProjective"); if (!fpixs) return (FPIX *)ERROR_PTR("fpixs not define...
false
false
false
false
false
0
__v9fs_get_acl(struct p9_fid *fid, char *name) { ssize_t size; void *value = NULL; struct posix_acl *acl = NULL; size = v9fs_fid_xattr_get(fid, name, NULL, 0); if (size > 0) { value = kzalloc(size, GFP_NOFS); if (!value) return ERR_PTR(-ENOMEM); size = v9fs_fid_xattr_get(fid, name, value, size); if (si...
false
false
false
false
false
0
ocbytessetalloc(OCbytes* bb, unsigned int sz) { char* newcontent; if(bb == NULL) return ocbytesfail(); if(sz <= 0) {sz = (bb->alloc?2*bb->alloc:DEFAULTALLOC);} if(bb->alloc >= sz) return TRUE; if(bb->nonextendible) return ocbytesfail(); newcontent=(char*)calloc(sz,sizeof(char)); if(newcontent == NULL) ret...
false
true
false
false
false
1
deleteLine(RenderArena* arena) { InlineBox* child = firstChild(); InlineBox* next = 0; while (child) { assert(this == child->parent()); next = child->nextOnLine(); #ifndef NDEBUG child->setParent(0); #endif child->deleteLine(arena); child = next; } #ifndef NDEBUG ...
false
false
false
false
false
0
ldif_read_tags( LdifFile *ldifFile ) { cm_return_val_if_fail( ldifFile != NULL, MGU_BAD_ARGS ); ldifFile->retVal = MGU_SUCCESS; if( ldifFile->dirtyFlag ) { ldif_open_file( ldifFile ); if( ldifFile->retVal == MGU_SUCCESS ) { /* Read data into the cache */ ldif_read_tag_list( ldifFile ); ldif_close_file( ...
false
false
false
false
false
0
free_multi_body(struct multi_body * multi) { struct part * p, *tmp; p = multi->first; while(p) { tmp = p; p = p->next; pkg_free(tmp); } pkg_free(multi); }
false
false
false
false
false
0
add_tcp_udp_rule(struct mlx4_en_priv *priv, struct ethtool_rxnfc *cmd, struct list_head *list_h, int proto) { int err; struct mlx4_spec_list *spec_l2 = NULL; struct mlx4_spec_list *spec_l3 = NULL; struct mlx4_spec_list *spec_l4 = NULL; struct ethtool_tcpip4_spec *l4_mask = &cmd->fs.m_u.tcp_ip4_spec...
false
false
false
false
false
0
sigrifft_dsp(t_sigrifft *x, t_signal **sp) { int n = sp[0]->s_n, n2 = (n>>1); t_sample *in1 = sp[0]->s_vec; t_sample *in2 = sp[1]->s_vec; t_sample *out1 = sp[2]->s_vec; if (n < 4) { error("fft: minimum 4 points"); return; } if (in2 == out1) { dsp_add(sigrfft_f...
false
false
false
false
false
0
evd_tls_input_stream_read (GInputStream *stream, void *buffer, gsize size, GCancellable *cancellable, GError **error) { EvdTlsInputStream *self = EVD_TLS_INPUT_STREAM (stream); GErro...
false
false
false
false
false
0
submit_workers(const char *cmd, const char *input_files, int count) { int i; batch_job_id_t jobid; for(i = 0; i < count; i++) { debug(D_DEBUG, "Submitting job %d: %s\n", i + 1, cmd); jobid = batch_job_submit_simple(q, cmd, input_files, NULL); if(jobid >= 0) { struct batch_job_info *info = (struct batch_job...
false
false
false
false
false
0
read_subchannel(CdIo_t *p_cdio) { bool b_ok = true; if (!b_cd) return false; b_ok = DRIVER_OP_SUCCESS == cdio_audio_read_subchannel(p_cdio, &sub); if (!b_ok) { xperror("read subchannel"); b_cd = 0; } if (auto_mode && sub.audio_status == CDIO_MMC_READ_SUB_ST_COMPLETED) cd_eject(); return b_ok;...
false
false
false
false
false
0
tradindexed_cancel(const char *group, ARTNUM artnum) { struct group_entry *entry; struct group_data *data; if (tradindexed == NULL || tradindexed->index == NULL) { warn("tradindexed: overview method not initialized"); return false; } entry = tdx_index_entry(tradindexed->index, group...
false
false
false
false
false
0
openipmi_wait(struct ipmi_event_intf * eintf) { struct pollfd pfd; int r; for (;;) { pfd.fd = eintf->intf->fd; /* wait on openipmi device */ pfd.events = POLLIN; /* wait for input */ r = poll(&pfd, 1, -1); switch (r) { case 0: /* timeout is disabled */ break; case -1: lperror(LOG_CRIT, "U...
false
false
false
false
false
0
config_iterator_new( git_config_iterator **iter, struct git_config_backend* backend) { diskfile_header *h; git_config_file_iter *it; git_config_backend *snapshot; diskfile_backend *b = (diskfile_backend *) backend; int error; if ((error = config_snapshot(&snapshot, backend)) < 0) return error; if ((error =...
false
false
false
false
false
0
anode_validate_enumerated (GNode *node, GBytes *value) { const guchar *buf; gsize length; g_assert (value != NULL); buf = g_bytes_get_data (value, &length); /* Enumerated must be positive */ if (length > 0 && (buf[0] & 0x80)) return anode_failure (node, "enumerated must be positive...
false
false
false
false
false
0
FindClosestColor(Screen * screen, Colormap colormap, XColor * pxcolorDesired, XColor * pxcolorActual) #else static void FindClosestColor(screen, colormap, pxcolorDesired, pxcolorActual) Screen * screen; Colormap colormap; XColor * pxcolorDesired; XColor * pxcolorActual...
false
false
false
false
false
0
qstat_xml_finished_jobs_finished(qstat_handler_t *handler, lList **alpp) { qstat_xml_ctx_t *ctx = (qstat_xml_ctx_t*)handler->ctx; int ret = 0; lList *target_list = NULL; DENTER(TOP_LAYER, "qstat_xml_finished_jobs_finished"); target_list = lGetList(ctx->job_list_elem, XMLE_List); ret = qstat_xml_f...
false
false
false
false
false
0
ble(void) { if (asap.znflag == 0 || (INT32)(asap.znflag ^ asap.vflag) < 0) { asap.nextpc = asap.ppc + ((INT32)(asap.op.d << 10) >> 8); fetch_instruction(); asap.pc = asap.nextpc; asap.nextpc = ~0; /*UPDATEPC();*/ execute_instruction(); asap_icount--; } }
false
false
false
false
false
0
signal_handle(int signo) { real_signal_handler_t *h = &g_handler[signo]; sigset_t origmask[1]; if (sigprocmask(SIG_BLOCK, &h->action->sa_mask, origmask) == -1) return -1; g_handler[signo].handler(signo); g_received[signo] = 0; return sigprocmask(SIG_SETMASK, origmask, NULL); }
false
false
false
false
false
0