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
decode_buf( uint8_t * out, size_t bufsize, const uint8_t * base, size_t * rem, size_t * idx ) { if (*rem < bufsize ) { return 0; } memcpy( out, (base + *idx), bufsize ); *idx += bufsize; *rem -= bufsize; return bufsize; }
false
true
false
false
false
1
PrintNode( ostream& os ) { os << " set" << this->Id << " [shape=rect,"; if ( this->OutputId >= 0 ) { os << "style=filled,"; } os << "label=\""; if ( this->Norm.Component < 0 ) { os << vtkMultiThresholdNormNames[-this->Norm.Component-1] << "("; } os << ( this->Norm.Association == vtkDa...
false
false
false
false
false
0
dark_average (uint8_t * data, unsigned int pixels, unsigned int lines, unsigned int channels, unsigned int black) { unsigned int i, j, k, average, count; unsigned int avg[3]; uint8_t val; /* computes average value on black margin */ for (k = 0; k < channels; k++) { avg[k] = 0; count = ...
false
false
false
false
false
0
HTS_ModelSet_get_gv(HTS_ModelSet * ms, size_t stream_index, const char *string, const double *iw, double *mean, double *vari) { size_t i; size_t len = ms->stream[0][stream_index].vector_length; for (i = 0; i < len; i++) { mean[i] = 0.0; vari[i] = 0.0; } for (i = 0; i < ms->num_voices; i++) ...
false
false
false
false
false
0
_gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext, const gnutls_datum_t * ciphertext, bigint_t * params, unsigned params_len, unsigned btype) { unsigned int k, i; int ret; size_t esize, mod_bits; gnutls_pk_params_st pk_params; ...
false
false
false
false
false
0
create_mtx_files_F(int const scfIter) { do_output(LOG_CAT_INFO, LOG_AREA_SCF, "Creating mtx files for Fock matrices"); { // alpha std::stringstream ss_fileName; ss_fileName << "F_matrix_alpha_" << scfIter; std::stringstream ss_id; ss_id << scfopts.calculation_identifier << " - effective Hamiltonian ...
false
false
false
false
false
0
gf_odf_avc_cfg_write(GF_AVCConfig *cfg, char **outData, u32 *outSize) { u32 i, count; GF_BitStream *bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE); gf_bs_write_int(bs, cfg->configurationVersion, 8); gf_bs_write_int(bs, cfg->AVCProfileIndication , 8); gf_bs_write_int(bs, cfg->profile_compatibility, 8); gf_bs_write_in...
false
false
false
false
false
0
createRectangle() { int i; int ipt = 0; int nSide = nPts / 4; if (nSide < 1) nSide = 1; std::auto_ptr<Envelope> env ( dim.getEnvelope() ); double XsegLen = env->getWidth() / nSide; double YsegLen = env->getHeight() / nSide; vector<Coordinate> *vc = new vector<Coordinate>(4*nSide+1); //CoordinateSequence* pts=...
false
false
false
false
false
0
setPhysRegsDeadExcept(const SmallVectorImpl<unsigned> &UsedRegs, const TargetRegisterInfo &TRI) { for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { MachineOperand &MO = getOperand(i); if (!MO.isReg() || !MO.isDef()) continue; unsigned Reg = MO.getReg(); ...
false
false
false
false
false
0
fso_gsm_plus_ctfr_issue (FsoGsmPlusCTFR* self, const gchar* number, gint number_type) { gchar* result = NULL; gint _tmp0_ = 0; const gchar* _tmp4_ = NULL; const gchar* _tmp5_ = NULL; gint _tmp6_ = 0; gchar* _tmp7_ = NULL; gchar* _tmp8_ = NULL; gchar* _tmp9_ = NULL; gchar* _tmp10_ = NULL; g_return_val_if_fail ...
false
false
false
false
false
0
input_pad_gtk_window_set_show_layout (InputPadGtkWindow *window, InputPadWindowShowLayoutType type) { g_return_if_fail (window && INPUT_PAD_IS_GTK_WINDOW (window)); g_return_if_fail (window->priv != NULL); switch (type) { case INPUT_PAD_WINDOW_SHOW_LAYOUT_TYPE_NOTH...
false
false
false
false
false
0
ensure_service_names (adcli_result res, adcli_enroll *enroll) { int length = 0; if (res != ADCLI_SUCCESS) return res; if (enroll->service_names) return ADCLI_SUCCESS; /* The default ones specified by MS */ enroll->service_names = _adcli_strv_add (enroll->service_names, ...
false
false
false
false
false
0
free_menu(MENU * menu) { T((T_CALLED("free_menu(%p)"), menu)); if (!menu) RETURN(E_BAD_ARGUMENT); if (menu->status & _POSTED) RETURN(E_POSTED); if (menu->items) _nc_Disconnect_Items(menu); if ((menu->status & _MARK_ALLOCATED) && menu->mark) free(menu->mark); free(menu); RETURN(E_OK); }
false
false
false
false
false
0
pixel_fogofwar_hexa(const struct tile *ptile, const struct player *pplayer, bool knowledge) { bv_pixel pixel; BV_CLR_ALL(pixel); BV_SET(pixel, 0); BV_SET(pixel, 3); BV_SET(pixel, 5); BV_SET(pixel, 7); BV_SET(pixel, 9); BV_SET(...
false
false
false
false
false
0
printNodeInfo() const { for (unsigned int i = 0; i < nodeCount; ++i) { if (!nodes[i].colors) continue; INFO("RIG_Node[%%%i]($[%u]%i): %u colors, weight %f, deg %u/%u\n X", i, nodes[i].f,nodes[i].reg,nodes[i].colors, nodes[i].weight, nodes[i].degree, no...
false
false
false
false
false
0
mXactCacheGetBySet(int nmembers, MultiXactMember *members) { dlist_iter iter; debug_elog3(DEBUG2, "CacheGet: looking for %s", mxid_to_string(InvalidMultiXactId, nmembers, members)); /* sort the array so comparison is easy */ qsort(members, nmembers, sizeof(MultiXactMember), mxactMemberComparator); dlist_for...
false
false
false
false
false
0
initializing_context (tree field) { tree t = DECL_CONTEXT (field); /* Anonymous union members can be initialized in the first enclosing non-anonymous union context. */ while (t && ANON_AGGR_TYPE_P (t)) t = TYPE_CONTEXT (t); return t; }
false
false
false
false
false
0
t10_pi_generate(struct blk_integrity_iter *iter, csum_fn *fn, unsigned int type) { unsigned int i; for (i = 0 ; i < iter->data_size ; i += iter->interval) { struct t10_pi_tuple *pi = iter->prot_buf; pi->guard_tag = fn(iter->data_buf, iter->interval); pi->app_tag = 0; if (type == 1) pi->ref_tag = c...
false
false
false
false
false
0
raise_file_descriptor_limit (BusContext *context) { #ifdef DBUS_UNIX DBusError error = DBUS_ERROR_INIT; /* we only do this once */ if (context->initial_fd_limit != NULL) return; context->initial_fd_limit = _dbus_rlimit_save_fd_limit (&error); if (context->initial_fd_limit == NULL) { bus_...
false
false
false
false
false
0
soap_in_xsd__boolean(struct soap *soap, const char *tag, enum xsd__boolean *a, const char *type) { if (soap_element_begin_in(soap, tag, 0, NULL)) return NULL; if (*soap->type && soap_match_tag(soap, soap->type, type) && soap_match_tag(soap, soap->type, ":boolean")) { soap->error = SOAP_TYPE; return NULL; } a =...
false
false
false
false
false
0
_update_project_path (FrogrMainView *self, const gchar *path) { FrogrMainViewPrivate *priv = FROGR_MAIN_VIEW_GET_PRIVATE (self); /* Early return if nothing changed */ if (!g_strcmp0 (priv->project_filepath, path)) return; g_free (priv->project_name); g_free (priv->project_dir); g_free (priv->project...
false
false
false
false
true
1
findInSource( QFlags<TargetTag> tag ) { Q_UNUSED( tag ) //first show the filebrowser AmarokUrl url; url.setCommand( "navigate" ); url.setPath( "files" ); url.run(); //then navigate to the correct directory BrowserCategory * fileCategory = The::mainWin...
false
false
false
false
false
0
radeon_get_i2c_prescale(struct radeon_device *rdev) { u32 sclk = rdev->pm.current_sclk; u32 prescale = 0; u32 nm; u8 n, m, loop; int i2c_clock; switch (rdev->family) { case CHIP_R100: case CHIP_RV100: case CHIP_RS100: case CHIP_RV200: case CHIP_RS200: case CHIP_R200: case CHIP_RV250: case CHIP_RS300: ca...
false
false
false
false
false
0
ctl_readable(evContext lev, void *uap, int fd, int evmask) { static const char me[] = "ctl_readable"; struct ctl_sess *sess = uap; struct ctl_sctx *ctx; char *eos, tmp[MAX_NTOP]; ssize_t n; REQUIRE(sess != NULL); REQUIRE(fd >= 0); REQUIRE(evmask == EV_READ); REQUIRE(sess->state == reading || sess->state == re...
false
false
false
false
false
0
searchIncludesEntry(const KNS3::EntryInternal& entry) const { if (mCurrentRequest.sortMode == Updates) { if (entry.status() != Entry::Updateable) { return false; } } if (mCurrentRequest.searchTerm.isEmpty()) { return true; } QString search = mCurrentRequest.searc...
false
false
false
false
false
0
DIM_GetChannelState(struct dim_channel *ch, struct dim_ch_state_t *state_ptr) { if (!ch || !state_ptr) return NULL; state_ptr->ready = ch->state.level < 2; state_ptr->done_buffers = ch->done_sw_buffers_number; return state_ptr; }
false
false
false
false
false
0
gin_redo(XLogRecPtr lsn, XLogRecord *record) { uint8 info = record->xl_info & ~XLR_INFO_MASK; /* * GIN indexes do not require any conflict processing. */ RestoreBkpBlocks(lsn, record, false); topCtx = MemoryContextSwitchTo(opCtx); switch (info) { case XLOG_GIN_CREATE_INDEX: ginRedoCreateIndex(lsn, re...
false
false
false
false
false
0
gst_mpegvideoparse_chain (GstPad * pad, GstBuffer * buf) { MpegVideoParse *mpegvideoparse; GstFlowReturn res; gboolean discont; mpegvideoparse = GST_MPEGVIDEOPARSE (gst_object_get_parent (GST_OBJECT (pad))); discont = GST_BUFFER_IS_DISCONT (buf); if (mpegvideoparse->segment.rate > 0.0) res = gs...
false
false
false
false
false
0
prot_flush_writebuffer(struct protstream *s, const char *buf, size_t len) { int n; do { cmdtime_netstart(); #ifdef HAVE_SSL if (s->tls_conn != NULL) { n = SSL_write(s->tls_conn, (char *)buf, len); } else { n = write(s->fd, buf, len); } #else /* HAVE_SSL */ n = write(s->fd, buf, len);...
false
false
false
false
false
0
cvt_l(SprintfState *ss, long num, int width, int prec, int radix, int type, int flags, const char *hexp) { char cvtbuf[100]; char *cvt; int digits; /* according to the man page this needs to happen */ if ((prec == 0) && (num == 0)) { return 0; } /* ** Convertin...
false
false
false
false
false
0
auth_client_setup (const char *mount, client_t *client) { /* This will look something like "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" */ const char *header = httpp_getvar(client->parser, "authorization"); char *userpass, *tmp; char *username, *password; auth_client *auth_user; do { if (he...
false
false
false
false
false
0
pdc_desc_put(struct pch_dma_chan *pd_chan, struct pch_dma_desc *desc) { if (desc) { spin_lock(&pd_chan->lock); list_splice_init(&desc->tx_list, &pd_chan->free_list); list_add(&desc->desc_node, &pd_chan->free_list); spin_unlock(&pd_chan->lock); } }
false
false
false
false
false
0
SolveP5_1(double a,double b,double c,double d,double e) // return real root of x^5 + a*x^4 + b*x^3 + c*x^2 + d*x + e = 0 { int cnt; if( fabs(e)<eps ) return 0; double brd = fabs(a); // brd - border of real roots if( fabs(b)>brd ) brd = fabs(b); if( fabs(c)>brd ) brd = fabs(c); if( fabs(d)>brd ) brd = fabs(d);...
false
false
false
false
false
0
message_template_parse_emailbody(const char *configuration) { char *tmpread, *tmpwrite; char *emailbody = ast_strdup(configuration); /* substitute strings \t and \n into the apropriate characters */ tmpread = tmpwrite = emailbody; while ((tmpwrite = strchr(tmpread,'\\'))) { int len = strlen("\n"); ...
false
false
false
false
false
0
mh_mailstorage_get_folder_session(struct mailstorage * storage, char * pathname, mailsession ** result) { int r; r = mailsession_select_folder(storage->sto_session, pathname); if (r != MAIL_NO_ERROR) return r; * result = storage->sto_session; return MAIL_NO_ERROR; }
false
false
false
false
false
0
ibmasm_init_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb) { init_waitqueue_head(&rhb->wait); rhb->stopped = 0; }
false
false
false
false
false
0
highlight_selected(GooCanvasItem * button) { if (selected_button != NULL && selected_button != button) { g_object_set(selected_button, "svg-id", "#BUTTON_TEXT", NULL); } if (selected_button != button) { g_object_set(button, "svg-id", "#BUTTON_TEXT_SELECTED", NULL); ...
false
false
false
false
false
0
mei_me_pg_unset(struct mei_device *dev) { struct mei_me_hw *hw = to_me_hw(dev); u32 reg; reg = mei_me_reg_read(hw, H_HPG_CSR); trace_mei_reg_read(dev->dev, "H_HPG_CSR", H_HPG_CSR, reg); WARN(!(reg & H_HPG_CSR_PGI), "PGI is not set\n"); reg |= H_HPG_CSR_PGIHEXR; trace_mei_reg_write(dev->dev, "H_HPG_CSR", H_HP...
false
false
false
false
false
0
eventFilter( QObject *o, QEvent *e ) { Q_UNUSED(o); // o is m_widget or its viewport //Q_ASSERT( o == m_widget ); switch ( e->type() ) { case QEvent::Leave: case QEvent::FocusOut: case QEvent::WindowDeactivate: unhideCursor(); break; case QEvent::KeyPress: case Q...
false
false
false
false
false
0
zx_DEC_ELEM_sa11_Evidence(struct zx_ctx* c, struct zx_sa11_Evidence_s* x) { struct zx_elem_s* el = x->gg.kids; switch (el->g.tok) { case zx_sa11_AssertionIDReference_ELEM: if (!x->AssertionIDReference) x->AssertionIDReference = el; return 1; case zx_sa11_Assertion_ELEM: if (!x->Assertion) ...
false
false
false
false
false
0
record_bullets() { bullets.clear(); *(short *)bullets.reserve(sizeof(short)) = bullet_array.size(); for( short bulletRecno = 1; bulletRecno <= bullet_array.size(); ++bulletRecno) { CRC_TYPE checkNum = 0; if( !bullet_array.is_deleted(bulletRecno) ) checkNum = bullet_array[bulletRecno]->crc8(); *(CRC_TYPE *...
false
false
false
false
false
0
IsBKGFile(FileHelper * fh) { fhReset(fh); fhSkipWS(fh); if (fhReadString(fh, "Black")) return TRUE; fhReset(fh); fhSkipWS(fh); if (fhReadString(fh, "White")) return TRUE; return FALSE; }
false
false
false
false
false
0
mpris2_controller_determine_play_state (Mpris2Controller* self, const gchar* status) { TransportState result = 0; gboolean _tmp0_ = FALSE; const gchar* _tmp1_ = NULL; gboolean _tmp3_ = FALSE; g_return_val_if_fail (self != NULL, 0); _tmp1_ = status; if (_tmp1_ != NULL) { const gchar* _tmp2_ = NULL; _tmp2_ = s...
false
false
false
false
false
0
bytes_write_java( struct SResource *res, UErrorCode *status) { const char* type = "new byte[] {"; const char* byteDecl = "%i, "; char byteBuffer[100] = { 0 }; uint8_t* byteArray = NULL; int byteIterator = 0; int32_t srcLen=res->u.fBinaryValue.fLength; if(srcLen>0 ) { byteArray = res->u...
false
false
false
false
false
0
get_object_address( zword_t obj ) { int offset; /* Address calculation is object table base + size of default properties area + * object number-1 * object size */ if ( h_type < V4 ) offset = h_objects_offset + ( ( P3_MAX_PROPERTIES - 1 ) * 2 ) + ( ( obj - 1 ) * O3_SIZE ); else offset = h_o...
false
false
false
false
false
0
FuncIO_send(Obj self,Obj fd,Obj st,Obj offset,Obj count,Obj flags) { Int bytes; if (!IS_INTOBJ(fd) || !IS_STRING(st) || !IS_STRING_REP(st) || !IS_INTOBJ(offset) || !IS_INTOBJ(count) || !IS_INTOBJ(flags)) { SyClearErrorNo(); return Fail; } if (GET_LEN_STRING(st) < INT_INTOBJ(offset)+INT_INTOBJ...
false
false
false
false
false
0
lua_pushlstring (lua_State *L, const char *s, size_t len) { tsvalue(L->top) = luaS_newlstr(L, s, len); ttype(L->top) = LUA_TSTRING; api_incr_top(L); }
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__gfx3D__Object_InsideFrustum(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gfx3D__Plane * planes) { struct __ecereNameSpace__ecere__gfx3D__Object * __ecerePointer___ecereNameSpace__ecere__gfx3D__Object = (struct __ecereNameSpace__ecere__gfx3D...
false
false
false
true
false
1
ddf_MatrixNormalizedSortedCopy(ddf_MatrixPtr M,ddf_rowindex *newpos) /* 094 */ { /* Sort the rows of Amatrix lexicographically, and return a link to this sorted copy. The vector newpos is allocated, where newpos[i] returns the new row index of the original row i (i=1,...,M->rowsize). */ ddf_MatrixPtr Mcopy=N...
false
false
false
false
false
0
cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc) { if (ioc) return icq_to_cic(ioc_lookup_icq(ioc, cfqd->queue)); return NULL; }
false
false
false
false
false
0
getp_to_byte_array(VMG_ vm_val_t *retval, const vm_val_t *self_val, const char *str, uint *argc) { static CVmNativeCodeDesc desc(1); size_t len; CCharmapToLocal *mapper; vm_val_t *arg; size_t byte_len; size_t src_...
false
false
false
false
false
0
dns_set_async_mode(int myval,CDNSCLIENT *mythis) { int dpipe[2]; if (myval && (dns_r_pipe==-1)) { if (pipe(dpipe)) return 1; dns_r_pipe=dpipe[0]; dns_w_pipe=dpipe[1]; sem_init(&dns_th_pipe,0,1); GB.Watch(dns_r_pipe , GB_WATCH_READ , (void *)dns_callback,0); } mythis->iAsync=myval; return 0; }
false
false
false
false
false
0
diff(const RCP<const Symbol> &x) const { return mul(mul(tan(get_arg()), sec(get_arg())), get_arg()->diff(x)); }
false
false
false
false
false
0
hawki_dfs_set_groups(cpl_frameset * set) { cpl_frame * cur_frame ; const char * tag ; int nframes ; int i ; /* Check entries */ if (set == NULL) return -1 ; /* Initialize */ nframes = cpl_frameset_get_size(set) ; /* Loop on frames */ for (i=0 ; i...
false
false
false
false
false
0
cam_keypoints_tracking2_add_to_linked_list(CamList *l, void *data) { CamList *head; head = (CamList*)malloc(sizeof(CamList)); head->data = data; head->next = l; if (l) head->index = l->index + 1; else head->index = 1; return (head); }
false
false
false
false
false
0
Stream_nextLine(Stream * stream) { String * line; char currentChar; if(stream == NULL || !stream->canRead) return NULL; line = String_createEmpty(); currentChar = fgetc(stream->stream); if(currentChar == EOF) { String_destroy(line); return NULL; } if(currentChar == '\n') { return line; } Strin...
false
false
false
false
false
0
il4965_rs_tl_rm_old_stats(struct il_traffic_load *tl, u32 curr_time) { /* The oldest age we want to keep */ u32 oldest_time = curr_time - TID_MAX_TIME_DIFF; while (tl->queue_count && tl->time_stamp < oldest_time) { tl->total -= tl->packet_count[tl->head]; tl->packet_count[tl->head] = 0; tl->time_stamp += TID_...
false
false
false
false
false
0
SetCatPrio(uint8 cat, uint8 newprio) { for ( uint16 i = 0; i < GetFileCount(); i++ ) { CPartFile* file = GetFileByIndex( i ); if ( !cat || file->GetCategory() == cat ) { if ( newprio == PR_AUTO ) { file->SetAutoDownPriority(true); } else { file->SetAutoDownPriority(false); file->SetDownPriorit...
false
false
false
false
false
0
stk_sensor_init(struct stk_camera *dev) { u8 idl = 0; u8 idh = 0; if (stk_camera_write_reg(dev, STK_IIC_ENABLE, STK_IIC_ENABLE_YES) || stk_camera_write_reg(dev, STK_IIC_ADDR, SENSOR_ADDRESS) || stk_sensor_outb(dev, REG_COM7, COM7_RESET)) { STK_ERROR("Sensor resetting failed\n"); return -ENODEV; } msleep(1...
false
false
false
false
false
0
show_help(void) #else void show_help() #endif { long long i; if(!silent) printf("iozone: help mode\n\n"); for(i=0; strlen(help[i]); i++) { if(!silent) printf("%s\n", help[i]); } }
false
false
false
false
false
0
setPosition(qint64 position) { Q_D(QMediaPlayer); if (d->control == 0 || !isSeekable()) return; d->control->setPosition(qBound(qint64(0), position, duration())); }
false
false
false
false
false
0
tail_lines (const char *pretty_filename, int fd, uintmax_t n_lines, uintmax_t *read_pos) { struct stat stats; if (fstat (fd, &stats)) { error (0, errno, _("cannot fstat %s"), quote (pretty_filename)); return false; } if (from_start) { int t = start_lines (pretty_filenam...
false
false
false
false
false
0
qlcnic_83xx_check_vf(struct qlcnic_adapter *adapter, const struct pci_device_id *ent) { u32 op_mode, priv_level; struct qlcnic_hardware_context *ahw = adapter->ahw; ahw->fw_hal_version = 2; qlcnic_get_func_no(adapter); if (qlcnic_sriov_vf_check(adapter)) { qlcnic_sriov_vf_set_ops(adapter); return; } ...
false
false
false
false
false
0
handle_tags_and_duplicates(struct string_list *extra_refs) { struct commit *commit; int i; for (i = extra_refs->nr - 1; i >= 0; i--) { const char *name = extra_refs->items[i].string; struct object *object = extra_refs->items[i].util; switch (object->type) { case OBJ_TAG: handle_tag(name, (struct tag *)ob...
false
false
false
false
false
0
GetComboCommandId(CommandId cmin, CommandId cmax) { CommandId combocid; ComboCidKeyData key; ComboCidEntry entry; bool found; /* * Create the hash table and array the first time we need to use combo * cids in the transaction. */ if (comboHash == NULL) { HASHCTL hash_ctl; memset(&hash_ctl, 0, sizeof...
false
false
false
false
false
0
eb_load_catalog(EB_Book *book) { EB_Error_Code error_code; char catalog_file_name[EB_MAX_FILE_NAME_LENGTH + 1]; char catalog_path_name[EB_MAX_PATH_LENGTH + 1]; LOG(("in: eb_load_catalog(book=%d)", (int)book->code)); /* * Find a catalog file. */ if (eb_find_file_name(book->path, "cata...
false
false
false
false
false
0
fortyl_plot_pix(int offset) { int x,y,i,c,d1,d2; x = (offset & 0x1f)*8; y = (offset >> 5) & 0xff; if (pixram_sel) { d1 = fortyl_pixram2[offset]; d2 = fortyl_pixram2[offset + 0x2000]; } else { d1 = fortyl_pixram1[offset]; d2 = fortyl_pixram1[offset + 0x2000]; } for (i=0;i<8;i++) ...
false
false
false
false
false
0
close_console_window(void) { pid_t pid = fork(); if (pid < 0) { return RC_OS_FORK_FAILURE; } if (pid == 0) /* child */ { fclose(stdin); fclose(stderr); setsid(); if (-1 == chdir("/")) { logit(LOG_WARNING, MODULE_TAG "Failed changing cwd to /: %s", strerror(errno)); } umask(0); ret...
false
false
false
false
true
1
libpqrcv_connect(char *conninfo, XLogRecPtr startpoint) { char conninfo_repl[MAXCONNINFO + 37]; char *primary_sysid; char standby_sysid[32]; TimeLineID primary_tli; TimeLineID standby_tli; PGresult *res; char cmd[64]; /* * Connect using deliberately undocumented parameter: replication. The * databa...
false
false
false
false
false
0
gf100_fifo_runlist_update(struct gf100_fifo *fifo) { struct gf100_fifo_chan *chan; struct nvkm_subdev *subdev = &fifo->base.engine.subdev; struct nvkm_device *device = subdev->device; struct nvkm_memory *cur; int nr = 0; mutex_lock(&subdev->mutex); cur = fifo->runlist.mem[fifo->runlist.active]; fifo->runlist.a...
false
false
false
false
false
0
e1000_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats __always_unused *stats, u64 *data) { struct e1000_adapter *adapter = netdev_priv(netdev); struct rtnl_link_stats64 net_stats; int i; char *p = NULL; pm_runtime_get_sync(netdev->dev.parent); e1000e_get_stats64(netdev, &net_st...
false
false
false
false
false
0
mapvue_read_group551(const guchar *p, gsize size, gpointer grpdata, GError **error) { enum { SIZE = 3*4 }; MapVueGroup551 *group = (MapVueGroup551*)grpdata; if (err_TAG_SIZE(error, group->reftag, SIZE, size)) return 0; group->magnification = gwy_get_gfloat_le(&p); grou...
false
false
false
false
false
0
Endian_U32(uint32_g x) { if (cpu_big_endian) return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24); else return x; } }
false
false
false
false
false
0
netsnmp_access_tcpconn_container_init(u_int flags) { netsnmp_container *container1; DEBUGMSGTL(("access:tcpconn:container", "init\n")); /* * create the container */ container1 = netsnmp_container_find("access:tcpconn:table_container"); if (NULL == container1) { snmp_log(LOG_ERR, ...
false
false
false
false
false
0
BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; uint8 *srcp; uint8 *dstp; for (y = 0; y < nHeight; y++) { srcp = gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest +...
false
false
false
false
false
0
marker_inode_ctx_new () { marker_inode_ctx_t *ctx = NULL; ctx = GF_CALLOC (1, sizeof (marker_inode_ctx_t), gf_marker_mt_marker_inode_ctx_t); if (ctx == NULL) goto out; ctx->quota_ctx = NULL; out: return ctx; }
false
false
false
false
false
0
queueLoad() { if ( ! _onLoadCalled ) { _onLoadCalled = true; // We don't call onLoad for _root up to SWF5 if ( ! parent() && getSWFVersion(*getObject(this)) < 6 ) return; queueEvent(event_id(event_id::LOAD), movie_root::PRIORITY_DOACTION); } }
false
false
false
false
false
0
GetOption(const wxString& name, float *value, int count, const wxString& delims) const { double *nums = (double*)malloc(sizeof(double)*count); if (GetOption(name, nums, count, delims)) { for (int i=0; i < count; i++) value[i] = (float)nums[i]; free(nums); ...
false
false
false
false
false
0
PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os,indent); if ( this->Input ) { os << indent << "Input: (" << this->Input << ")\n"; } else { os << indent << "Input: (none)\n"; } std::map<int, vtkSmartPointer<vtkTextProperty> >::iterator it, itEnd; it = this->I...
false
false
false
false
false
0
DecryptBlock(uint32_t *left, uint32_t *right) const { for (int i = 0; i < 16; ++i) { *left ^= pary_[17 - i]; *right ^= Feistel(*left); std::swap(*left, *right); } std::swap(*left, *right); *right ^= pary_[1]; *left ^= pary_[0]; }
false
false
false
false
false
0
insertDescriptor(VimosDescriptor **desc, const char *name, VimosDescriptor *newDesc, int before) { VimosDescriptor *tDesc; const char modName[] = "insertDescriptor"; if ( desc == NULL) return VM_FALSE; if (*desc == NULL) return VM_FALSE; if ( newDesc == NULL) return VM_FALSE;...
false
false
false
false
false
0
createX86_32AsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TheTriple, StringRef CPU) { if (TheTriple.isOSBinFormatMachO()) return new DarwinX86_32AsmBackend(T, MRI...
false
false
false
false
false
0
want_to_remat (rtx x) { int num_clobbers = 0; int icode; /* If this is a valid operand, we are OK. If it's VOIDmode, we aren't. */ if (general_operand (x, GET_MODE (x))) return 1; /* Otherwise, check if we can make a valid insn from it. First initialize our test insn if we haven't already. */ ...
false
false
false
false
false
0
pdf_set_int(pdf_obj *obj, int i) { if (!obj || obj->kind != PDF_INT) return; obj->u.i = i; }
false
false
false
false
false
0
show_all_header_cb(GtkAction *action, gpointer data) { MainWindow *mainwin = (MainWindow *)data; if (mainwin->menu_lock_count) return; prefs_common.show_all_headers = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); summary_display_msg_selected(mainwin->summaryview, gtk_toggle_action_get_acti...
false
false
false
false
false
0
generate(long long size_in_bytes) { // How many blocks are there total in the file? unsigned long long size_in_blocks = size_in_bytes/opts->block_size; if (size_in_blocks*opts->block_size < size_in_bytes) size_in_blocks++; // How many blocks will we be reading? sample_size = opts->block_c...
false
false
false
false
false
0
oidvectorin(PG_FUNCTION_ARGS) { char *oidString = PG_GETARG_CSTRING(0); oidvector *result; int n; result = (oidvector *) palloc0(OidVectorSize(FUNC_MAX_ARGS)); for (n = 0; n < FUNC_MAX_ARGS; n++) { while (*oidString && isspace((unsigned char) *oidString)) oidString++; if (*oidString == '\0') bre...
false
false
false
false
true
1
khazad_crypt(uint8_t p_block[KHAZAD_BLOCK_SIZE], const uint8_t p_key_schedule[KHAZAD_KEY_SCHEDULE_SIZE]) { uint_fast8_t round; add_block(p_block, p_key_schedule); p_key_schedule += KHAZAD_BLOCK_SIZE; for (round = 0; round < (KHAZAD_NUM_ROUNDS - 1u); ++round) { round_func(p_block, p_key_s...
false
false
false
false
false
0
comparebv(const Expr& e1, const Expr& e2) { int size = BVSize(e1); FatalAssert(size == BVSize(e2), "expected same size"); Theorem c1, c2; int idx1 = -1; vector<Theorem> thms1; if (d_bb_index == 0) { Expr splitter = e1.eqExpr(e2); Theorem thm = simplify(splitter); if (!thm.getRHS().isBoolConst()...
false
false
false
false
false
0
_unique_window_input_channel_listener( const void *msg_data, void *ctx ) { const UniqueInputEvent *event = msg_data; UniqueWindow *window = ctx; D_MAGIC_ASSERT( window, UniqueWindow ); D_ASSERT( event != NULL ); D_DEBUG_AT( UniQuE_Windo...
false
false
false
false
false
0
rj54n1_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *format) { struct v4l2_mbus_framefmt *mf = &format->format; struct i2c_client *client = v4l2_get_subdevdata(sd); struct rj54n1 *rj54n1 = to_rj54n1(client); if (format->pad) return -EINVAL; mf->code = rj54n1...
false
false
false
false
false
0
turn_error(XMPP::TurnClient::Error e) { if(debugLevel >= IceTransport::DL_Info) emit q->debugLine(QString("turn_error: ") + turn.errorString()); turnErrorCode = e; emit q->error(IceTurnTransport::ErrorTurn); }
false
false
false
false
false
0
ipw_write_reg16(struct ipw_priv *a, u32 b, u16 c) { IPW_DEBUG_IO("%s %d: write_indirect16(0x%08X, 0x%08X)\n", __FILE__, __LINE__, (u32) (b), (u32) (c)); _ipw_write_reg16(a, b, c); }
false
false
false
false
false
0
_mhBuildResponse(mhResponse_t *resp) { int i; if (resp->built == YES) return; resp->built = YES; for (i = 0 ; i < resp->builders->nelts; i++) { mhResponseBldr_t *rb; rb = APR_ARRAY_IDX(resp->builders, i, mhResponseBldr_t *); rb->respbuilder(rb, resp); } }
false
false
false
false
false
0
notes_close() { p_tcl_bind_list H_temp; rem_tcl_ints(notes_ints); rem_tcl_strings(notes_strings); rem_tcl_commands(notes_tcls); if ((H_temp = find_bind_table("msg"))) rem_builtins(H_temp, notes_msgs); if ((H_temp = find_bind_table("join"))) rem_builtins(H_temp, notes_join); rem_builtins(H_dcc, no...
false
false
false
false
false
0
ODS_update_entry(void) { char buf[BUFFER_SIZE+1]; int response; buf[BUFFER_SIZE] = '\0'; if(do_connect((int*)&client_sockfd, server, port) != 0) { if(!(options & OPT_QUIET)) { show_message("error connecting to %s:%s\n", server, port); } return(UPDATERES_ERROR); } /* read server me...
true
true
false
false
false
1
id_to_sid(unsigned int cid, uint sidtype, struct cifs_sid *ssid) { int rc; struct key *sidkey; struct cifs_sid *ksid; unsigned int ksid_size; char desc[3 + 10 + 1]; /* 3 byte prefix + 10 bytes for value + NULL */ const struct cred *saved_cred; rc = snprintf(desc, sizeof(desc), "%ci:%u", sidtype == SIDOWNER ?...
false
false
false
false
false
0
CreateConnection(const QSharedPointer<Edge> &pedge, const Id &rem_id) { QSharedPointer<Connection> con(new Connection(pedge, _local_id, rem_id), &QObject::deleteLater); con->SetSharedPointer(con); _con_tab.AddConnection(con); qDebug() << "Handle new connection:" << con->ToString(); ...
false
false
false
false
false
0
FileAppender(const tstring& filename_, STD_NAMESPACE ios_base::openmode mode_, bool immediateFlush_) : immediateFlush(immediateFlush_) , reopenDelay(1) , bufferSize (0) , buffer (0) , out () , filename () , localeName (DCMTK_LOG4CPLUS_TEXT ("DEFAULT")) , reopen_time () { init(fi...
false
false
false
false
false
0
__nss_cdb_dobyid(struct nss_cdb *dbp, unsigned long id, void *result, char *buf, size_t bufl, int *errnop) { int r; unsigned len; const char *data; if ((r = cdb_find(&dbp->cdb, buf, sprintf(buf, ":%lu", id))) < 0) return *errnop = errno, NSS_STATUS_UNAVAIL; len = cdb_datalen(&dbp->cdb); ...
false
false
false
false
false
0