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
usbhs_parse_dt(struct device *dev) { struct renesas_usbhs_platform_info *info; struct renesas_usbhs_driver_param *dparam; const struct of_device_id *of_id = of_match_device(usbhs_of_match, dev); u32 tmp; int gpio; info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL); if (!info) return NULL; dparam = &info->d...
false
false
false
false
false
0
Function(const vector<string>& args) { if(!AssertArgument(args, 2, 2)) return(""); return(IntToString(Engine->EntrySize(args[1]))); }
false
false
false
false
false
0
e_table_set_cursor_row (ETable *e_table, gint row) { g_return_if_fail (E_IS_TABLE (e_table)); g_return_if_fail (row >= 0); g_object_set ( e_table->selection, "cursor_row", row, NULL); }
false
false
false
false
false
0
yy_get_previous_state (yyscan_t yyscanner) { yy_state_type yy_current_state; char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { ...
false
false
false
false
false
0
vtkUpdateFastPathIDsInternal( vtkSelection* selection, int piece, std::vector<vtkIdType>& ids, std::vector<unsigned int>& cids) { if (!selection) { return true; } for (unsigned int n = 0; n < selection->GetNumberOfNodes(); n++) { vtkSelectionNode* node = selection->GetNode(n); vtkInfo...
false
false
false
false
false
0
DeterminePeptideBackbone(OBMol &mol) { ConstrainBackbone(mol, Peptide, MAXPEPTIDE); unsigned int i, numAtoms = mol.NumAtoms(); // Cyclic peptides have no NTer (1SKI) // timvdm 30/06/08 bool foundNTer = false; for (i = 0 ; i < numAtoms; i++) if (bitmasks[i] & BitNTer) foundNTer ...
false
false
false
false
false
0
on_new_file_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *dialog; gchar *fpm_directory; dialog = gtk_file_chooser_dialog_new (_("New Password File"), GTK_WINDOW(gui->main_window), GTK_FILE_...
false
false
false
false
false
0
logd_hup_action(int sig, gpointer userdata) { cl_log_close_log_files(); if (write_process_pid) /* do we want to propagate the HUP, * or do we assume that it was a killall anyways? */ CL_KILL(write_process_pid, SIGHUP); else cl_log(LOG_INFO, "SIGHUP received, re-opened log files"); return TRUE; }
false
false
false
false
false
0
gck_session_wrap_key_finish (GckSession *self, GAsyncResult *result, gsize *n_result, GError **error) { WrapKey *args; gpointer ret; g_return_val_if_fail (GCK_IS_SESSION (self), NULL); g_return_val_if_fail (n_result, NULL); args = _gck_call_arguments (result, WrapKey); if (!_gck_c...
false
false
false
false
false
0
gtk_source_gutter_get_window (GtkSourceGutter *gutter) { g_return_val_if_fail (GTK_SOURCE_IS_GUTTER (gutter), NULL); g_return_val_if_fail (gutter->priv->view != NULL, NULL); return gtk_text_view_get_window (GTK_TEXT_VIEW (gutter->priv->view), gutter->priv->window_type); }
false
false
false
false
false
0
ggc_pch_count_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED, size_t size, bool is_string ATTRIBUTE_UNUSED, enum gt_types_enum type ATTRIBUTE_UNUSED) { unsigned order; if (size < NUM_SIZE_LOOKUP) order = size_lookup[size]; else { order = 10; while (size > OBJECT_SIZE...
false
false
false
false
false
0
ParseItem(const XmlElement* item_elem, std::vector<PubSubItem>* items) { PubSubItem item; item.itemid = item_elem->Attr(QN_ID); item.elem = item_elem; items->push_back(item); }
false
false
false
false
false
0
ftp_open ( struct xfer_interface *xfer, struct uri *uri ) { struct ftp_request *ftp; struct sockaddr_tcpip server; int rc; /* Sanity checks */ if ( ! uri->path ) return -EINVAL; if ( ! uri->host ) return -EINVAL; /* Allocate and populate structure */ ftp = zalloc ( sizeof ( *ftp ) ); if ( ! ftp ) retur...
false
false
false
false
false
0
uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsigned int flags, void *value) { uwatec_smart_parser_t *parser = (uwatec_smart_parser_t *) abstract; const unsigned char *data = abstract->data; unsigned int size = abstract->size; unsigned int header = 0; unsigned int trimix = 0; con...
false
false
false
false
false
0
gnutls_dh_get_pubkey (gnutls_session_t session, gnutls_datum_t * raw_key) { dh_info_st *dh; anon_auth_info_t anon_info; cert_auth_info_t cert_info; cert_auth_info_t psk_info; switch (gnutls_auth_get_type (session)) { case GNUTLS_CRD_ANON: { anon_info = _gnutls_get_auth_info (session); ...
false
false
false
false
false
0
HeapFreeObj( EnvT* env, BaseGDL* var, bool verbose) { if( var == NULL) return; if( var->Type() == GDL_STRUCT) { DStructGDL* varStruct = static_cast<DStructGDL*>( var); DStructDesc* desc = varStruct->Desc(); for( SizeT e=0; e<varStruct->N_Elements(); ++e) for( SizeT t=0; t...
false
false
false
false
false
0
i915_load_modeset_init(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; int ret; if (i915_inject_load_failure()) return -ENODEV; ret = intel_bios_init(dev_priv); if (ret) DRM_INFO("failed to find VBIOS tables\n"); /* If we have > 1 VGA cards, then we need to arbitrate access ...
false
false
false
false
false
0
gst_rtspsrc_handle_src_query (GstPad * pad, GstQuery * query) { GstRTSPSrc *src; gboolean res = FALSE; src = GST_RTSPSRC_CAST (gst_pad_get_parent (pad)); GST_DEBUG_OBJECT (src, "pad %s:%s received query %s", GST_DEBUG_PAD_NAME (pad), GST_QUERY_TYPE_NAME (query)); switch (GST_QUERY_TYPE (query)) { ...
false
false
false
false
false
0
net_query_host(void) { static char *s = CN; if (CONNECTED) { Free(s); #if defined(LOCAL_PROCESS) /*[*/ if (local_process) { s = xs_buffer("process %s", hostname); } else #endif /*]*/ { s = xs_buffer("host %s %u %s", hostname, current_port, #if defined(HAVE_LIBSSL) /*[*/ secure_connection? "e...
false
false
false
false
false
0
printRule(rule_data * current_rule_data, FILE *file) { /* If current_rule_data is NULL */ if(current_rule_data != NULL) { if(current_rule_data->not == 1) fputs("not ( ", file); if(current_rule_data->time_rule == 1) { fputs("Periodicity: ", file); fputs(current_rule_data->lhs, file); fputs("\\nPhase: ...
false
false
false
false
false
0
buildDrag(QWidget * widget) { QImage image; if ( mHasToUpdateDragImage ) updateDragImage(); image = mDragImage->scaled( mDragImage->size() * sceneTransform().m11() * scene()->views()[0]->transform().m11() , Qt::KeepAspectRatio , Qt::SmoothTransformation ); QMimeData * data = buildMimeData(); QDrag *drag = ...
false
false
false
false
false
0
SerializeString(const unsigned char* s) { writer_->AddCharacter('\n'); writer_->AddCharacter('\"'); for ( ; *s != '\0'; ++s) { switch (*s) { case '\b': writer_->AddString("\\b"); continue; case '\f': writer_->AddString("\\f"); continue; case '\n': writ...
false
false
false
false
false
0
fr_archive_open_finish (GFile *file, GAsyncResult *result, GError **error) { GSimpleAsyncResult *simple; OpenData *open_data; g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (file), fr_archive_open), NULL); simple = G_SIMPLE_ASYNC_RESULT (result); if (g_simp...
false
false
false
false
false
0
AddPoint(const trpg3dPoint &pt) { if (valid) { ll.x = MIN(pt.x,ll.x); ll.y = MIN(pt.y,ll.y); ll.z = MIN(pt.z,ll.z); ur.x = MAX(pt.x,ur.x); ur.y = MAX(pt.y,ur.y); ur.z = MAX(pt.z,ur.z); } else { valid = true; ll = ur = pt; } }
false
false
false
false
false
0
copy_filesystem_element_recurs(void *_data, char *source) { copydir_data *data = (copydir_data *)_data; data->dst[data->dst_len] = 0; git_path_join(data->dst, data->dst, source + data->src_len); if (git_futils_isdir(source) == GIT_SUCCESS) return git_futils_direach(source, GIT_PATH_MAX, copy_filesystem_element_...
false
false
false
false
false
0
clish_ptype_new(const char *name, const char *help, const char *pattern, clish_ptype_method_e method, clish_ptype_preprocess_e preprocess) { clish_ptype_t *this = malloc(sizeof(clish_ptype_t)); if(NULL !=...
false
false
false
false
false
0
yy_readline_get () { SigHandler *old_sigint; int line_len; unsigned char c; if (!current_readline_line) { if (!bash_readline_initialized) initialize_readline (); #if defined (JOB_CONTROL) if (job_control) give_terminal_to (shell_pgrp, 0); #endif /* JOB_CONTROL */ old_sigint = (SigHand...
false
false
false
false
false
0
irafputc (string, irafheader, offset, nc) char *string; /* String to insert into header */ char *irafheader; /* IRAF image header */ int offset; /* Number of bytes to skip before string */ int nc; /* Maximum number of characters in string */ { char *chead; int i; chead = irafheader; for (i = 0; i <...
false
false
false
false
false
0
calc_fwd_nn_cell_list( rspl *s, /* this */ double *v /* Output values */ ) { int f, fdi = s->fdi, ix; int **rpp; int rgres_1 = s->rev.res - 1; int mi[MXDO]; if (s->rev.rev_valid == 0) init_revaccell(s); for (ix = 0, f = 0; f < fdi; f++) { double t = (v[f] - s->rev.gl[f])/s->rev.gw[f]; mi[f] = (int)flo...
false
false
false
false
false
0
Open(FreeImageIO *io, fi_handle handle, BOOL read) { // Allocate memory for the header structure ICONHEADER *lpIH = (ICONHEADER*)malloc(sizeof(ICONHEADER)); if(lpIH == NULL) { return NULL; } if (read) { // Read in the header io->read_proc(lpIH, 1, sizeof(ICONHEADER), handle); #ifdef FREEIMAGE_BIGENDIAN Sw...
false
false
false
false
false
0
ves_icall_MonoField_GetFieldOffset (MonoReflectionField *field) { MonoClass *parent = field->field->parent; if (!parent->size_inited) mono_class_init (parent); return field->field->offset - sizeof (MonoObject); }
false
false
false
false
false
0
check_extensions() { Iterator ki; if (!extendhash) return; for (ki = First(extendhash); ki.key; ki = Next(ki)) { if (!Strchr(ki.key,'<')) { SWIG_WARN_NODE_BEGIN(ki.item); Swig_warning(WARN_PARSE_EXTEND_UNDEF,Getfile(ki.item), Getline(ki.item), "%%extend defined for an undeclared class %s.\n", ki....
false
false
false
false
false
0
visual_2d_node_cull(GF_TraverseState *tr_state, GF_Rect *bounds) { GF_Rect rc; GF_IRect i_rc; rc = *bounds; gf_mx2d_apply_rect(&tr_state->transform, &rc); i_rc = gf_rect_pixelize(&rc); if (gf_irect_overlaps(&tr_state->visual->top_clipper, &i_rc)) return 1; return 0; }
false
false
false
false
false
0
libeval_25add_load_path_hookX(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj proc_scm; ScmObj proc; ScmObj afterP_scm; int afterP; ScmObj SCM_SUBRARGS[3]; int SCM_i; SCM_ENTER_SUBR("%add-load-path-hook!"); if (SCM_ARGCNT >= 3 && !SCM_NULLP(SCM_ARGREF(SCM_ARGCNT-1))) Scm_Error("too many ...
false
false
false
false
false
0
jcnf_add_key( jcnf *p, char *key, jc_type type, unsigned char *data, size_t dataSize, /* Data size (including string nul) */ char *comment ) { jc_error ev; if (p->modify == 0) return jc_update_nomod; if ((ev = jcnf_add_key_internal(p,key,type,data,dataSize,comment)) == jc_ok) { p->modified = 1; } return...
false
false
false
false
false
0
gen_prologue (void) { rtx _val = 0; start_sequence (); { #line 15073 "../../src/gcc/config/rs6000/rs6000.md" { rs6000_emit_prologue (); if (!TARGET_SCHED_PROLOG) emit_insn (gen_blockage ()); DONE; } } emit_insn (gen_rtx_USE (VOIDmode, const0_rtx)); _val = get_insns (); end_sequence (); return...
false
false
false
false
false
0
model_get_instance(int model_instance_num) { Assert( model_instance_num >= 0 ); Assert( model_instance_num < (int)Polygon_model_instances.size() ); if ( model_instance_num < 0 || model_instance_num >= (int)Polygon_model_instances.size() ) { return NULL; } return Polygon_model_instances[model_instance_num]; }
false
false
false
false
false
0
p_load_points(char *filename) { gint l_rc; gint l_errno; l_rc = gap_mov_exec_gap_load_pointfile(filename, pvals); l_errno = errno; if (l_rc < -1) { p_reset_points(); } if (l_rc != 0) { if(l_errno != 0) { g_message(_("ERROR: Could not open controlpoints\n" "filename:...
false
false
false
false
false
0
nm_system_del_vlan_iface (const char *iface) { int ret = 0; struct nl_sock *nlh = NULL; struct nl_cache *cache = NULL; struct rtnl_link *new_link = NULL; int itype; g_return_val_if_fail (iface != NULL, FALSE); itype = nm_system_get_iface_type (-1, iface); g_return_val_if_fail (itype == NM_IFACE_TYPE_VLAN, FAL...
false
false
false
false
false
0
zbuildfont4(i_ctx_t *i_ctx_p) { os_ptr op = osp; build_proc_refs build; int code = build_gs_font_procs(op, &build); if (code < 0) return code; return buildfont1or4(i_ctx_p, op, &build, ft_disk_based, bf_options_none); }
false
false
false
false
false
0
OnBuildTargetAdded(CodeBlocksEvent& event) { cbProject* project = event.GetProject(); if(project != m_pProject) { return; } wxString newTarget = event.GetBuildTargetName(); wxString oldTarget = event.GetOldBuildTargetName(); if(!oldTarget.IsEmpty()) { for (RemoteDebugging...
false
false
false
false
false
0
preprocess(str, cmd) STR str, cmd; { int dad_rdr, dad_wtr, kid_rdr, kid_wtr, dad_err, kid_err; int pi[2], po[2], pe[2]; int pid; FILE *f, *i; int code; STR buff; char chunk[BUFF_SIZE]; int len, red; fflush(stdout); pipe(pi); pipe(po); pipe(pe); dad_rdr = po[0...
false
false
false
false
false
0
StrategyGetBuffer(void) { volatile BufferDesc *buf; int trycounter; LWLockAcquire(BufFreelistLock, LW_EXCLUSIVE); /* * Try to get a buffer from the freelist. Note that the freeNext fields * are considered to be protected by the BufFreelistLock not the * individual buffer spinlocks, so it's OK to manipula...
false
false
false
false
false
0
Note_new() { /* already in use? */ if(Note != NULL) Note_freeall(); /* allocate memory */ Note = (Note_ob *)xmalloc(sizeof(Note_ob)); /* initialize */ Note->flags = 0L; Note->send_buf[0] = 0; Note->send_buf1[0] = 0; Note->numNotesQueued = 0; Note->time_dequeued = 0L; }
false
false
false
false
false
0
_e_kbd_dict_open(E_Kbd_Dict *kd) { struct stat st; kd->file.fd = open(kd->file.file, O_RDONLY); if (kd->file.fd < 0) return 0; if (fstat(kd->file.fd, &st) < 0) { close(kd->file.fd); return 0; } kd->file.size = st.st_size; eina_mmap_safety_enabled_set(EINA_TRUE); k...
false
false
false
false
true
1
Connect() { password_required = false; bad_size = false; try { if( !m_interface.Connect() ) return (m_connected = false); } catch( Barry::BadPassword &bp ) { password_out_of_tries = bp.out_of_tries(); password_remaining_tries = bp.remaining_tries(); password_required = true; return (m_connected = fals...
false
false
false
false
false
0
pk_transaction_files_cb (PkBackendJob *job, PkFiles *item, PkTransaction *transaction) { guint i; gchar *package_id; gchar **files; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction->priv->tid != NULL); /* get data */ g_object_get (item, "package-id", &package_id...
false
false
false
false
false
0
Update(int current, int total, const wxString & message) { if (total != 0) { return Update((int)(current * ((double)(1000.0 / total))), message); } else { return Update(1000, message); } }
false
false
false
false
false
0
page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { struct page *page = buf->page; struct address_space *mapping; lock_page(page); mapping = page_mapping(page); if (mapping) { WARN_ON(!PageUptodate(page)); /* * At least for ext2 with nobh option, we need to wait on...
false
false
false
false
false
0
AcceptSession(Session* session, const cricket::CallOptions& options) { std::vector<Session*>::iterator it; it = std::find(sessions_.begin(), sessions_.end(), session); ASSERT(it != sessions_.end()); if (it != sessions_.end()) { session->Accept( session_client_->CreateAnswer(...
false
false
false
false
false
0
TTGetPV (uint8_t side, uint8_t ply, int score, int *move) /***************************************************************************** * * Probe the transposition table. There are 2 entries to be looked at as * we are using a 2-tier transposition table. This routine merely wants to * get the PV from the hash...
false
false
false
false
false
0
rt_stop(void) { song_iterator_t *it = play_it; play_it = NULL; if (it) songit_free(it); if (seq && seq->allstop) seq->allstop(); return SFX_OK; }
false
false
false
false
false
0
GetOption(enum CCommandLine::t_option option) const { wxString value; switch (option) { case site: if (m_parser.Found(_T("c"), &value)) return value; break; case logontype: if (m_parser.Found(_T("l"), &value)) return value; break; case local: if (m_parser.Found(_T("a"), &value)) return value; ...
false
false
false
false
false
0
master_device_names(const std::string& model) { MasterDeviceNamesList::const_iterator m = _master_device_names_list.find(model); if (m != _master_device_names_list.end()) { return boost::shared_ptr<MasterDeviceNames>(m->second); } return boost::shared_ptr<MasterDeviceNames>(); }
false
false
false
false
false
0
acseq_i2s(struct v3_ext_method*, void* data) { AC_SEQ* acseq = NULL; acseq = (AC_SEQ *)data; if(!acseq) return NULL; std::string encoded_acseq; AC *item = NULL; int num = sk_AC_num(acseq->acs); for (int i =0; i < num; i++) { item = sk_AC_value(acseq->acs, i); unsigned int len = i2d_AC(item, NULL)...
false
false
false
false
false
0
win_size_save(gap) garray_T *gap; { win_T *wp; ga_init2(gap, (int)sizeof(int), 1); if (ga_grow(gap, win_count() * 2) == OK) for (wp = firstwin; wp != NULL; wp = wp->w_next) { ((int *)gap->ga_data)[gap->ga_len++] = wp->w_width + wp->w_vsep_width; ((int *)gap->ga_data)[gap->ga_le...
false
false
false
false
false
0
iax_handle_txreject(struct iax_session *s) { struct iax_session *s0, *s1; s0 = s; s1 = iax_find_session2(s0->transferpeer); if (s1 != NULL && s0->transferpeer == s1->callno && s1->transferring) { if (s1->transfer_moh) { s1->transfer_moh = 0; send_command_immediate(s1, AST_FRAME_IAX, IAX_COMMAND_UNQUE...
false
false
false
false
false
0
apache2_jar_get(apreq_handle_t *handle, const char *name) { struct apache2_handle *req = (struct apache2_handle *)handle; const apr_table_t *t; const char *val; if (req->jar_status == APR_EINIT) apache2_jar(handle, &t); else t = req->jar; if (t == NULL) return NULL; ...
false
false
false
false
false
0
ensure_repository_discover(const char *start_path, const char *ceiling_dirs, git_buf *expected_path) { git_buf found_path = GIT_BUF_INIT; cl_git_pass(git_repository_discover(&found_path, start_path, 0, ceiling_dirs)); //across_fs is always 0 as we can't automate the ...
false
false
false
false
false
0
gth_spliced_seq_border_length(const GthSplicedSeq *spliced_seq, unsigned long position) { gt_assert(gth_spliced_seq_pos_is_border(spliced_seq, position)); return spliced_seq->positionmapping[position+1] - spliced_seq->positionmapping[position] - 1; }
false
false
false
false
false
0
parseLogFormatString(char *fmt) { if (strlen(fmt) >= maxBufSize) { maxBufSize = strlen(fmt) + 1; } logParseToken *list = NULL; logParseToken *cur = NULL; while(fmt != NULL && *fmt != '\0') { //debug_print("kala: \"%s\"\n", fmt); logParseToken *tok = make_token(); tok->string_before = getText...
false
false
false
false
false
0
add_end_cmd(void) { uint32_t pbl_end_cmd[4] = {0x09138000, 0x00000000, 0x091380c0, 0x00000000}; uint32_t crc32_pbl; int i; unsigned char *p = (unsigned char *)&pbl_end_cmd; if (ENDIANNESS == 'l') { for (i = 0; i < 4; i++) pbl_end_cmd[i] = reverse_byte(pbl_end_cmd[i]); } for (i = 0; i < 16; i++) { *pme...
false
false
false
false
true
1
foldercheck_append_item(GtkTreeStore *store, FolderItem *item, GtkTreeIter *iter, GtkTreeIter *parent) { gchar *name, *tmpname; GdkPixbuf *pixbuf, *pixbuf_open; gboolean use_color; PangoWeight weight = PANGO_WEIGHT_NORMAL; GdkColor *foreground = NULL; static GdkColor color_noselect = {0, COLOR_DIM, ...
false
false
false
false
false
0
utf8Length(const std::string &str) { int length = 0; const char *p = str.c_str(); char c; // How to recognize entity: // Unicode entities start with 0xxxxxxx or 11xxxxxx, // the other bytes start with 10xxxxxx. // (thanks to Egmont Koblinger) while ((c = *p++) != 0) { if ((c & 0x...
false
false
false
false
false
0
dec_get(int code, vpiHandle ref) { switch (code) { case vpiConstType: return vpiDecConst; case vpiSigned: return 1; case vpiSize: return 32; case vpiAutomatic: return 0; #if defined(CHECK_WITH_VALGRIND) || defined(BR916_STOPGAP_FIX) case _vpiFromThr: re...
false
false
false
false
false
0
setMeshBgMeshFiles(int nof_files, char** bg_mesh_files) { delete[] modelInfo->meshBgMeshFiles; modelInfo->meshBgMeshFiles = NULL; if ( nof_files > 0 ) { // Alloc table modelInfo->meshBgMeshFiles = new char*[nof_files]; for (int i = 0; i < nof_files; i++) { modelInfo->meshBgMeshFiles[i] = NUL...
false
false
false
false
false
0
_cache_load(netsnmp_cache * cache, void *vmagic) { DEBUGTRACE; if ((NULL == cache) || (NULL == cache->magic)) { snmp_log(LOG_ERR, "invalid cache for inetNetToMediaTable_cache_load\n"); return -1; } DEBUGMSGTL(("inetNetToMediaTable/cache", "inetNetToMedia_load %p/%p\n", ...
false
false
false
false
false
0
ConGetEvent(TEventMask EventMask, TEvent *Event, int WaitTime, int Delete, GView **view) { if (view) *view = 0; return ::ConGetEvent(EventMask, Event, WaitTime, Delete); }
false
false
false
false
false
0
passdown(node *desc, node *parent, node *start, node *below, node *item, node *added, node *total, node *tempdsc, node *tempprt, boolean multf) { /* track down to node start to see if an ancestor branch can be collapsed */ node *temp; boolean done, allsame; done = ...
false
false
false
false
false
0
cgi_print_form(formp, outstream) cgi_form *formp; FILE *outstream; { int i; fprintf(outstream, "source=\t%s\nmaxstorage=\t%d\nmaxfields=\t%d\nnfields=\t%d\n", formp->source, formp->maxstorage, formp->maxfields, formp->nfields); for (i=0; i<formp->nfields; i++) printf("Field %s=\t%s\n", formp-...
false
false
false
false
false
0
compile_tree_n_times(Node* node, int n, regex_t* reg) { int i, r; for (i = 0; i < n; i++) { r = compile_tree(node, reg); if (r) return r; } return 0; }
false
false
false
false
false
0
cdv_chip_setup(struct drm_device *dev) { struct drm_psb_private *dev_priv = dev->dev_private; INIT_WORK(&dev_priv->hotplug_work, cdv_hotplug_work_func); if (pci_enable_msi(dev->pdev)) dev_warn(dev->dev, "Enabling MSI failed!\n"); dev_priv->regmap = cdv_regmap; gma_get_core_freq(dev); psb_intel_opregion_init(de...
false
false
false
false
false
0
dhcp6_print(const u_char *cp, u_int length) { struct dhcp6 *dh6; struct dhcp6_relay *dh6relay; const u_char *ep; u_char *extp; const char *name; printf("dhcp6"); ep = (u_char *)snapend; if (cp + length < ep) ep = cp + length; dh6 = (struct dhcp6 *)cp; dh6relay = (struct dhcp6_relay *)cp; TCHECK(dh6->dh6...
false
true
false
false
false
1
FuncIO_exit(Obj self,Obj status) { if (!IS_INTOBJ(status)) { SyClearErrorNo(); return Fail; } exit(INT_INTOBJ(status)); /* This never happens: */ return True; }
false
false
false
false
false
0
get_file_anno(GP<DjVuFile> file) { // Make sure all data is present if (! file || ! file->is_all_data_present()) { if (file && file->is_data_present()) { if (! file->are_incl_files_created()) file->process_incl_chunks(); if (! file->are_incl_files_created()) ...
false
false
false
false
false
0
populate(unsigned int & index, QModelIndex const & parent) { int curdepth = (*toc_)[index].depth() + 1; int current_row; QModelIndex child_item; model_->insertColumns(0, 1, parent); size_t end = toc_->size(); ++index; for (; index != end; ++index) { TocItem const & item = (*toc_)[index]; if (item.depth() <...
false
false
false
false
false
0
new_adbname(dns_adb_t *adb, dns_name_t *dnsname) { dns_adbname_t *name; name = isc_mempool_get(adb->nmp); if (name == NULL) return (NULL); dns_name_init(&name->name, NULL); if (dns_name_dup(dnsname, adb->mctx, &name->name) != ISC_R_SUCCESS) { isc_mempool_put(adb->nmp, name); return (NULL); } dns_name_ini...
false
false
false
false
false
0
_gageHestStackBlurParmParse(void *ptr, char *str, char err[AIR_STRLEN_HUGE]) { gageStackBlurParm **sbp; char me[]="_gageHestStackBlurParmParse", *nerr; if (!(ptr && str)) { sprintf(err, "%s: got NULL pointer", me); return 1; } sbp = (gageStackBlurParm **)ptr; if (!strlen(str)) { /* got an empty...
true
true
false
false
false
1
p_gap_message(const char *msg) { static GapArrButtonArg l_argv[1]; int l_argc; l_argv[0].but_txt = GTK_STOCK_OK; l_argv[0].but_val = 0; l_argc = 1; if(msg) { if(*msg) { if(gap_debug) printf("%s\n", msg); gap_arr_buttons_dialog (_("GAP Message"), msg, l...
false
false
false
false
false
0
Note_flags2str(char f, char *s) { s[0] = 0; if(f & NOTE_NEW) strcat(s,"n"); if(f & NOTE_READ) strcat(s,"r"); if(f & NOTE_MEMO) strcat(s,"m"); if(f & NOTE_WALL) strcat(s,"w"); if(f & NOTE_SAVE) strcat(s,"s"); if(f & NOTE_NOTICE) strcat(s,"!"); if(s[0] == 0) strcat(s,"-"); }
false
true
false
false
false
1
gfx_v8_0_cp_gfx_resume(struct amdgpu_device *adev) { struct amdgpu_ring *ring; u32 tmp; u32 rb_bufsz; u64 rb_addr, rptr_addr; int r; /* Set the write pointer delay */ WREG32(mmCP_RB_WPTR_DELAY, 0); /* set the RB to use vmid 0 */ WREG32(mmCP_RB_VMID, 0); /* Set ring buffer size */ ring = &adev->gfx.gfx_rin...
false
false
false
false
false
0
hci_link_policy(uint16_t ocf, int plen, uint8_t *data) { const uint16_t ogf = OGF_INFO_PARAM; switch (ocf) { default: command_status(ogf, ocf, 0x01); break; } }
false
false
false
false
false
0
unpack_comm_vel(int n, int first, double *buf) { int i,m,last; double *quat; m = 0; last = first + n; for (i = first; i < last; i++) { x[i][0] = buf[m++]; x[i][1] = buf[m++]; x[i][2] = buf[m++]; if (body[i] >= 0) { quat = bonus[body[i]].quat; quat[0] = buf[m++]; quat[1] = bu...
false
false
false
false
false
0
evutil_gai_strerror(int err) { /* As a sneaky side-benefit, this case statement will get most * compilers to tell us if any of the error codes we defined * conflict with the platform's native error codes. */ switch (err) { case EVUTIL_EAI_CANCEL: return "Request canceled"; case 0: return "No error"; case ...
false
false
false
false
false
0
b43_op_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 _queue, const struct ieee80211_tx_queue_params *params) { struct b43_wl *wl = hw_to_b43_wl(hw); struct b43_wldev *dev; unsigned int queue = (unsigned int)_queue; int err = -ENODEV; if (queue >= ARRAY_SIZE(wl->qos_params)) { /* Queu...
false
true
false
false
false
1
createILPListDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level OptLevel) { const TargetMachine &TM = IS->TM; const TargetInstrInfo *TII = TM.getInstrInfo(); const TargetRegisterInfo *TRI = TM.getRegisterInfo(); const TargetLowering *TLI = &IS->getTargetLowering(); ILPBURRPr...
false
false
false
false
false
0
finish(std::istream& istr) { int c = istr.peek(); while (Ascii::isSpace(c)) { istr.get(); _value += (char) c; c = istr.peek(); } }
false
false
false
false
false
0
glusterd_store_brickinfo (glusterd_volinfo_t *volinfo, glusterd_brickinfo_t *brickinfo, int32_t brick_count, int vol_fd) { int32_t ret = -1; GF_ASSERT (volinfo); GF_ASSERT (brickinfo); ret = glusterd_store_volinfo_bric...
false
false
false
false
false
0
run_new(void) { struct run *tmp; if ((tmp = malloc(sizeof(struct run))) == NULL) { event_warn("%s: malloc", __func__); return (NULL); } tmp->base = &__run_base; tmp->how_data = NULL; tmp->how_set = 0; tmp->some_bytes_data = NULL; tmp->some_bytes_length = 0; tmp->some_bytes_set = 0; memset...
false
false
false
false
false
0
_menu_item_activate_cb(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) { Eina_List *l; Elm_Menu_Item *item2; Elm_Menu_Item *item = data; item->selected = 1; if (item->parent) ...
false
false
false
false
false
0
get_matrix_def (NODE *t, parser *p, int *sub) { NODE *n; char cexp = 0; #if SDEBUG fprintf(stderr, "get_matrix_def, p->sym = %d\n", p->sym); #endif if (p->sym == G_LCB) { lex(p); while (p->ch != 0 && !p->err) { n = expr(p); if (p->err) { break; } else { p->err = push_bn_node(t...
false
false
false
false
false
0
pcap_list_datalinks(pcap_t *p, int **dlt_buffer) { if (p->dlt_count == 0) { /* * We couldn't fetch the list of DLTs, which means * this platform doesn't support changing the * DLT for an interface. Return a list of DLTs * containing only the DLT this device supports. */ *dlt_buffer = (int*)malloc(s...
false
false
false
false
false
0
FcvMain(void) { RfmModule module; int rtn; FCV_Var_Temp_No = 0; #if 1 // add F-048 FCV_Array_Temp_No = 0; #endif // end F-048 FCV_Tag_Temp_No = 1; FCV_Mem_Temp_No = 1; rtn = FcvFileOpen(commonp->output_filep); if (rtn != 0) { MSG_PutMessage(-1, &commonp->output_filep); ...
false
false
false
false
false
0
shuffle_utf8(gchar *string) { guint n_letters = g_utf8_strlen (string, -1); gchar **result = (gchar **) g_new( gpointer, n_letters + 1); /* Randomize the list, create a random index first */ int random[n_letters]; int i; for ( i = 0 ; i < n_letters ; i++) { random[i] = i; } for ( i = 0 ; i < n_lett...
false
false
false
false
false
0
op_with_constant_singleton_value_range (tree op) { value_range_t *vr; if (is_gimple_min_invariant (op)) return op; if (TREE_CODE (op) != SSA_NAME) return NULL_TREE; vr = get_value_range (op); if (vr->type == VR_RANGE && operand_equal_p (vr->min, vr->max, 0) && is_gimple_min_invariant (v...
false
false
false
false
false
0
init_connections(size_t n) { size_t i; struct connection *cn; connection_array = malloc(n * sizeof *connection_array); if (connection_array == 0) { log_d("init_connections: out of memory"); return -1; } for (i = 0; i < n; i++) { cn = connection_array + i; if ((cn->r = malloc(sizeof *cn->r)) == 0) { lo...
false
true
false
false
false
1
fix_filename_if_new_cwd(char* filename) { int i; int fIndex; int errorFilenameFromPreviousCwd = 0; char currentFolder[FILENAMESIZE]; /* Find the starting index where the actual filename begins */ for ( i=0; filename[i] != '\0'; i++ ){ if ( filename[i] == '/' ) fIndex = i+1; } /* We now try t...
true
true
false
false
false
1
print_from(char *front, char *back) { int eol; while (front < back && compare(front, back) == EQUAL) { if (compare(front, back) == EQUAL) { eol = 0; while (front < back && !eol) { if (putchar(*front) == EOF) err(EXIT_FAILURE, "stdout"); if (*front++ == '\n') eol = 1; } } else SKIP_P...
false
false
false
false
false
0
copy_fd(int fd_in, int fd_out) { char buf[10240]; int n; gzFile gz_in; gz_in = gzdopen(dup(fd_in), "rb"); if (!gz_in) { fatal("Failed to copy fd"); } while ((n = gzread(gz_in, buf, sizeof(buf))) > 0) { if (write(fd_out, buf, n) != n) { fatal("Failed to copy fd"); } } }
false
false
false
false
false
0
bcmgenet_fixed_phy_link_update(struct net_device *dev, struct fixed_phy_status *status) { if (dev && dev->phydev && status) status->link = dev->phydev->link; return 0; }
false
false
false
false
false
0