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
BuildListOwnerItems(WorldPacket& data, Player* player, uint32& count, uint32& totalcount) { for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { AuctionEntry* Aentry = itr->second; if (Aentry->owner == player->GetGUIDLow()) { if (...
false
false
false
false
false
0
text_save(t_gobj *z, t_binbuf *b) { t_text *x = (t_text *)z; if (x->te_type == T_OBJECT) { /* if we have a "saveto" method, and if we don't happen to be a canvas that's an abstraction, the saveto method does the work */ if (zgetfn(&x->te_pd, gensym("saveto")) && !...
false
false
false
false
false
0
free_fs_root(struct btrfs_root *root) { iput(root->ino_cache_inode); WARN_ON(!RB_EMPTY_ROOT(&root->inode_tree)); btrfs_free_block_rsv(root, root->orphan_block_rsv); root->orphan_block_rsv = NULL; if (root->anon_dev) free_anon_bdev(root->anon_dev); if (root->subv_writers) btrfs_free_subvolume_writers(root->sub...
false
false
false
false
false
0
loadsub( struct icom *rp, /* radio structure */ struct chan *cp, /* channel pointer */ int index /* args index */ ) { double dtemp; int i, temp; i = index; temp= R_OK; for (i += 1; i < argn; i += 2) { temp = argsx(argv[i - 1], loadtab); switch (temp) { /* * name */ case D_NAME: strncpy(cp->...
false
false
false
false
false
0
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) { eina_list_free(cfdata->autohide_list); eina_stringshare_del(cfdata->style); cfdata->style = NULL; E_FREE_LIST(cfdata->handlers, ecore_event_handler_del); cfdata->es->config_dialog = NULL; E_FREE(cfdata); }
false
false
false
false
false
0
v5dWriteCompressedGrid(const v5dstruct * v, int time, int var, const float *ga, const float *gb, const void *compdata) { int pos, n, k; /* simple error checks */ if (v->Mode != 'w') { printf("Error in v5dWriteCompressedGrid: file opened for reading,"); printf(" not writing.\n"); return 0; ...
false
false
false
false
false
0
engineIDNic_conf(const char *word, char *cptr) { /* * Make sure they haven't already specified the engineID via the * * configuration file */ if (0 == engineIDIsSet) /* * engineID has NOT been set via configuration file */ { /* * See if already set...
false
true
false
false
false
1
tip_alloc(tipool_t *pool, uint32_t id) { // allocate an object from the memory pool trinfo_t *p; if (pool->n == pool->m) { int i, new_m = pool->m? pool->m<<1 : 256; pool->buf = realloc(pool->buf, new_m * sizeof(void*)); for (i = pool->m; i < new_m; ++i) pool->buf[i] = malloc(sizeof(trinfo_t)); pool->m = ne...
false
false
false
false
false
0
curl_easy_escape(CURL *handle, const char *string, int inlength) { size_t alloc = (inlength?(size_t)inlength:strlen(string))+1; char *ns; char *testing_ptr = NULL; unsigned char in; /* we need to treat the characters unsigned */ size_t newlen = alloc; size_t strindex=0; size_t length; CURLcode res; n...
false
false
false
false
false
0
parse_packet(struct cvm_packet* p) { if (p->data[0] != 0) return p->data[0]; if (p->length < 3 || p->data[p->length-1] != 0 || p->data[p->length-2] != 0) return CVME_BAD_MODDATA; if (cvm_client_fact_str(CVM_FACT_USERNAME, &cvm_fact_username) || cvm_client_fact_uint(CVM_FACT_USERID, &cvm_...
false
false
false
false
false
0
message(QtMsgType type, const QString &description, const QUrl &identifier, const QSourceLocation &sourceLocation) { QMutexLocker locker(&_mutex); _unhandledMessage.append(QPair<QtMsgType, QString>(type, description)); handleMessage(type, description, identifier, sourceLocation); }
false
false
false
false
false
0
secret_item_load_secrets (GList *items, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *async; LoadsClosure *loads; GPtrArray *paths; const gchar *path; GList *l; g_return_if_fail (can...
false
false
false
false
false
0
Java_com_sun_grid_drmaa_SessionImpl_nativeControl (JNIEnv *env, jobject object, jstring jobId, jint action) { char error[DRMAA_ERROR_STRING_BUFFER + 1]; int errnum = DRMAAJ_ERRNO_SUCCESS; const char *job_id = NULL; if (jobId == NULL) { print_message_and_throw_exception (env, DRMAAJ_ERRNO_NULL_PO...
false
false
false
false
false
0
pp_idtext(char *prefix, unsigned char *p, size_t len) { int i; fputs(prefix, stdout); for (i = 0; i < len; ++i, ++p) { if (*p == '\0') break; if (!isgraph((int) *p) && *p != ' ') break; putchar(*p); } putchar('\n'); }
false
false
false
false
false
0
topLeftResizeCallback( Widget* widget, const Event* e ) { if( Widget_mouseOver( widget, &e->v ) ) { if( e->type == EMousePressed ) { widget->mouseOffset = vec2i_sub( &widget->position, &e->v ); widget->pressed = true; } } if( widget->pressed && widget->mouseOff...
false
false
false
false
false
0
cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) { struct list_head *tmp; struct cifs_tcon *tcon; spin_lock(&cifs_tcp_ses_lock); list_for_each(tmp, &ses->tcon_list) { tcon = list_entry(tmp, struct cifs_tcon, tcon_list); if (!match_tcon(tcon, volume_info)) continue; ++tcon->tc_count; spi...
false
false
false
false
false
0
do_erc(struct vt_page *ovtp, struct vt_page *nvtp) { int l, c; if (nvtp->errors == 0 && ovtp->lines == nvtp->lines) return; for (l = 0; l < H; ++l) { if (~nvtp->lines & (1 << l)) memcpy(nvtp->data[l], ovtp->data[l], W); else if (ovtp->lines & (1 << l)) for (c = 0; c < W; ++c) if (nvtp->...
false
false
false
false
false
0
vertex_add_edge (Vertex * vertex, Vertex * head, long distance) { if (vertex == NULL || head == NULL) return; Edge * edge = _edge_alloc (head, distance); dlist_append(vertex->edges, edge); }
false
false
false
false
false
0
stream_back_bytes(mpg123_handle *fr, off_t bytes) { off_t want = fr->rd->tell(fr)-bytes; if(want < 0) return READER_ERROR; if(stream_skip_bytes(fr,-bytes) != want) return READER_ERROR; return 0; }
false
false
false
false
false
0
rectify_IPL( const void* srcImg_left, const void* srcImg_right, void* outImg_left, void* outImg_right) const { MRPT_START ASSERT_(srcImg_left!=outImg_left && srcImg_right!=outImg_right) if (!isSet()) THROW_EXCEPTION("Error: setFromCamParams() must be called prior to rectify().") #if MRPT_HAS_OPENCV && MRPT_OPE...
false
false
false
false
false
0
IDirectFBSurface_GetPalette( IDirectFBSurface *thiz, IDirectFBPalette **interface ) { DFBResult ret; CoreSurface *surface; IDirectFBPalette *palette; DIRECT_INTERFACE_GET_DATA(IDirectFBSurface) D_DEBUG_AT( Surface, "%s( %p )\n", __FUNCTION__, thiz );...
false
false
false
false
false
0
set_hpet_sid(struct irte *irte, u8 id) { int i; u16 sid = 0; if (!irte) return -1; down_read(&dmar_global_lock); for (i = 0; i < MAX_HPET_TBS; i++) { if (ir_hpet[i].iommu && ir_hpet[i].id == id) { sid = (ir_hpet[i].bus << 8) | ir_hpet[i].devfn; break; } } up_read(&dmar_global_lock); if (sid == 0)...
false
false
false
false
false
0
scsi_get_device_flags_keyed(struct scsi_device *sdev, const unsigned char *vendor, const unsigned char *model, int key) { struct scsi_dev_info_list *devinfo; int err; devinfo = scsi_dev_info_list_find(vendor, model, key); if (!IS_ERR(devinfo)) return devinfo->flags; err = PTR_ERR(devinfo); if (err...
false
false
false
false
false
0
connection_add_operation(Connection* conn,Operation* op) { Operation **olist= &conn->c_ops; int id= conn->c_opsinitiated++; PRUint64 connid = conn->c_connid; Operation **tmp; /* slapi_ch_stop_recording(); */ for ( tmp = olist; *tmp != NULL; tmp = &(*tmp)->o_next ) ; /* NULL */ *tmp= op; op->o_opid = id; o...
false
false
false
false
false
0
_dwarf_print_lines(Dwarf_Die die, Dwarf_Error * error) { int only_line_header = 0; int err_count = 0; int res = _dwarf_internal_printlines(die, error, &err_count, only_line_header); /* No way to get error count back in this interface */ if (res != DW_DLV_OK) { return res; ...
false
false
false
false
false
0
print0x0089(std::ostream& os, const Value& value, const ExifData* metadata) { if (value.count() != 1 || value.typeId() != unsignedShort) { return os << "(" << value << ")"; } long l = va...
false
false
false
false
false
0
_cirrus_read_hidden_dac(struct cpssp *cpssp) { unsigned char value; if (cpssp->ext_hidden_dac_counter == 4) { value = cpssp->ext_hidden_dac; cpssp->ext_hidden_dac_counter = 0; #if (1 < CIRRUS_DEBUG) faum_log(FAUM_LOG_DEBUG, __FUNCTION__, "", " 0x%02hx\n", value); #endif } else { value = cpssp->vga.col_p...
false
false
false
false
false
0
kdb_ps1(const struct task_struct *p) { int cpu; unsigned long tmp; if (!p || probe_kernel_read(&tmp, (char *)p, sizeof(unsigned long))) return; cpu = kdb_process_cpu(p); kdb_printf("0x%p %8d %8d %d %4d %c 0x%p %c%s\n", (void *)p, p->pid, p->parent->pid, kdb_task_has_cpu(p), kdb_process_cpu(p), ...
false
false
false
false
false
0
aim_srv_setavailmsg(aim_session_t *sess, char *msg) { aim_conn_t *conn; aim_frame_t *fr; aim_snacid_t snacid; if (!sess || !(conn = aim_conn_findbygroup(sess, 0x0001))) return -EINVAL; if (msg) { if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4 + strlen(msg) + 8))) return -ENOMEM; ...
false
false
false
false
false
0
DestroyPieces() { delete [] this->PieceExtents; delete [] this->PiecePointDimensions; delete [] this->PiecePointIncrements; delete [] this->PieceCellDimensions; delete [] this->PieceCellIncrements; this->PieceExtents = 0; this->PiecePointDimensions = 0; this->PiecePointIncrements = 0; this->PieceCellD...
false
false
false
false
false
0
cbf_get_block (cbf_file *file, size_t nelem) { size_t done; /* Does the file exist? */ if (!file) return CBF_ARGUMENT; /* Set the buffer size */ cbf_failnez (cbf_set_buffersize (file, nelem)) /* Read the characters */ file->buffer_used = 0; while (file->buffer_used < nelem) { ...
false
false
false
false
false
0
perf_event_ctx_activate(struct perf_event_context *ctx) { struct list_head *head = this_cpu_ptr(&active_ctx_list); WARN_ON(!irqs_disabled()); WARN_ON(!list_empty(&ctx->active_ctx_list)); list_add(&ctx->active_ctx_list, head); }
false
false
false
false
false
0
compute_seen(void) { int i; compute_scope(); nounloop(i) noun[i].seen=noun[i].seen || noun[i].scope; creatloop(i) creature[i].seen=creature[i].seen || creature[i].scope; }
false
false
false
false
false
0
token_current(Lex_state *e) { int ind; Lex_token *t; ind = e->ctn; t = dsvec_ptr(e->lexptr, (unsigned int) ind, Lex_token *); if (t == NULL) return(T_UNDEF); return(t->token); }
false
false
false
false
false
0
read_cel_file(FILE *f) { CelFile cel; cel.sgs = NULL; if (!f) return cel; char s[20]; int r = fscanf(f, "%4s %lf %lf %lf %lf %lf %lf", s, &cel.a, &cel.b, &cel.c, &cel.alpha, &cel.beta, &cel.gamma); if (r != 7) { fclose(f); return cel; } if (strcmp(s...
false
false
false
false
false
0
executeCmpInst(unsigned predicate, GenericValue Src1, GenericValue Src2, Type *Ty) { GenericValue Result; switch (predicate) { case ICmpInst::ICMP_EQ: return executeICMP_EQ(Src1, Src2, Ty); case ICmpInst::ICMP_NE: return executeICMP_NE(Src1, Src2, Ty); case ICmpInst::...
false
false
false
false
false
0
utf_16_le_decode(PyObject *self, PyObject *args) { Py_buffer pbuf; const char *errors = NULL; int byteorder = -1; int final = 0; Py_ssize_t consumed; PyObject *decoded = NULL; if (!PyArg_ParseTuple(args, "y*|zi:utf_16_le_decode", &pbuf, &errors, &f...
false
false
false
false
false
0
test_network_remote_remotes__single_branch(void) { git_clone_options opts = GIT_CLONE_OPTIONS_INIT; git_repository *repo; git_strarray refs; size_t i, count = 0; opts.remote_cb = remote_single_branch; opts.checkout_branch = "first-merge"; cl_git_pass(git_clone(&repo, "git://github.com/libgit2/TestGitRepository...
false
false
false
false
false
0
cdce706_pll_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) { struct cdce706_hw_data *hwd = to_hw_data(hw); unsigned long mul = hwd->mul, div = hwd->div; int err; dev_dbg(&hwd->dev_data->client->dev, "%s, pll: %d, mul: %lu, div: %lu\n", __func__, hwd->idx, mul, div); err = cdce...
false
false
false
false
false
0
brasero_task_ctx_set_current_action (BraseroTaskCtx *self, BraseroBurnAction action, const gchar *string, gboolean force) { BraseroTaskCtxPrivate *priv; g_return_val_if_fail (BRASERO_IS_TASK_CTX (self), BRASERO_BURN_ERR); priv = BRASERO_TASK_CTX_PRIVATE (self); if (priv->current_action...
false
false
false
false
false
0
vmballoon_pop(struct vmballoon *b) { struct page *page, *next; unsigned is_2m_pages; for (is_2m_pages = 0; is_2m_pages < VMW_BALLOON_NUM_PAGE_SIZES; is_2m_pages++) { struct vmballoon_page_size *page_size = &b->page_sizes[is_2m_pages]; u16 size_per_page = vmballoon_page_size(is_2m_pages); list_for_each...
false
false
false
false
false
0
sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_mem_t *procmem) { char buffer[BUFSIZ], *ptr=buffer; int status = proc_stat_read(sigar, pid); linux_proc_stat_t *pstat = &sigar->last_proc_stat; procmem->minor_faults = pstat->minor_faults; procmem->major_faults = ...
true
true
false
false
false
1
arm_set_default_type_attributes (tree type) { /* Add __attribute__ ((long_call)) to all functions, when inside #pragma long_calls or __attribute__ ((short_call)), when inside #pragma no_long_calls. */ if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE) { tree type_attr_lis...
false
false
false
false
false
0
yybegin (const char *fname) { yyin = fopen (fname, "r"); if (yyin == NULL) { perror (fname); exit (1); } lexer_line.file = fname; lexer_line.line = 1; }
false
false
false
false
false
0
trash_ctl(PROBETYPE type, TOKEN *token UNUSED, void *value UNUSED) { switch (type) { case SMARTNGNUM: default: return false; } }
false
false
false
false
false
0
noteMarkup(EventHandler &, Allocator &, const EventsWanted &) { switch (top().state) { case afterRsOrRe: top().state = afterStartTag; break; case pendingAfterRsOrRe: top().state = pendingAfterMarkup; break; default: break; // avoid warning } }
false
false
false
false
false
0
brasero_sum_dialog_activate (BraseroToolDialog *dialog, BraseroMedium *medium) { gboolean result; BraseroSumDialog *self; BraseroSumDialogPrivate *priv; self = BRASERO_SUM_DIALOG (dialog); priv = BRASERO_SUM_DIALOG_PRIVATE (dialog); brasero_burn_session_start (priv->session); if (!gtk_toggle_button_get...
false
false
false
false
false
0
evdns_nameserver_free(struct nameserver *server) { if (server->socket >= 0) evutil_closesocket(server->socket); (void) event_del(&server->event); event_debug_unassign(&server->event); if (server->state == 0) (void) event_del(&server->timeout_event); event_debug_unassign(&server->timeout_event); mm_free(server)...
false
false
false
false
false
0
gnome_bg_save_to_preferences (GnomeBG *bg, GConfClient *client) { const char *color_type; const char *placement; const gchar *filename; gchar *primary; gchar *secondary; primary = color_to_string (&bg->primary); secondary = color_to_string (&bg->secondary); color_type...
false
false
false
false
false
0
StartKad() { if (!Kademlia::CKademlia::IsRunning() && thePrefs::GetNetworkKademlia()) { // Kad makes no sense without the Client-UDP socket. if (!thePrefs::IsUDPDisabled()) { if (ipfilter->IsReady()) { AddLogLineC(_("Starting KAD now...")); Kademlia::CKademlia::Start(); } else { AddLogLineC(_("KA...
false
false
false
false
false
0
wav_open(input_object *obj, const char *name) { char audiobuf[4096]; struct wav_local_data *data; if (!obj) return 0; obj->local_data = malloc(sizeof(struct wav_local_data)); if (!obj->local_data) { return 0; } data = (struct wav_local_data *)obj->local_data; init_wav(); if (!name || !strcmp(name, "-"))...
false
false
false
false
false
0
Export(SecAttrFormat format,XMLNode &val) const { if(attrs_.size() == 0) return true; if(attrs_.size() == 1) return (*attrs_.begin())->Export(format,val); if(!MultiSecAttr::Export(format,val)) return false; val.Name("Policies"); return true; } }
false
false
false
false
false
0
draw_option (GtkStyle *style, GdkWindow *window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle *area, GtkWidget *widget, const gchar *detail, gint x, gint y, gint width, gint height)...
false
false
false
false
false
0
operator[](int pos) const { return entryList().at(pos); }
false
false
false
false
false
0
Aggro(Unit* /*pWho*/) override { if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned) { if (DoCastSpellIfCan(m_creature, SPELL_CALL_FRIENDS) == CAST_OK) { DoScriptText(SAY_SLIM_AGGRO, m_creature); m_bFriendSummoned = true; ...
false
false
false
false
false
0
kf_copy(int, Fl_Text_Editor* e) { if (!e->buffer()->selected()) return 1; const char *copy = e->buffer()->selection_text(); if (*copy) Fl::copy(copy, (int) strlen(copy), 1); free((void*)copy); e->show_insert_position(); return 1; }
false
false
false
false
false
0
CreateLut3DOp(OpRcPtrVec & ops, Lut3DRcPtr lut, Interpolation interpolation, TransformDirection direction) { ops.push_back( Lut3DOpRcPtr(new Lut3DOp(lut, interpolation, direction)) ); }
false
false
false
false
false
0
smc_decode_end(AVCodecContext *avctx) { SmcContext *s = avctx->priv_data; if (s->frame.data[0]) avctx->release_buffer(avctx, &s->frame); return 0; }
false
false
false
false
false
0
totalNumberOfItems(void) const { unsigned int nr = this->items.getLength(); if (this->isGroup()) { for (int i = 0; i < 8; i++) { nr += this->children[i]->totalNumberOfItems(); } } return nr; }
false
false
false
false
false
0
bcm6328_led_set(struct led_classdev *led_cdev, enum led_brightness value) { struct bcm6328_led *led = container_of(led_cdev, struct bcm6328_led, cdev); unsigned long flags; spin_lock_irqsave(led->lock, flags); *(led->blink_leds) &= ~BIT(led->pin); if ((led->active_low && value == LED_OFF) || (!led->...
false
false
false
false
false
0
gnome_keyring_unlock_sync (const char *keyring, const char *password) { GkrOperation *op; gkr_init (); op = unlock_keyring_start (keyring, password, gkr_callback_empty, NULL, NULL); return gkr_operation_block_and_unref (op); }
false
false
false
false
false
0
parseDoctypeToken(DoctypeToken* t) { // Ignore any doctype after the first. TODO It should be also ignored when processing DocumentFragment if (current != document || document->doctype()) return; DocumentTypeImpl* doctype = new DocumentTypeImpl(document->implementation(), document, t->name, t->publ...
false
false
false
false
false
0
reply_poster_followup(ENVELOPE *e) { if(e && e->followup_to && !strucmp(e->followup_to, "poster")){ q_status_message(SM_ORDER, 2, 3, _("Replying to Poster as specified in \"Followup-To\"")); return(1); } return(0); }
false
false
false
false
false
0
ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg) { int ret = OO_OK; H225ReleaseComplete_UUIE * releaseComplete = NULL; ASN1UINT i; DListNode *pNode = NULL; OOTimer *pTimer = NULL; unsigned reasonCode=T_H225ReleaseCompleteReason_undefinedReason; enum Q931CauseValues cause= Q93...
false
false
false
false
true
1
gtk_xtext_refresh(GtkXText * xtext, int do_trans) { if (GTK_WIDGET_REALIZED(GTK_WIDGET(xtext))) { #if defined(USE_XLIB) || defined(WIN32) if (xtext->transparent && do_trans) { gtk_xtext_free_trans(xtext); gtk_xtext_load_trans(xtext); } #endif gtk_xtext_render_page(xtext); } }
false
false
false
false
false
0
worker_thread (void *data) { Oligoindex_T *oligoindices_major, *oligoindices_minor; int noligoindices_major, noligoindices_minor; Dynprog_T dynprogL, dynprogM, dynprogR; Matchpool_T matchpool; Pairpool_T pairpool; Diagpool_T diagpool; Stopwatch_T worker_stopwatch; Request_T request; Result_T result; ...
false
false
false
false
false
0
ilTexSubImage_(ILimage *Image, void *Data) { if (Image == NULL || Data == NULL) { ilSetError(IL_INVALID_PARAM); return IL_FALSE; } if (!Image->Data) { Image->Data = (ILubyte*)ialloc(Image->SizeOfData); if (Image->Data == NULL) return IL_FALSE; } memcpy(Image->Data, Data, Image->SizeOfData); return IL_T...
false
false
false
false
false
0
_vl_svm_evaluate (VlSvm *self) { double startTime = vl_get_cpu_time () ; _vl_svm_update_statistics (self) ; self->statistics.elapsedTime = vl_get_cpu_time() - startTime ; self->statistics.iteration = 0 ; self->statistics.epoch = 0 ; self->statistics.status = VlSvmStatusConverged ; if (self->diagnosticF...
false
false
false
false
false
0
ocrdma_init_hw(struct ocrdma_dev *dev) { int status; /* create the eqs */ status = ocrdma_create_eqs(dev); if (status) goto qpeq_err; status = ocrdma_create_mq(dev); if (status) goto mq_err; status = ocrdma_mbx_query_fw_config(dev); if (status) goto conf_err; status = ocrdma_mbx_query_dev(dev); if (st...
false
false
false
false
false
0
claim_story_file(void *story_file, int32 extent) { unsigned char buf[8]; int i; unsigned char *sf=(unsigned char *)story_file; buf[7]=0; vbr_state=VB_INIT; if (extent<12) return INVALID_STORY_FILE_RV; for(i=0;i<7;i++) buf[i]=taf_translate(sf[i]); if (strcmp((char *)buf,"Version")) return INVALID_STORY_...
false
false
false
false
false
0
concat_annotation ( ptr, annotation, include_date, include_time, indentation, newline ) char **ptr; TaskAnnotation *annotation; int include_date, include_time; char *indentation; char *newline; { struct tm *tm; char date_time_str[30]; char padding[30], *p; char *anntext, *newtext; int first; strcpy ( dat...
false
false
false
false
false
0
select_p_job_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t mode, List preemptee_candidates, List *preemptee_job_list, bitstr_t *exc_core_bitmap) { int max_share = 0, rc = EINVAL; xassert(bitmap); if (jo...
false
false
false
false
false
0
rtsx_usb_ms_handle_req(struct work_struct *work) { struct rtsx_usb_ms *host = container_of(work, struct rtsx_usb_ms, handle_req); struct rtsx_ucr *ucr = host->ucr; struct memstick_host *msh = host->msh; int rc; if (!host->req) { pm_runtime_get_sync(ms_dev(host)); do { rc = memstick_next_req(msh, &host->...
false
false
false
false
false
0
spoiler_out_n_chars(int n, char c) { while (--n >= 0) file_writec(fh, c); }
false
false
false
false
false
0
sinfo_new_sum_cube_to_image(cpl_imagelist * cube) { cpl_image * im ; int i, j, nz ; int ilx=0; int ily=0; int inp=0; float* pidata=NULL; float* podata=NULL; cpl_image* i_img=NULL; if ( cube == NULL ) { sinfo_msg_error ("null cube") ; return NULL ; ...
false
false
false
false
false
0
process_request(ns_lwdclient_t *client) { lwres_buffer_t b; isc_result_t result; lwres_buffer_init(&b, client->buffer, client->recvlength); lwres_buffer_add(&b, client->recvlength); result = lwres_lwpacket_parseheader(&b, &client->pkt); if (result != ISC_R_SUCCESS) { ns_lwdclient_log(50, "invalid packet heade...
false
false
false
false
false
0
gst_dvbsub_overlay_change_state (GstElement * element, GstStateChange transition) { GstDVBSubOverlay *render = GST_DVBSUB_OVERLAY (element); GstStateChangeReturn ret; switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: gst_segment_init (&render->video_segment, GST_FORMAT_TIME); gst_s...
false
false
false
false
false
0
free_descr(descr_line *txt) { if (txt==NULL) return; if (mem_descr==NULL) rfree(txt[0]); /* First free the string block containing the text...*/ rfree(txt); /* ... then the array of pointers to it */ }
false
false
false
false
false
0
ensSeqregionIsToplevel(EnsPSeqregion sr, AjBool *Presult) { AjIList iter = NULL; const AjPList list = NULL; EnsPAttribute attribute = NULL; if (!sr) return ajFalse; if (!Presult) return ajFalse; list = ensSeqregionLoadAttributes(sr); iter = ajListIterNewread(list);...
false
false
false
false
false
0
writer_done() { int i; for (i = 0; i < max_pes_writers; i++) { fclose(pes_writers[i].fp); free(pes_writers[i].filename); } free(pes_writers); pes_writers = NULL; }
false
false
false
false
false
0
SetGroupTypeVRecursive(Object object, Type type, Category cat, int rank, int *shape) { int i; Object child; Class class; if (DXGetObjectClass(object) != CLASS_GROUP) return OK; class = DXGetGroupClass((Group)object); for (i = 0; (child=DXGetEnumeratedMember((Group)object, i, NULL))...
false
false
false
false
false
0
interpret_audioio_manager(const string& argu) { // -------- DBC_REQUIRE(argu.size() > 0); DBC_REQUIRE(argu[0] == '-'); DBC_REQUIRE(istatus_rep == false); // -------- string tname = kvu_get_argument_number(1, argu); bool match = true; if (argu.size() < 2) return; switch(argu[1]) { case 'G': { ...
false
false
false
false
false
0
ipmi_interpret_ctx_set_flags (ipmi_interpret_ctx_t ctx, unsigned int flags) { unsigned int tmpflags = 0; if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_INTERPRET_FLAGS_MASK...
false
false
false
false
false
0
bail_out_on_error(http_ctx_t *ctx, ap_filter_t *f, int http_error) { apr_bucket *e; apr_bucket_brigade *bb = ctx->bb; apr_brigade_cleanup(bb); e = ap_bucket_error_create(http_error, NULL, f->r->po...
false
false
false
false
false
0
glade_gtk_menu_tool_button_add_child (GladeWidgetAdaptor *adaptor, GObject *object, GObject *child) { if (GTK_IS_MENU (child)) { g_object_set_data (child, "special-child-type", "menu"); gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (object), GTK_WIDGET (child)); } else ...
false
false
false
false
false
0
wlc_phy_chanspec_radio2055_setup(struct brcms_phy *pi, const struct chan_info_nphy_2055 *ci) { write_radio_reg(pi, RADIO_2055_PLL_REF, ci->RF_pll_ref); write_radio_reg(pi, RADIO_2055_RF_PLL_MOD0, ci->RF_rf_pll_mod0); write_radio_reg(pi, RADIO_2055_RF_PLL_MOD1, ci->RF_rf_pll_mod1); write_radio_reg(pi, RADIO_20...
false
false
false
false
false
0
logPDFWeight() const { if ( !theVerbose ) return; generator()->log() << "'" << name() << "' calculated pdf weight = " << lastMEPDFWeight() << " from XComb " << lastXCombPtr() << "\n" << "x1 = " << lastX1() << " (" << (mePartonData()[0]->coloured() ? "" : "not ") << "used) " << "x2 ...
false
false
false
false
false
0
SubmitEx ( const char * sIndex, const char * sTemplate, ... ) { m_sIndex = sIndex; m_sPrefix = ""; va_list ap; va_start ( ap, sTemplate ); VaSubmit ( ap, sTemplate ); va_end ( ap ); }
false
false
false
false
false
0
ixgbe_add_vxlan_port(struct net_device *dev, sa_family_t sa_family, __be16 port) { struct ixgbe_adapter *adapter = netdev_priv(dev); struct ixgbe_hw *hw = &adapter->hw; u16 new_port = ntohs(port); if (!(adapter->flags & IXGBE_FLAG_VXLAN_OFFLOAD_CAPABLE)) return; if (sa_family == AF_INET6) return; if (...
false
false
false
false
false
0
ReQuery() { CECPacket up_req(EC_OP_GET_ULOAD_QUEUE); const CECPacket *up_reply = m_webApp->SendRecvMsg_v2(&up_req); if (!up_reply) { return false; } // // query succeded - flush existing values and refill EraseAll(); // ADUNANZA BEGIN // Backport #if 0 for (CECPacket::const_iterator it = up_reply->begin(); it...
false
false
false
false
false
0
app_plan_ati( SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu ) { COPROC_ATI& c = sreq.coprocs.ati; if (!c.count) { if (config.debug_version_select) { log_messages.printf(MSG_NORMAL,"[version] Host has no ATI GPUs\n"); } return false; } if (!strcmp(plan...
false
false
false
false
false
0
gst_aasink_show_frame (GstVideoSink * videosink, GstBuffer * buffer) { GstAASink *aasink; GstVideoFrame frame; aasink = GST_AASINK (videosink); GST_DEBUG ("show frame"); if (!gst_video_frame_map (&frame, &aasink->info, buffer, GST_MAP_READ)) goto invalid_frame; gst_aasink_scale (aasink, GST_VIDEO_FR...
false
false
false
false
false
0
jinit_merged_upsampler (oe_j_decompress_ptr cinfo) { my_upsample_ptr upsample; upsample = (my_upsample_ptr) (*cinfo->mem->alloc_small) ((oe_j_common_ptr) cinfo, OE_JPOOL_IMAGE, SIZEOF(my_upsampler)); cinfo->upsample = (struct openexif_jpeg_upsampler *) upsample; upsample->pub.start_pass = start_pass_me...
false
false
false
false
false
0
configGroup() { return conf.isValid() ? conf : KConfigGroup(KGlobal::config(), "PlasmaRunnerManager"); }
false
false
false
false
false
0
fr_archive_add_files (FrArchive *archive, GList *file_list, GFile *base_dir, const char *dest_dir, gboolean update, gboolean follow_links, const char *password, gboolean en...
false
false
false
false
false
0
free_list_sel(LIST_SEL_S **lsel) { if(lsel && *lsel){ free_list_sel(&(*lsel)->next); if((*lsel)->item) fs_give((void **) &(*lsel)->item); if((*lsel)->display_item) fs_give((void **) &(*lsel)->display_item); fs_give((void **) lsel); } }
false
false
false
false
false
0
dotakeoff(void) { struct obj *otmp = (struct obj *)0; int armorpieces = 0; #define MOREARM(x) if (x) { armorpieces++; otmp = x; } MOREARM(uarmh); MOREARM(uarms); MOREARM(uarmg); MOREARM(uarmf); if (uarmc) { armorpieces++; otmp = uarmc; } else if (uarm) { armorpieces++; otmp = uarm; } else if (uarmu) {...
false
false
false
false
false
0
bd_reg_read(BLURAY *bd, int psr, int reg) { if (psr) { return bd_psr_read(bd->regs, reg); } else { return bd_gpr_read(bd->regs, reg); } }
false
false
false
false
false
0
is_canonical(const RCP<const Basic> &arg) { // TODO: Add further checks for +inf -inf cases // TODO: Lookup into a cst table once complex is implemented if (eq(arg, one)) return false; return true; }
false
false
false
false
false
0
receive_status(int in, struct ref *refs) { struct ref *hint; char line[1000]; int ret = 0; int len = packet_read_line(in, line, sizeof(line)); if (len < 10 || memcmp(line, "unpack ", 7)) return error("did not receive remote status"); if (memcmp(line, "unpack ok\n", 10)) { char *p = line + strlen(line) - 1; ...
true
true
false
false
false
1