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
setUpdateInterval(int msec) { int interval = msec; if (interval != 0) interval = qMax(msec, minimumUpdateInterval()); QGeoPositionInfoSource::setUpdateInterval(interval); if (d->m_invokedStart) { d->stopUpdates(); d->startUpdates(); } }
false
false
false
false
false
0
sig_all_catch(signalfn fn) { int i; for (i = 1; i < SIGMAX; i++) if (i != SIGPROF || i != SIGSEGV) sig_catch(i, fn); }
false
false
false
false
false
0
OnCloseEvent(AsyncSocket * socket, int error) { LOG(LS_VERBOSE) << "AutoDetectProxy closed with error: " << error; ++next_; Next(); }
false
false
false
false
false
0
ctcp_queue_clean(IRC_SERVER_REC *server) { GSList *tmp, *next; for (tmp = server->ctcpqueue; tmp != NULL; tmp = next) { next = tmp->next; if (!server_idle_find(server, GPOINTER_TO_INT(tmp->data))) { server->ctcpqueue = g_slist_remove(server->ctcpqueue, tmp->data); } } }
false
false
false
false
false
0
toSymbol (void) { if (!csym) { csym = toSymbolX ("__ModuleInfo", 0, 0, "Z"); tree decl = build_decl (BUILTINS_LOCATION, VAR_DECL, get_identifier (csym->prettyIdent), d_unknown_type_node); SET_DECL_ASSEMBLER_NAME (decl, get_identifier (csym->Sident)); csym->Stree = decl; d_k...
false
false
false
false
false
0
LtFSave(LtLight *l, FILE *f, Pool *p) { PoolFPrint(p, f, "ambient %f %f %f\n", l->ambient.r, l->ambient.g, l->ambient.b); PoolFPrint(p, f, "color %f %f %f\n", l->intensity*l->color.r, l->intensity*l->color.g, l->intensity*l->color.b); PoolFPrint(p, f, "position %f %f %f %f\n", l->position.x, l->posi...
false
false
false
false
false
0
handle_jar(const char *arg) { operation = OPERATION_JAR_FILE; /* Can't specify more than one jar file */ if (jar_file) usage(stderr, EXIT_FAILURE); jar_file = vm_jar_open(arg); if (!jar_file) { fprintf(stdout, "Unable to open JAR file %s\n", arg); exit(EXIT_FAILURE); } const char *main_class = vm_jar_ge...
false
false
false
false
false
0
setOptimum(uint32 lev, wsum_t opt) { if (lev >= rhs_.size()) { rhs_.resize(lev+1, std::numeric_limits<wsum_t>::max()); } rhs_[lev] = opt; return *this; }
false
false
false
false
false
0
flat() { // Use external random number generator if such has been linked. if (useExternalRndm) return rndmEngPtr->flat(); // Ensure that already initialized. if (!initRndm) init(DEFAULTSEED); // Find next random number and update saved state. ++sequence; double uni; do { uni = u[i97] - u[j97]...
false
false
false
false
false
0
surfaceExtract(seekContext *sctx, limnPolyData *lpld) { static const char me[]="surfaceExtract"; char done[AIR_STRLEN_SMALL]; unsigned int zi, sz; baggage *bag; bag = baggageNew(sctx); sz = AIR_CAST(unsigned int, sctx->sz); /* this creates the airArrays in bag */ if (outputInit(sctx, bag, lpld)) { ...
false
false
false
false
false
0
goom_random_update_array (GoomRandom * grandom, int numberOfValuesToChange) { while (numberOfValuesToChange > 0) { #if RAND_MAX < 0x10000 grandom->array[grandom->pos++] = ((rand () << 16) + rand ()) / 127; #else grandom->array[grandom->pos++] = rand () / 127; #endif numberOfValuesToChange--; } }
false
false
false
false
false
0
UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2) { unsigned int value2 = op2->ui; exp->type = 2; exp->string = PrintUInt64(op1->ui = value2); if(!exp->expType) { exp->expType = op1->type; if(op1->type) op1->type->refCount++; } return 0x1; }
false
false
false
false
false
0
find_cip(DIVA_CAPI_ADAPTER *a, byte *bc, byte *hlc) { word i; word j; for (i = 9; i && !ie_compare(bc, cip_bc[i][a->u_law]); i--); for (j = 16; j < 29 && (!ie_compare(bc, cip_bc[j][a->u_law]) || !ie_compare(hlc, cip_hlc[j])); j++); if (j == 29) return i; return j; }
false
false
false
false
false
0
filterbank_new(int banks, spx_word32_t sampling, int len, int type) { FilterBank *bank; spx_word32_t df; spx_word32_t max_mel, mel_interval; int i; int id1; int id2; df = DIV32(SHL32(sampling,15),MULT16_16(2,len)); max_mel = toBARK(EXTRACT16(sampling/2)); mel_interval = PDIV32(max_mel,banks-1...
false
false
false
false
false
0
rtp_source_finalize (GObject * object) { RTPSource *src; GstBuffer *buffer; src = RTP_SOURCE_CAST (object); while ((buffer = g_queue_pop_head (src->packets))) gst_buffer_unref (buffer); g_queue_free (src->packets); gst_structure_free (src->sdes); g_free (src->bye_reason); gst_caps_replace (&src...
false
false
false
false
false
0
random_chunk_digest(unsigned char *digest) { int i, chunk_data[INT_CHUNK_SIZE] = {0}; for (i = 0; i < INT_CHUNK_SIZE; i ++) chunk_data[i] = rand(); return write_chunk((void *)chunk_data, digest); }
false
false
false
false
false
0
flickcurl_prepare_common(flickcurl *fc, const char* service_uri, const char* method, const char* upload_field, const char* upload_value, int parameters_in_url, int need_auth) { int rc = 1; ...
false
false
false
false
false
0
dumpall(struct filenode *node, int lastoff, FILE *f) { struct romfh ri; struct filenode *p; ri.nextfh = htonl(0x2d726f6d); ri.spec = htonl(0x3166732d); ri.size = htonl(lastoff); ri.checksum = htonl(0x55555555); dumpri(&ri, node, f); p = node->dirlist.head; while (p->next) { dumpnode(p, f); p = p->next; }...
false
false
false
false
false
0
sober128_read(unsigned char *out, unsigned long outlen, prng_state *prng) { struct sober128_prng *c; ulong32 t, tlen; LTC_ARGCHK(out != NULL); LTC_ARGCHK(prng != NULL); #ifdef LTC_VALGRIND zeromem(out, outlen); #endif c = &(prng->sober128); t = 0; tlen = outlen; /* handle a...
false
false
false
false
false
0
WriteGeometryFile(FILE *geomFile, int numPts) { int numPolys, numEdges; int i; double *x; vtkIdType npts = 0; vtkIdType *pts = 0; vtkPoints *inPts; vtkCellArray *inPolys; vtkPolyData *input= this->GetInput(); // // Check input // inPolys=input->GetPolys(); if ( (inPts=input->GetPoints()) == NU...
false
false
false
false
false
0
near_point(point_t p, polygon_t *polygon, point_t *ret) /* Computes the near point of a point contained in a polygon ** Parameters: (point_t) p: The point ** (polygon_t *) polygon: The polygon ** Returns : (int) PF_OK on success, PF_FATAL otherwise ** (point_t) *ret: The near point of p in pol...
false
false
false
false
false
0
get_local_orbital_type(gchar *fileName) { gchar *t; FILE *file; if ((!fileName) || (strcmp(fileName,"") == 0)) return GABEDIT_ORBLOCALTYPE_UNKNOWN; t=g_malloc(BSIZE); file = FOpen(fileName, "rb"); if(file ==NULL) return GABEDIT_ORBLOCALTYPE_UNKNOWN; while(!feof(file)) { GabEditOrbLocalType i; ...
false
false
false
false
false
0
cache_get_contacts (EBookBackend *backend, GQueue *out_contacts) { EBookBackendGooglePrivate *priv; GList *list, *link; priv = E_BOOK_BACKEND_GOOGLE_GET_PRIVATE (backend); g_mutex_lock (&priv->cache_lock); list = e_book_backend_cache_get_contacts ( priv->cache, "(contains \"x-evolution-any-...
false
false
false
false
false
0
glibtop_call_l (glibtop *server, unsigned command, size_t send_size, const void *send_buf, size_t recv_size, void *recv_buf) { glibtop_command cmnd = {0}; glibtop_response response = {0}; glibtop_init_r (&server, 0, 0); cmnd.command = command; /* If send_size is less than _GLIBTOP_PARAM_SIZE (normally 16 Byte...
false
true
false
false
false
1
pconnPop(const char *host, u_short port, const char *domain, struct in_addr *client_address, u_short client_port, int *idle) { struct _pconn *p; hash_link *hptr; int fd = -1; assert(table != NULL); hptr = pconnLookup(host, port, domain, client_address, client_port); if (hptr != NULL) { p = (str...
false
false
false
false
false
0
_wrap_goo_canvas_points_new(PyGBoxed *self, PyObject *args, PyObject *kwargs) { static char *kwlist[] = { "data", NULL }; PyObject *py_data; gint i, n_data; GooCanvasPoints *points; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GooCanvasPoints.__init__", ...
false
false
false
false
false
0
agpioc_deallocate_wrap(struct agp_file_private *priv, int arg) { struct agp_memory *memory; DBG(""); memory = agp_find_mem_by_key(arg); if (memory == NULL) return -EINVAL; agp_free_memory_wrap(memory); return 0; }
false
false
false
false
false
0
free_pattern_tree(struct eb_root *root) { struct eb_node *node, *next; struct pattern_tree *elt; node = eb_first(root); while (node) { next = eb_next(node); eb_delete(node); elt = container_of(node, struct pattern_tree, node); free(elt->smp); free(elt); node = next; } }
false
false
false
false
false
0
get_authinfo(const char *server, char **username, char **password) { char *path, *line; QIOSTATE *passwords; struct cvector *info = NULL; path = concatpath(innconf->pathetc, INN_PATH_NNTPPASS); passwords = QIOopen(path); if (passwords == NULL) { if (errno != ENOENT) warn("ca...
false
false
false
false
false
0
setComponentValue(QColor &color, KColorChooserMode chooserMode, qreal value) { if (chooserMode >= ChooserRed) { if (chooserMode == ChooserRed) { color.setRedF(value); } else if (chooserMode == ChooserGreen) { color.setGreenF(value); } else { // chooserMode == ChooserB...
false
false
false
false
false
0
test_new_async (Test *test, gconstpointer unused) { const gchar *item_path = "/org/freedesktop/secrets/collection/english/1"; GAsyncResult *result = NULL; GError *error = NULL; SecretItem *item; secret_item_new_for_dbus_path (test->service, item_path, SECRET_ITEM_NONE, ...
false
false
false
false
false
0
gf_isom_set_pixel_aspect_ratio(GF_ISOFile *movie, u32 trackNumber, u32 StreamDescriptionIndex, u32 hSpacing, u32 vSpacing) { GF_Err e; GF_TrackBox *trak; GF_SampleEntryBox *entry; GF_VisualSampleEntryBox*vent; GF_SampleDescriptionBox *stsd; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; trak =...
false
false
false
false
false
0
debug_command_loop (ExecState *state, DATASET *dset, DEBUG_READLINE get_line, DEBUG_OUTPUT put_func, int *errp) { int brk = 0, err = 0; state->flags |= DEBUG_EXEC; while (!brk) { #if DDEBUG fprintf(stderr, "--- debug_command_loop calling get_line\n"); #endif *er...
false
false
false
false
false
0
mx_widget_set_style (MxStylable *stylable, MxStyle *style) { MxWidgetPrivate *priv = MX_WIDGET (stylable)->priv; if (priv->style) g_object_unref (priv->style); priv->style = g_object_ref_sink (style); mx_widget_apply_style (MX_WIDGET (stylable), style); }
false
false
false
false
false
0
rtl92ee_init_sw_vars(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); int err = 0; rtl92ee_bt_reg_init(hw); rtlpci->msi_support = rtlpriv->cfg->mod_params->msi_support; rtlpriv->btcoexist.btc_ops = rtl_btc_get_ops_pointer(); rtlpriv->dm.d...
false
false
false
false
false
0
remap_filename(struct libjte_env *o, char *filename) { char *new_name = filename; struct path_mapping *entry = o->map_list; while (entry) { if (!strncmp(filename, entry->from, strlen(entry->from))) { new_name = calloc(1, 2 + strlen(filename) + strlen(entry->to) - strlen(...
false
false
false
false
false
0
Value(const Glib::ustring &key) { iterator i = find(key); if( i == end() ) return ""; return i->second; }
false
false
false
false
false
0
initiatesSimpleConditional() const { Graph::Node *out[2]; int n; Graph::Edge::Type eR; if (cfg.outgoingCount() != 2) // -> if and -> else/endif return false; n = 0; for (Graph::EdgeIterator ei = cfg.outgoing(); !ei.end(); ei.next()) out[n++] = ei.getNode(); eR = out[1]->outgoing().get...
false
false
false
false
true
1
create_temp_file (int *pfd, bool survive_fd_exhaustion) { static char const slashbase[] = "/sortXXXXXX"; static size_t temp_dir_index; int fd; int saved_errno; char const *temp_dir = temp_dirs[temp_dir_index]; size_t len = strlen (temp_dir); struct tempnode *node = xmalloc (offsetof (struct tempnode, ...
false
false
false
false
true
1
ide_cdrom_reset(struct cdrom_device_info *cdi) { ide_drive_t *drive = cdi->handle; struct cdrom_info *cd = drive->driver_data; struct request_sense sense; struct request *rq; int ret; rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM); rq->cmd_type = REQ_TYPE_DRV_PRIV; rq->cmd_flags = REQ_QUIET; ret = bl...
false
false
false
false
false
0
XGIfb_search_mode(struct xgifb_video_info *xgifb_info, const char *name) { unsigned int xres; unsigned int yres; unsigned int bpp; int i; if (sscanf(name, "%ux%ux%u", &xres, &yres, &bpp) != 3) goto invalid_mode; if (bpp == 24) bpp = 32; /* That's for people who mix up color and fb depth. */ for (...
false
false
false
false
false
0
wb_inode_create (xlator_t *this, inode_t *inode) { wb_inode_t *wb_inode = NULL; GF_VALIDATE_OR_GOTO (this->name, inode, out); LOCK (&inode->lock); { wb_inode = __wb_inode_ctx_get (this, inode); if (!wb_inode) wb_inode = __wb_inode...
false
false
false
false
false
0
hts_close(htsFile *fp) { int ret, save; if (fp->is_bin || (fp->is_write && fp->is_compressed==1)) { ret = bgzf_close(fp->fp.bgzf); } else if (fp->is_cram) { ret = cram_close(fp->fp.cram); } else if (fp->is_kstream) { #if KS_BGZF BGZF *gzfp = ((kstream_t*)fp->fp.voidp)->f; ret = bgzf_close(gzfp); #else ...
false
false
false
false
false
0
isl_pw_qpolynomial_from_pw_aff( __isl_take isl_pw_aff *pwaff) { int i; isl_pw_qpolynomial *pwqp; if (!pwaff) return NULL; pwqp = isl_pw_qpolynomial_alloc_size(isl_pw_aff_get_space(pwaff), pwaff->n); for (i = 0; i < pwaff->n; ++i) { isl_set *dom; isl_qpolynomial *qp; dom = isl_set_copy(pwaff->p[i...
false
false
false
false
false
0
multi_voice_init() { int idx,s_idx,pre_size,pre_sound; // if the voice system is already initialized, just reset some stuff if(Multi_voice_inited){ multi_voice_reset(); return; } // set the default quality of sound Multi_voice_qos = MV_DEFAULT_QOS; // if we're the standalone server, we can't record _or_ p...
false
false
false
false
false
0
nconc(object x, object y) { object x1; if (endp(x)) return(y); for (x1 = x; !endp(x1->c.c_cdr); x1 = x1->c.c_cdr) ; x1->c.c_cdr = SAFE_CDR(y); return(x); }
false
false
false
false
false
0
write_next_chunk (GDataUploadStream *self, SoupMessage *message) { #define CHUNK_SIZE 8192 /* 8KiB */ GDataUploadStreamPrivate *priv = self->priv; gboolean has_network_bytes_outstanding, is_complete; gsize length; gboolean reached_eof = FALSE; guint8 next_buffer[CHUNK_SIZE]; g_mutex_lock (&(priv->write_mutex))...
false
false
false
false
false
0
mouse_bind(const gchar *buttonstr, ObFrameContext context, ObMouseAction mact, ObActionsAct *action) { guint state, button; ObMouseBinding *b; GSList *it; g_assert(context != OB_FRAME_CONTEXT_NONE); if (!translate_button(buttonstr, &state, &button)) { g_message(_("Inval...
false
false
false
false
false
0
rpz_ck_dnssec(ns_client_t *client, isc_result_t result, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) { dns_fixedname_t fixed; dns_name_t *found; dns_rdataset_t trdataset; dns_rdatatype_t type; if (client->view->rpz_break_dnssec) return (ISC_TRUE); /* * sigrdataset == NULL if and only !WANTDN...
false
false
false
false
false
0
gsb_fyear_hide_iter_by_name ( GtkTreeModel *model, gchar *name ) { GtkTreeIter iter; gint result; result = gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( model ), &iter ); while (result) { gchar *value; gboolean show; gtk_tree_model_get ( GTK_TREE_MODEL ( model ...
false
false
false
false
false
0
find_info(FILE* fp, char *str, char *buf, size_t buflen) { char *tmp; rewind(fp); while (NULL != fgets(buf, buflen, fp)) { if (strncmp(buf, str, strlen(str)) == 0) { /* we found the line. Now eat everything up to, including, and one past the : */ for (tmp = b...
false
false
false
false
false
0
gst_rtp_mux_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstRTPMux *rtp_mux; rtp_mux = GST_RTP_MUX (object); switch (prop_id) { case PROP_TIMESTAMP_OFFSET: rtp_mux->ts_offset = g_value_get_int (value); break; case PROP_SEQNUM_OFFSET: rt...
false
false
false
false
false
0
compare_by_full_path (NautilusFile *file_1, NautilusFile *file_2) { int compare; compare = compare_by_directory_name (file_1, file_2); if (compare != 0) { return compare; } return compare_by_display_name (file_1, file_2); }
false
false
false
false
false
0
read_parameter_file(void) { #if !defined(_WIN32) || defined(cygwin) char *name; struct passwd *pw; #endif read_parameter_file_1(PARAMETER_FILE); #if !defined(_WIN32) || defined(cygwin) pw = getpwuid(getuid()); if ( pw == NULL ) fatal("getpwuid() failed for uid: %d\n", getuid()); name = ...
false
false
false
false
false
0
CheckSetLEDSupport(struct ipmi_intf * intf) { struct ipmi_rs * rsp = NULL; struct ipmi_rq req = {0}; uint8_t data[10]; SetLEDSupported = 0; req.msg.netfn = DELL_OEM_NETFN; req.msg.lun = 0; req.msg.cmd = 0xD5; /* Storage */ req.msg.data_len = 10; req.msg.data = data; memset(data, 0, sizeof(data)); data[0] =...
false
false
false
false
false
0
_cmsOptimizePipeline(cmsContext ContextID, cmsPipeline** PtrLut, int Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFl...
false
false
false
false
false
0
OpenFiles() { int i; char filename[CF_BUFSIZE],name[CF_MAXVARSIZE]; sprintf(filename,"cfenv-average"); if ((FPAV = fopen(filename,"w")) == NULL) { CfOut(cf_error,"fopen"," !! File %s could not be opened for writing\n",filename); return; } sprintf(filename,"cfenv-stddev"); if ((FPVAR = fopen(filename,"...
false
false
false
false
true
1
writeword(int fd, int word, char ack) { char rwchar; rwchar = word; /* send low byte of word */ write(fd, &rwchar, 1); if ((read(fd, &rwchar, 1) == 1) && (rwchar == ack)) /* receive ack */ { rwchar = word >> 8; /* send high byte of word */ write(fd, &rwchar, 1); if ((...
false
true
false
false
true
1
brasero_data_project_rename_node (BraseroDataProject *self, BraseroFileNode *node, const gchar *name) { BraseroFileNode *imported_sibling; BraseroDataProjectPrivate *priv; BraseroFileNode *sibling; priv = BRASERO_DATA_PROJECT_PRIVATE (self); /* Don't allow rename to succeed if name is the empty strin...
false
false
false
true
false
1
BaseScriptFree(struct basescript *bs) { struct basescript *next; while ( bs!=NULL ) { next = bs->next; free(bs->baseline_pos); BaseLangFree(bs->langs); chunkfree(bs,sizeof(struct basescript)); bs = next; } }
false
false
false
false
false
0
LMakeArray(LType *basetype, char *array, int count) { int i; LList *list = NULL; LObject *obj; for (i=0; i<count; ++i) { obj = LTOOBJ(basetype)((void*)(array + i*LSIZE(basetype))); list = LListAppend(list, obj); } return LNew(LLIST, &list); }
false
false
false
false
false
0
on_menu_saveas_activate (GtkWidget *widget, gpointer data) { GtkWidget *dialog; gchar *tmp; dialog = create_dialog_file (window_main, GTK_FILE_CHOOSER_ACTION_SAVE); tmp = g_path_get_basename (dict_file); gtk_file_chooser_set_current_name ((GtkFileChooser *) dialog, tmp); gint...
false
false
false
false
false
0
P_Copy_Plane (Object src, Object gc, Object plane, Object sx, Object sy, Object w, Object h, Object dst, Object dx, Object dy) { Display *dpy; Drawable ddst = Get_Drawable (dst, &dpy), dsrc = Get_Drawable (src, &dpy); register unsigned long p; Che...
false
false
false
false
false
0
printProgress(int result) { int i, j; long long now = runningTime(); fprintf(stderr, "%6lld.%03lld %d/%d ", now / 1000000, (now / 1000) % 1000, ++global_progress, total_histograms); for(i = 0; i <= global_dim; i++) fprintf(stderr, "%d ", histogram[i]); switch(result) { case 0: fprintf(stderr, "Failur...
false
false
false
false
false
0
addEntry(const EntryInternal& entry) { QString preview = entry.previewUrl(EntryInternal::PreviewSmall1); if (!m_hasPreviewImages && !preview.isEmpty()) { m_hasPreviewImages = true; if (rowCount() > 0) { emit dataChanged(index(0,0), index(rowCount()-1,0)); } } //kDebu...
false
false
false
false
false
0
apm_suspend(int fd) { sync(); return ioctl(fd, APM_IOC_SUSPEND, NULL) < 0 ? -errno : 0; }
false
false
false
false
false
0
cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v) { if (v == NULL) return; if (v ->List) _cmsFree(v ->ContextID, v ->List); _cmsFree(v ->ContextID, v); }
false
false
false
false
false
0
commandEdit(KDB *handle) { KeySet *ks; KeySet *ksEdited; KeySet *toRemove; Key *current; int ret; char filename[]="/var/tmp/kdbeditXXXXXX"; char command[300]; //FILE *xmlfile=0; char choice[5]; if (!ksFromXMLfile) return 1; ks=ksNew(0); kdbGetByName(handle, ks, argKeyName, (argAll?KDB_O_INACTIVE:0) | (a...
false
false
false
false
false
0
proc_info_free(const pid_t pid) { int i = proc_info_hash(pid); proc_info_t *info = proc_info[i]; while (info) { if (info->pid == pid) { info->pid = NULL_PID; free(info->cmdline); info->cmdline = NULL; return; } info = info->next; } }
false
false
false
false
false
0
RTMP_Init(RTMP *r) { #ifdef CRYPTO if (!RTMP_TLS_ctx) RTMP_TLS_Init(); #endif memset(r, 0, sizeof(RTMP)); r->m_sb.sb_socket = -1; r->m_inChunkSize = RTMP_DEFAULT_CHUNKSIZE; r->m_outChunkSize = RTMP_DEFAULT_CHUNKSIZE; r->m_nBufferMS = 30000; r->m_nClientBW = 2500000; r->m_nClientBW2 = 2; r->m_nSer...
false
false
false
false
false
0
RFCNB_CvtPad_Name(char *name1, char *name2) { char c, c1, c2; int i, len; len = strlen(name1); for (i = 0; i < 16; i++) { if (i >= len) { c1 = 'C'; c2 = 'A'; /* CA is a space */ } else { c = name1[i]; c1 = (char)((int)c/16 + (int)'A'); c2 = (char)((int)c%16 + (int)'A'); ...
false
false
false
false
false
0
DDMoveWord( char * pucDest, char * pucSrc, FLMUINT uiMaxDestLen, FLMUINT * puiPos) { FLMBOOL bFoundWord = TRUE; FLMUINT uiPos = *puiPos; char * pMatch; FLMUINT uiBytesToCopy; pucSrc += uiPos; while( *pucSrc == NATIVE_SPACE) { pucSrc++; } pMatch = pucSrc; while( *pMatch > NATIVE_SPACE) { pMat...
false
false
false
false
false
0
Edit(wxWindow *parent, const Barry::TimeZones &zones, iterator record) { if( record == end() ) return false; if( (*record)->Edit(parent, true, zones) && (*record)->IsBuildable() ) { // see if this record is part of the Tasks database RecordCache<Barry::Task> *tp = dynamic_cast< RecordCache<Barry::Task>*> (...
false
false
false
false
false
0
clutter_actor_set_margin (ClutterActor *self, const ClutterMargin *margin) { ClutterLayoutInfo *info; g_return_if_fail (CLUTTER_IS_ACTOR (self)); g_return_if_fail (margin != NULL); info = _clutter_actor_get_layout_info (self); if (info->margin.top != margin->top) clutte...
false
false
false
false
false
0
check_boost_vol(struct hda_codec *codec, hda_nid_t nid, int dir, int idx) { unsigned int step; if (!nid_has_volume(codec, nid, dir) || is_ctl_associated(codec, nid, dir, idx, NID_PATH_VOL_CTL) || is_ctl_associated(codec, nid, dir, idx, NID_PATH_BOOST_CTL)) return false; step = (query_amp_caps(co...
false
false
false
false
false
0
GetEffectDescription(){ // Note: This is useful only after values have been set. return wxString::Format(_("Applied effect: %s stretch factor = %f times, time resolution = %f seconds"), this->GetEffectName().c_str(), amount,time_resolution); }
false
false
false
false
false
0
gf_cli_fsm_log_cbk (struct rpc_req *req, struct iovec *iov, int count, void *myframe) { gf1_cli_fsm_log_rsp rsp = {0,}; int ret = -1; dict_t *dict = NULL; int tr_count = 0; char ...
false
false
false
false
false
0
xread_file(const char *path) { FILE *fp; char *result; fp = fopen(path, "r"); if (!fp) return NULL; result = xfread_file(fp); fclose(fp); return result; }
false
true
false
false
true
1
small_vtm_sub(struct vtm *vtm1, struct vtm *vtm2) { int off; off = vtm1->sec - vtm2->sec; off += (vtm1->min - vtm2->min) * 60; off += (vtm1->hour - vtm2->hour) * 3600; if (ne(vtm1->year, vtm2->year)) off += lt(vtm1->year, vtm2->year) ? -24*3600 : 24*3600; else if (vtm1->mon != vtm2->mon...
false
false
false
false
false
0
visu_node_array_iterNextList(VisuNodeArray *array, VisuNodeArrayIter *iter) { EleArr *ele; g_return_if_fail(VISU_IS_NODE_ARRAY(array) && iter && array == iter->array); g_return_if_fail(iter->init && iter->itLst); do { iter->itLst = g_list_next(iter->itLst); iter->node = (iter->itLst)?visu_node...
false
false
false
false
false
0
Channel_get_midi_change_callback(ChannelObject *self, void *closure) { if (self->midi_change_callback) { Py_INCREF(self->midi_change_callback); return self->midi_change_callback; } else { Py_INCREF(Py_None); return Py_None; } }
false
false
false
false
false
0
JustReachedHome() override { if (m_pInstance) { m_pInstance->SetData(TYPE_SKERAM, FAIL); } if (m_bIsImage) { m_creature->ForcedDespawn(); } }
false
false
false
false
false
0
add_col_cuts(lp_prob *p, OsiCuts *cutlist, int *bound_changes) { int i, j; OsiColCut col_cut; const int verbosity = p->par.verbosity; int *indices; double *elements; int num_col_cuts; LPdata *lp_data = p->lp_data; var_desc **vars = lp_data->vars; num_col_cuts = cutlist->sizeColCuts(...
false
false
false
false
false
0
writer_write(struct writer *writer, struct iovec *iov, int iov_cnt, uint64_t *offset_ptr) { uint64_t prev_size = writer->file_size; int r = file_appendv(writer->file, iov, iov_cnt, prev_size); if (r == -1) { return -1; } writer->file_size += r; *offset_ptr = prev_size; return r; }
false
false
false
false
false
0
init_emulate_ctxt(struct kvm_vcpu *vcpu) { struct x86_emulate_ctxt *ctxt = &vcpu->arch.emulate_ctxt; int cs_db, cs_l; kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l); ctxt->eflags = kvm_get_rflags(vcpu); ctxt->tf = (ctxt->eflags & X86_EFLAGS_TF) != 0; ctxt->eip = kvm_rip_read(vcpu); ctxt->mode = (!is_protm...
false
false
false
false
false
0
parseNDeleteRSP(T_DIMSE_N_DeleteRSP * e, DcmDataset * obj) { Uint16 cmd; Uint16 msgid; Uint16 dtype; Uint16 status; OFCondition cond = parseCommonRSP(obj, &cmd, &msgid, &dtype, &status); RET(cond); e->MessageIDBeingRespondedTo = msgid; if (dtype == DIMSE_DATASET_NULL) { e->DataSetTy...
false
false
false
false
false
0
_nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen, char **result,int *errnop, int *h_errnop) { /* Just an alibi buffer, res_nquery will allocate a real buffer for us. */ unsigned char buf[20]; union { querybuf *buf; unsigned char *ptr; } ansp = { .ptr = buf }; enum nss...
false
false
false
false
false
0
infoout(unsigned char *buf, unsigned blen) { U16B i; char ds[10]; for (i=0;i<blen;++i) { if (ilen) write(arcfile,",",1); if (!(ilen++&0xf)) write(arcfile,"\n\t",2); sprintf(ds,"0x%02X",buf[i]); write(arcfile,ds,strlen(ds)); } }
true
true
false
false
false
1
mem_raw(JSXDRState *xdr, uint32 len) { void *data; if (xdr->mode == JSXDR_ENCODE) { MEM_NEED(xdr, len); } else if (xdr->mode == JSXDR_DECODE) { MEM_LEFT(xdr, len); } data = MEM_DATA(xdr); MEM_INCR(xdr, len); return data; }
false
false
false
false
false
0
mpd_isinteger(const mpd_t *dec) { if (mpd_isspecial(dec)) { return 0; } return _mpd_isint(dec); }
false
false
false
false
false
0
me2Avg(double ccme2) const { if ( jacobian() == 0.0 ) return 0.0; double x = subtractionParameters()[0]; double z = subtractionParameters()[1]; Energy2 prop = 2.*((realEmissionME()->lastXComb().meMomenta()[realEmitter()])* (realEmissionME()->lastXComb().meMomenta()[realEmission()]))*x; double re...
false
false
false
false
false
0
int13_get_last_status ( struct int13_drive *drive, struct i386_all_regs *ix86 __unused ) { DBG ( "Get status of last operation\n" ); return drive->last_status; }
false
false
false
false
false
0
xen_hvm_cpu_up(unsigned int cpu, struct task_struct *tidle) { int rc; /* * This can happen if CPU was offlined earlier and * offlining timed out in common_cpu_die(). */ if (cpu_report_state(cpu) == CPU_DEAD_FROZEN) { xen_smp_intr_free(cpu); xen_uninit_lock_cpu(cpu); } /* * xen_smp_intr_init() needs t...
false
false
false
false
false
0
SeekRecording(long long pos, uint32_t whence) { MutexLock lock(&m_cmdlock); uint64_t nextPos = m_currentPlayingRecordPosition; switch (whence) { case SEEK_SET: nextPos = pos; break; case SEEK_CUR: nextPos += pos; break; case SEEK_END: nextPos = m_currentPlayingRecord...
false
false
false
false
false
0
mono_marshal_get_isinst (MonoClass *klass) { static MonoMethodSignature *isint_sig = NULL; GHashTable *cache; MonoMethod *res; WrapperInfo *info; int pos_was_ok, pos_end; #ifndef DISABLE_REMOTING int pos_end2, pos_failed; #endif char *name; MonoMethodBuilder *mb; cache = get_cache (&klass->image->isinst_cache...
false
false
false
false
false
0
pp_c_exclusive_or_expression (c_pretty_printer *pp, tree e) { if (TREE_CODE (e) == BIT_XOR_EXPR || TREE_CODE (e) == TRUTH_XOR_EXPR) { pp_c_exclusive_or_expression (pp, TREE_OPERAND (e, 0)); if (TREE_CODE (e) == BIT_XOR_EXPR) pp_c_maybe_whitespace (pp); else pp_c_whitespace (pp); pp...
false
false
false
false
true
1
PowFunction( void *theEnv) { DATA_OBJECT value1, value2; if (EnvArgCountCheck(theEnv,"**",EXACTLY,2) == -1) return(0.0); if (EnvArgTypeCheck(theEnv,"**",1,FLOAT,&value1) == FALSE) return(0.0); if (EnvArgTypeCheck(theEnv,"**",2,FLOAT,&value2) == FALSE) return(0.0); if (((DOToDouble(value1) == 0.0)...
false
false
false
false
false
0
save_to_temp_file(bool show_progress) { Glib::ustring uri = Utils::get_temp_file_uri("glom_image"); if(uri.empty()) { std::cerr << ": uri is empty." << std::endl; } bool saved = false; if(show_progress) saved = save_file(uri); else saved = save_file_sync(uri); if(!saved) { uri = ...
false
false
false
false
false
0
sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const { // note: the QStyledItemDelegage::sizeHint seems to be extremly slow. don't call it updateFonts( option ); QStyle *style = m_view->style(); PixelSizes s( style ); int viewportWidth = m_vi...
false
false
false
false
false
0
write(DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache, const E_GrpLenEncoding glenc, const E_...
false
false
false
false
false
0