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
skipValue( FLMUINT uiTag) { RCODE rc = FERR_OK; switch( ((uiTag & WIRE_VALUE_TYPE_MASK) >> WIRE_VALUE_TYPE_START_BIT)) { case WIRE_VALUE_TYPE_GEN_0: { break; } case WIRE_VALUE_TYPE_GEN_1: { if( RC_BAD( rc = m_pDIStream->skip( 1))) { goto Exit; } break; } case WIRE_VALUE_TY...
false
false
false
false
false
0
cirrusfb_create_object(struct cirrus_fbdev *afbdev, struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **gobj_p) { struct drm_device *dev = afbdev->helper.dev; struct cirrus_device *cdev = dev->dev_private; u32 bpp, depth; u32 size; struct drm_gem_object *gobj; int ret = 0; drm_fb_get_...
false
false
false
false
false
0
ql_stop_loopback(struct ql_adapter *qdev) { qdev->link_config &= ~CFG_LOOPBACK_PCS; ql_mb_set_port_cfg(qdev); if (test_bit(QL_LB_LINK_UP, &qdev->flags)) { netif_carrier_on(qdev->ndev); clear_bit(QL_LB_LINK_UP, &qdev->flags); } }
false
false
false
false
false
0
smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw) { return fetch_rdp_cookie_name(s, smp, args ? args->data.str.str : NULL, args ? args->data.str.len : 0); }
false
false
false
false
false
0
on_key_press_event(GtkWidget* widget, GdkEventKey* evt) { GtkTreeView* tree_view = GTK_TREE_VIEW(widget); GtkTreeSelection* tree_sel; GtkTreeModel* model; GtkTreeIter it; GtkTreePath* tp; // int modifier = (evt->state & gtk_accelerator_get_default_mod_mask()); switch(evt->keyval) { c...
false
false
false
false
false
0
Pk11Install_ListIter_reset(Pk11Install_ListIter* _this) { if(_this->list) { _this->current = _this->list->head; } }
false
false
false
false
false
0
e_mixer_theme_path(void) { #define TF "/e-module-mixer.edj" size_t dirlen; dirlen = strlen(mixer_mod->dir); if (dirlen >= sizeof(tmpbuf) - sizeof(TF)) return NULL; memcpy(tmpbuf, mixer_mod->dir, dirlen); memcpy(tmpbuf + dirlen, TF, sizeof(TF)); return tmpbuf; #undef TF }
false
false
false
false
false
0
vg_integrate( VolumeGeometry *obj, FMField *out, FMField *in ) { int32 iel; for (iel = 0; iel < obj->bfGM->nCell; iel++) { FMF_SetCell( obj->det, iel ); FMF_SetCell( in, iel ); FMF_SetCell( out, iel ); fmf_sumLevelsMulF( out, in, obj->det->val ); } return( RET_OK ); }
false
false
false
false
false
0
__pyx_pf_9xmmsvalue_20CollectionAttributes_16__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { char *__pyx_v_value; int __pyx_r; __Pyx_RefNannyDeclarations char *__pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains...
false
false
false
false
false
0
appendLocal(const spi::InternalLoggingEvent& event) { int const level = getSysLogLevel(event.getLogLevel()); internal::appender_sratch_pad & appender_sp = internal::get_appender_sp (); detail::clear_tostringstream (appender_sp.oss); layout->formatAndAppend(appender_sp.oss, event); appender_sp.str = ...
false
false
false
false
false
0
xmms_ringbuf_bytes_used (const xmms_ringbuf_t *ringbuf) { g_return_val_if_fail (ringbuf, 0); if (ringbuf->wr_index >= ringbuf->rd_index) { return ringbuf->wr_index - ringbuf->rd_index; } return ringbuf->buffer_size - (ringbuf->rd_index - ringbuf->wr_index); }
false
false
false
false
false
0
pdb_read_rec_by_id(pdbfile *fin, const gbuint32 rec_id, gbuint8 *flags, gbuint8 *category, void **data) { pdbrec_t *rec; for (rec = fin->rec_list; rec; rec = rec->next) { if (rec->id == rec_id) { if (data) { *data = rec->data; } if (flags) { *flags = rec->flags; } ...
false
false
false
false
false
0
getSelectedFiles(FXStringList & files){ if (dirselector) { getApp()->reg().writeStringEntry("directories","last-import-dirs",dirselector->getDirectory().text()); files.append(dirselector->getDirectory()); } else if (fileselector){ getApp()->reg().writeStringEntry("directories","last-import-files",fi...
false
false
false
false
false
0
accessLogFreeLogFormat(logformat_token ** tokens) { while (*tokens) { logformat_token *token = *tokens; *tokens = token->next; safe_free(token->data.string); xfree(token); } }
false
false
false
false
false
0
setRenderSize(const QSize &renderSize) { KGameRenderedItem::setRenderSize(renderSize); QList<QGraphicsItem*> children = childItems(); foreach( QGraphicsItem* item, children) { ((KGameRenderedItem*)item)->setRenderSize(renderSize); } }
false
false
false
false
false
0
doGet(const void* target) const { const GpuProgram* t = static_cast<const GpuProgram*>(target); if (t->getType() == GPT_VERTEX_PROGRAM) { return "vertex_program"; } else if (t->getType() == GPT_GEOMETRY_PROGRAM) { return "geometry_program"; ...
false
false
false
false
false
0
Initialize() { // Prepares state for use. if (store_.length() >= PreparseDataConstants::kHeaderSize) { function_index_ = PreparseDataConstants::kHeaderSize; int symbol_data_offset = PreparseDataConstants::kHeaderSize + store_[PreparseDataConstants::kFunctionsSizeOffset]; if (store_.length() > sy...
false
false
false
false
false
0
esl_mixdchlet_Fit_Multipass(ESL_RANDOMNESS *r, double **c, int nc, int reps, ESL_MIXDCHLET *best_md, int verbose) { int i, q, k, status; double best_lk = -eslINFINITY; double lk; ESL_MIXDCHLET *md = esl_mixdchlet_Create(best_md->N, best_md->K); int err_cnt = 0; for (i=0; i<reps; i++) { /* for ...
false
false
false
false
true
1
findVariable(const char *line) { /* Parse global and class variable names (C.x) from assignment statements. * Object attributes (obj.x) are ignored. * Assignment to a tuple 'x, y = 2, 3' not supported. * TODO: ignore duplicate tags from reassignment statements. */ const char *cp, *sp, *eq, *start; cp = strstr...
false
false
false
false
false
0
us_reactor_destroy( us_reactor_t *self ) { while ( self->m_handlers ) { self->remove_item( self, self->m_handlers ); } #if defined( US_REACTOR_USE_POLL ) us_delete( self->m_allocator, self->m_poll_handlers ); self->m_poll_handlers = 0; #endif }
false
false
false
false
false
0
WebPSafeFree(void* const ptr) { if (ptr != NULL) { Increment(&num_free_calls); SubMem(ptr); } free(ptr); }
false
false
false
false
false
0
select_active_source_name (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { GdictPrefDialog *dialog = GDICT_PREF_DIALOG (data); gboolean is_active; gtk_tree_model_get (model, iter, SOURCES_ACTIVE_COLUMN, &is_active, -1); if (is_a...
false
false
false
false
false
0
ReadPGM(FILE *fp) { int char1, char2, width, height, max, c1, c2, c3, r, c; char1 = fgetc(fp); char2 = fgetc(fp); SkipComments(fp); c1 = fscanf(fp, "%d", &width); SkipComments(fp); c2 = fscanf(fp, "%d", &height); SkipComments(fp); c3 = fscanf(fp, "%d", &max); if (char1 != 'P' |...
false
false
false
false
false
0
Write(const char* data, int data_size) { if (is_sealed_) { return 0; } if ((write_pos_ + data_size) <= (max_size_ - seal_size_)) { return WriteInternal(data, data_size); } else { return Seal(); } }
false
false
false
false
false
0
mcode_alloc(jit_State *J, size_t sz) { /* Target an address in the static assembler code (64K aligned). ** Try addresses within a distance of target-range/2+1MB..target+range/2-1MB. ** Use half the jump range so every address in the range can reach any other. */ #if LJ_TARGET_MIPS /* Use the middle of the 256...
false
false
false
false
false
0
event_whois_oper(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *type; g_return_if_fail(data != NULL); params = event_get_params(data, 3, NULL, &nick, &type); /* Bugfix: http://bugs.irssi.org/?do=details&id=99 * Author: Geert Hauwaerts <geert@irssi.org> * Date: Wed Sep 15 20:17:24 CEST 20...
false
false
false
false
false
0
tool_file_format_addPatterns(ToolFileFormat *fmt, const gchar **patterns) { gint n; g_return_if_fail(IS_TOOL_FILE_FORMAT(fmt)); for (n = 0; patterns[n]; n++) fmt->priv->fileType = g_list_append(fmt->priv->fileType, g_strdup(patterns[n])); _buildLabel(fmt); }
false
false
false
false
false
0
do_or_append_insn(char *op, struct pnode *parms) { gpasmVal r; if (!state.mac_prev || (strcasecmp(op, "endm") == 0) || (state.while_head && (strcasecmp(op, "endw") == 0))) { r = do_insn(op, parms); } else { macro_append(); r = 0; } return r; }
false
false
false
false
false
0
hash_iterator_unlock (struct hash_iterator *hi) { if (hi->bucket) { if (hi->bucket_marked) { hash_remove_marked (hi->hash, hi->bucket); hi->bucket_marked = false; } if (hi->autolock) { mutex_unlock (&hi->bucket->mutex); } hi->bucket = NULL; hi->last = NULL; } }
false
false
false
false
false
0
copy_structures(struct activity *act[], unsigned int id_seq[], struct record_header record_hdr[], int dest, int src) { int i, p; memcpy(&record_hdr[dest], &record_hdr[src], RECORD_HEADER_SIZE); for (i = 0; i < NR_ACT; i++) { if (!id_seq[i]) continue; if (((p = get_activity_position(act, id_seq[i]))...
false
false
false
false
false
0
calc_image_params (struct hp5590_scanner *scanner, unsigned int *pixel_bits, unsigned int *pixels_per_line, unsigned int *bytes_per_line, unsigned int *lines, unsigned int *image_size) { unsigned int _pixel_bits; SANE_Status ret; unsigned int _pixels_per_line; unsigned int _bytes_per_l...
false
false
false
false
false
0
DBFAddNativeFieldType(DBFHandle psDBF, const char * pszFieldName, char chType, int nWidth, int nDecimals ) { char *pszFInfo; int i; /* -------------------------------------------------------------------- */ /* Do some checking to ensure we can add records to this file. */ /* -...
false
true
false
false
false
1
calcWidth(bool) { // Check that above threshold. if (ps == 0.) return; // Widths to fermion pairs. if (id1Abs < 19) { widNow = preFac * pow3(ps) * (1. + 8. * mr1 / 3.) / 320.; if (id1Abs < 9) widNow *= colQ; // Widths to gluon and photon pair. } else if (id1Abs == 21) { widNo...
false
false
false
false
false
0
gt_encseq_has_multiseq_support(const GtEncseq *encseq) { bool ret = encseq->sat == GT_ACCESS_TYPE_EQUALLENGTH || encseq->has_ssptab || encseq->accesstype_via_utables; return ret; }
false
false
false
false
false
0
quote_fmt_reset_vartable(void) { if (var_table) { g_hash_table_destroy(var_table); var_table = NULL; } if (attachments) { GList *cur = attachments; while (cur) { g_free(cur->data); cur = g_list_next(cur); } g_list_free(attachments); attachments = NULL; } }
false
false
false
false
false
0
owner_excluded(struct archive_match *a, struct archive_entry *entry) { int r; if (a->inclusion_uids.count) { if (!match_owner_id(&(a->inclusion_uids), archive_entry_uid(entry))) return (1); } if (a->inclusion_gids.count) { if (!match_owner_id(&(a->inclusion_gids), archive_entry_gid(entry))) ...
false
false
false
false
false
0
newDirect(But *but, bool value) { Setup *setup = but_packet(but); uint directFlags; assert(MAGIC(setup)); if (value) directFlags = BUT_DRAWABLE | BUT_PRESSABLE; else directFlags = BUT_DRAWABLE | BUT_NOPRESS | BUT_NOKEY; clp_setStrNum(setup->cg->clp, "client.direct", (value ? "t" : "f"), setup-...
false
false
false
false
false
0
gdImageGrayScale(gdImagePtr src) { int x, y; int r,g,b,a; int new_pxl, pxl; FuncPtr f; if (src==NULL) { return 0; } f = GET_PIXEL_FUNCTION(src); for (y=0; y<src->sy; ++y) { for (x=0; x<src->sx; ++x) { pxl = f (src, x, y); r = gdImageRed(src, pxl); g = gdImageGreen(src, pxl); b = gdImageBlue(s...
false
false
false
false
false
0
cli_scanmschm(cli_ctx *ctx) { int ret = CL_CLEAN, rc; chm_metadata_t metadata; char *dir; unsigned int viruses_found = 0; cli_dbgmsg("in cli_scanmschm()\n"); /* generate the temporary directory */ if(!(dir = cli_gentemp(ctx->engine->tmpdir))) return CL_EMEM; if(mkdir(dir, 0700)) { cli_dbgmsg("...
false
false
false
false
false
0
get_name_filldir(struct dir_context *ctx, const char *name, int length, loff_t offset, u64 inum, unsigned int type) { struct get_name_filldir *gnfd = container_of(ctx, struct get_name_filldir, ctx); if (inum != gnfd->inum.no_addr) return 0; memcpy(gnfd->name, name, length); gnfd->name[length] = ...
false
false
false
false
false
0
karea_draw_character (GtkWidget *w, int index, int selected) { PangoLayout *layout; gchar *string_utf; gint char_width, char_height; gint x; karea_get_char_size (w, &char_width, &char_height); if (selected >= 0) { gdk_draw_rectangle (kpixmap, selected ? w->styl...
false
false
false
false
false
0
upload_firmware(struct zd_usb *usb) { int r; u16 fw_bcdDevice; u16 bcdDevice; struct usb_device *udev = zd_usb_to_usbdev(usb); const struct firmware *ub_fw = NULL; const struct firmware *uph_fw = NULL; char fw_name[128]; bcdDevice = get_bcdDevice(udev); r = request_fw_file(&ub_fw, get_fw_name(usb, fw_name,...
true
true
false
false
false
1
method_D4(const int *account, int *weight) { // note this is a slightly modified version of the old method D1 if (account[0] == 0) return AccountNumberCheck::ERROR; // note: from here on this method is quite similar to method_C6 number2Array("2121212120", weight); int result = algo03(10, weight, t...
false
false
false
false
false
0
builtin (void) /***** builtin interpret a builtin command, number no. *****/ { unsigned long l; commandtyp *p; int comn; if (*next==3) { next++; #ifdef SPECIAL_ALIGNMENT memmove((char *)(&comn),next,sizeof(int)); #else comn=*((int *)next); #endif p=command_list+comn; l=sizeof(int); } else if (udfon) retu...
false
false
false
false
false
0
buckets_destroy(bucket* buckets, int32_t count) { for (int32_t i = 0; i < count; ++i) { bucket_destroy(buckets + i); } free(buckets); }
false
false
false
false
false
0
cob_decimal_get_packed (cob_decimal *d, cob_field *f, const int opt) { unsigned char *data; unsigned char *p; unsigned char *q; size_t size; size_t n; size_t i; int diff; int sign; int digits; unsigned char x; /* build string */ sign = mpz_sgn (d->value); mpz_abs (d->value, d->value); mpz_get_str (...
false
false
false
false
false
0
LUsolve(const MAT *LU, PERM *pivot, const VEC *b, VEC *x) #endif { if ( ! LU || ! b || ! pivot ) error(E_NULL,"LUsolve"); if ( LU->m != LU->n || LU->n != b->dim ) error(E_SIZES,"LUsolve"); x = v_resize(x,b->dim); px_vec(pivot,b,x); /* x := P.b */ Lsolve(LU,x,x,1.0); /* implicit diagonal = 1 */ Usolve(LU,x,x,...
false
false
false
true
false
1
pop_expr(struct state *state) { if (state->exprs_used > 0) { state->exprs_used -= 1; return state->exprs[state->exprs_used]; } else { STATE_ERROR(state, PATHX_EINTERNAL); assert(0); return NULL; } }
false
false
false
false
false
0
git_tags_pane_init (GitTagsPane *self) { gchar *objects[] = {"tags_pane", "tags_list_model", NULL}; GError *error = NULL; GtkTreeView *tags_view; GtkCellRenderer *tags_selected_renderer; self->priv = g_new0 (GitTagsPanePriv, 1); self->priv->builder = gtk_builder_new (); if (!gtk_builder_add_obje...
false
false
false
false
false
0
done() { if (mboxAccount.tasks.front() != this) LIBMAIL_THROW("Assertion failed: mail::mbox::task::done"); mboxAccount.tasks.pop(); delete this; }
false
false
false
false
false
0
dcbp_set_code(struct p_compressed_bm *p, enum drbd_bitmap_code code) { BUG_ON(code & ~0xf); p->encoding = (p->encoding & ~0xf) | code; }
false
false
false
false
false
0
get_chain_operator_parameter(void) const { // -------- DBC_REQUIRE(is_selected() == true); DBC_REQUIRE(selected_chains().size() == 1); // -------- unsigned int p = selected_chainsetup_repp->first_selected_chain(); if (p < selected_chainsetup_repp->chains.size()) { if (selected_chainsetup_repp->chains[p...
false
false
false
false
false
0
__Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif ret...
false
false
false
false
false
0
copy_from_filestruct(filestruct *file_top, filestruct *file_bot) { filestruct *top_save; size_t current_x_save = openfile->current_x; bool edittop_inside; #ifndef NANO_TINY bool right_side_up = FALSE, single_line = FALSE; #endif assert(file_top != NULL && file_bot != NULL); #ifndef NANO_TINY /...
false
false
false
false
false
0
LookupForWrite(JSObject* object, String* name, LookupResult* lookup) { object->LocalLookup(name, lookup); if (!StoreICableLookup(lookup)) { return false; } if (lookup->type() == INTERCEPTOR) { if (object->GetNamedInterceptor()->setter()->IsUndefined...
false
false
false
false
false
0
haifa_change_pattern (rtx insn, rtx new_pat) { sched_change_pattern (insn, new_pat); /* Invalidate INSN_COST, so it'll be recalculated. */ INSN_COST (insn) = -1; /* Invalidate INSN_TICK, so it'll be recalculated. */ INSN_TICK (insn) = INVALID_TICK; }
false
false
false
false
false
0
CalculateKadUsersNew() { // the idea of calculating the user count with this method is simple: // whenever we do a search for any NodeID (except in certain cases where the result is not usable), // we remember the distance of the closest node we found. Because we assume all NodeIDs are distributed // equally, we ca...
false
false
false
false
false
0
get_queue_member_status(struct member *cur) { return ast_strlen_zero(cur->state_exten) ? ast_device_state(cur->state_interface) : extensionstate2devicestate(ast_extension_state(NULL, cur->state_context, cur->state_exten)); }
false
false
false
false
false
0
do_sys_ftruncate(unsigned int fd, loff_t length, int small) { struct inode *inode; struct dentry *dentry; struct fd f; int error; error = -EINVAL; if (length < 0) goto out; error = -EBADF; f = fdget(fd); if (!f.file) goto out; /* explicitly opened as large or we are on 64-bit box */ if (f.file->f_flags...
false
false
false
false
false
0
stripe_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, dict_t *xattr) { int call_cnt = 0; stripe_local_t *local = NULL; VALIDATE_OR_GOTO (frame, out); VALIDATE_OR_GOTO (frame->local, out); ...
false
false
false
true
false
1
p_is_debug_feature_item_enabled(const char *debug_item) { gboolean enable; char *filename; enable = FALSE; filename = p_get_gapdebug_storyboard_config_file(); if(filename) { if(gap_debug) { printf("debug feature filename:'%s'\n", filename); } if(g_file_test(filename, G_FILE_TEST_EXI...
true
true
false
false
false
1
getChildren(const std::string& name) { NodeList result(0); NodeList::const_iterator iter; // search for all occurances of nodename and insert them into the new list for(iter = mNodeList.begin(); iter != mNodeList.end(); ++iter) { const std::string node_name = (*iter)->getName(...
false
false
false
false
false
0
widget_pokemem_keyhandler( input_key key ) { int new_selected; new_selected = selected; switch ( key ) { case INPUT_KEY_Return: /* Do pokes */ case INPUT_KEY_KP_Enter: case INPUT_JOYSTICK_FIRE_1: widget_end_all( WIDGET_FINISHED_OK ); break; case INPUT_KEY_Escape: /* Close widget */ case INPUT...
false
false
false
false
false
0
reader_process (void * data) { Artec48U_Scanner * s = (Artec48U_Scanner *) data; int fd = s->reader_pipe; SANE_Status status; struct SIGACTION act; sigset_t ignore_set; ssize_t bytes_written = 0; XDBG ((1, "reader process...\n")); if (sanei_thread_is_forked()) close (s->pipe); sigfillset (&ignore_...
false
false
false
false
false
0
itolg(ints, dims, imap, ndims) int *ints; /* multi-dimensional array of integers */ long *dims; /* list of dimensions */ long *imap; /* memory access index mapping vector */ int ndims; /* number of dimensions in list */ { long iocount = dimprod (dims, ndims); long *longs = (long *) malloc ...
false
false
false
false
true
1
commit(CdlTransaction transaction) { // The new name is already installed, nothing more needs to happen. CYG_UNUSED_PARAM(CdlTransaction, transaction); }
false
false
false
false
false
0
Togl_HideOverlay(Togl *togl) { if (togl->OverlayWindow && togl->OverlayIsMapped) { (void) XUnmapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); togl->OverlayIsMapped = False; } }
false
false
false
false
false
0
strtoll_or_err(const char *str, const char *errmesg) { long long num; char *end = NULL; if (str == NULL || *str == '\0') goto err; errno = 0; num = strtoll(str, &end, 10); if (errno || str == end || (end && *end)) goto err; return num; er...
false
false
false
false
false
0
pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) { const char *rhost = NULL; const char *username; guint i; int r; bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); g_type_init (); dbus_g_object_register_marshaller (fprintd_...
false
false
false
false
false
0
mergeXdmCfg(const char *path) { char *p; XrmDatabase db; ASPrintf(&p, "%s/xdm-config", path); if ((db = XrmGetFileDatabase(p))) { printf("Information: reading xdm config file %s\n", p); usedFile(p); free(p); XrmEnumerateDatabase(db, &empty, &empty, XrmEnumAllLevels, ...
false
false
false
false
false
0
H5O_fill_old_encode(H5F_t UNUSED *f, uint8_t *p, const void *_fill) { const H5O_fill_t *fill = (const H5O_fill_t *)_fill; FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(f); HDassert(p); HDassert(fill && NULL == fill->type); UINT32ENCODE(p, fill->size); if(fill->buf) HDmemcpy(p, fill->buf,...
false
false
false
false
false
0
cs_file_sec(const char *attr, size_t len) { struct my_cs_file_section_st *s; for (s=sec; s->str; s++) { if (!strncmp(attr,s->str,len)) return s; } return NULL; }
false
false
false
false
false
0
mod_case_brace_add(chunk_t *cl_colon) { chunk_t *pc = cl_colon; chunk_t *last = NULL; chunk_t *next = chunk_get_next_ncnl(cl_colon, CNAV_PREPROC); chunk_t *br_open; chunk_t *br_close; chunk_t chunk; LOG_FMT(LMCB, "%s: line %d", __func__, pc->orig_line); while ((pc = chunk_get_next_ncnl(pc, C...
false
false
false
false
false
0
Set(const char *string) { char **token = g_strsplit(string, " ", Size()); for (int i = 0; i < Size(); i++) { if (token[i] == NULL) { Set(i, ufnumberarray->Default[i]); } else { double number; int count = sscanf(token[i], "%lf", &number); if (count ...
false
false
false
false
false
0
DoOpenProject(const wxString& filename, bool addToHistory) { // Manager::Get()->GetLogManager()->DebugLog(_T("Opening project '%s'"), filename.wx_str()); if (!wxFileExists(filename)) { cbMessageBox(_("The project file does not exist..."), _("Error"), wxICON_ERROR); return false; } Sh...
false
false
false
false
false
0
cc770_rtr_interrupt(struct net_device *dev, unsigned int o) { struct cc770_priv *priv = netdev_priv(dev); unsigned int mo = obj2msgobj(o); u8 ctrl0, ctrl1; int n = CC770_MAX_MSG; while (n--) { ctrl0 = cc770_read_reg(priv, msgobj[mo].ctrl0); if (!(ctrl0 & INTPND_SET)) break; ctrl1 = cc770_read_reg(priv, ...
false
false
false
false
false
0
my_strdup(const char *str) /**************************************************************************** purpose: duplicate string --- exists to ease porting ****************************************************************************/ { char *s = NULL; unsigned long strsize; strsize = strlen(str) + 1; ...
false
false
false
false
false
0
test_gtk_plugin_manager_configure_button_sensitivity (TestFixture *fixture) { GtkTreeIter iter; PeasPluginInfo *info; testing_util_push_log_hook ("Could not find plugin 'does-not-exist'*"); /* Must come first otherwise the first iter may * be after a revealed builtin plugin */ peas_gtk_plugin_manager_...
false
false
false
false
false
0
standardise(const QString& string, SpellingType spellingType) const { //remove exterraneous characters QString standardised = string; standardised.remove(QRegExp("[.,\\s-_()]")); if(spellingType == Player) { //capitalise first letter standardised.re...
false
false
false
false
false
0
_css_length (const char *str,GR_Graphics* pG, UT_sint32 *iDisplayLength,UT_sint32 *iLayoutLength) { UT_sint32 dim = UT_determineDimension(static_cast<const char*>(str), DIM_PX); if (dim != DIM_PX && dim != DIM_none) { if (pG == 0) { *iDisplayLength = static_cast<UT_sint32>((UT_convertToInches(str) ...
false
false
false
false
false
0
krb5_config_vget_string_default (krb5_context context, const krb5_config_section *c, const char *def_value, va_list args) { const char *ret; ret = krb5_config_vget_string (context, c, args); if (ret == NULL) ret = def_value; return ret; }
false
false
false
false
false
0
SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, u64 volatile_fid) { int rc; struct compress_ioctl fsctl_input; char *ret_data = NULL; fsctl_input.CompressionState = cpu_to_le16(COMPRESSION_FORMAT_DEFAULT); rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid...
false
false
false
false
false
0
str2txid(const char *s, const char **endp) { txid val = 0; txid cutoff = MAX_TXID / 10; txid cutlim = MAX_TXID % 10; for (; *s; s++) { unsigned d; if (*s < '0' || *s > '9') break; d = *s - '0'; /* * check for overflow */ if (val > cutoff || (val == cutoff && d > cutlim)) { val = 0; ...
false
false
false
false
false
0
source_registry_compare_nodes (GNode *node_a, GNode *node_b) { ESource *source_a = E_SOURCE (node_a->data); ESource *source_b = E_SOURCE (node_b->data); const gchar *uid_a, *uid_b; uid_a = e_source_get_uid (source_a); uid_b = e_source_get_uid (source_b); /* Sanity check, with runt...
false
false
false
false
false
0
drr_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) { struct rtattr *tb[TCA_DRR_MAX + 1]; SPRINT_BUF(b1); if (opt == NULL) return 0; parse_rtattr_nested(tb, TCA_DRR_MAX, opt); if (tb[TCA_DRR_QUANTUM]) fprintf(f, "quantum %s ", sprint_size(rta_getattr_u32(tb[TCA_DRR_QUANTUM]), b1)); return ...
false
false
false
false
false
0
ui_vis_timeout_func (GtkWidget * widget, guchar * data) { if (config.vis_type == VIS_ANALYZER) { const gint n = (config.analyzer_type == ANALYZER_BARS) ? 19 : 75; for (gint i = 0; i < n; i++) { if (data[i] > vis.data[i]) { vis.data[i] = data[i]; ...
false
false
false
false
false
0
sdio_uart_change_speed(struct sdio_uart_port *port, struct ktermios *termios, struct ktermios *old) { unsigned char cval, fcr = 0; unsigned int baud, quot; switch (termios->c_cflag & CSIZE) { case CS5: cval = UART_LCR_WLEN5; break; case CS6: cval = UART_LCR_WLEN6; break; case CS7: cval = ...
false
false
false
false
false
0
gib_list_randomize(gib_list * list) { int len, r, i; gib_list **farray, *f, *t; if (!list) return (NULL); len = gib_list_length(list); if (len <= 1) return (list); farray = (gib_list **) gib_emalloc(sizeof(gib_list *) * len); for (f = list, i = 0; f; f = f->next, i++) { farray...
false
false
false
false
true
1
brasero_volume_source_open_device_handle (BraseroDeviceHandle *handle, GError **error) { int size; BraseroVolSrc *src; BraseroScsiResult result; BraseroScsiGetConfigHdr *hdr = NULL; g_return_val_if_fail (handle != NULL, NULL); src = g_new0 (BraseroVolSrc, 1); src->ref = 1; src->data = handle; src->see...
false
false
false
false
false
0
to (bool right) { if (!deep()) host->split(half); history[layer()] = half; // FIXME pos = pos.to(right); layer_--; if ( (host->twist_mask >> layer()) & 1 ) right = !right; // twist it! half = (host->halves[half]<<1) + right; }
false
false
false
false
false
0
onAskForHideNodes(VisuData *visuData, gboolean *redraw, gpointer data _U_) { VisuColorization *dt; /* No data, useless to stay here. */ if (!flagDataFileIsLoaded) return; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkHideMinValues))) { DBG_fprintf(stderr, "Panel DataFile: caug...
false
false
false
false
false
0
gnrm_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_GenericSampleEntryBox *ptr = (GF_GenericSampleEntryBox *)s; //carefull we are not writing the box type but the entry type so switch for write ptr->type = ptr->EntryType; e = gf_isom_box_write_header(s, bs); if (e) return e; ptr->type = GF_ISOM_BOX_TYPE_GNR...
false
false
false
false
false
0
points (xfieldP xf, helperFunc helper, int firstConnection, int lastConnection, int face, enum approxE approx, int skip) { static int translation[8]; static float fscratch[3]; static long iscratch; int i = 0, c; dependencyT odep; int translu = 0; ENTRY(("points (0x%x, 0x%x, %d, %d, %d,...
false
false
false
false
false
0
enum_dump (mca_base_var_enum_t *self, char **out) { int i; char *tmp; int ret; *out = NULL; if (NULL == self) { return OPAL_ERROR; } tmp = NULL; for (i = 0; i < self->enum_value_count && self->enum_values[i].string ; ++i) { ret = asprintf (out, "%s%s%d:\"%s\"", tmp ? t...
false
false
false
false
false
0
listForeach(List root, void (*fun)(void*, void*), void* arg) { root = listBegin(root); while (root) { fun(root->v, arg); root = listNext(root); } }
false
false
false
false
false
0
uvc_video_stats_dump(struct uvc_streaming *stream, char *buf, size_t size) { unsigned int scr_sof_freq; unsigned int duration; struct timespec ts; size_t count = 0; ts.tv_sec = stream->stats.stream.stop_ts.tv_sec - stream->stats.stream.start_ts.tv_sec; ts.tv_nsec = stream->stats.stream.stop_ts.tv_nsec...
false
false
false
false
false
0
Listen(Sensor* s) { cursensor = s; if (window == nil) { /* can't set input interest without window */ return; } Mask m = ExposureMask; if (s != nil) { m |= s->mask; } WindowRep* w = window->rep(); XSelectInput(w->display_->rep()->display_, w->xwindow_, m); }
false
false
false
false
false
0
show (std::string name) { GtkWindow *dialog = GTK_WINDOW (get ("dialog")); // Update window manager decorations gboolean decorated = gtk_window_get_decorated (dialog); if (decorated != biff_->value_bool ("applet_use_decoration")) gtk_window_set_decorated (dialog, biff_->value_bool ("applet_use_decorati...
false
false
false
false
false
0
pline(P *p, long line) { if (line > p->b->eof->line) { pset(p, p->b->eof); return p; } if (line < labs(p->line - line)) pset(p, p->b->bof); if (labs(p->b->eof->line - line) < labs(p->line - line)) pset(p, p->b->eof); if (p->line == line) { p_goto_bol(p); return p; } while (line > p->line) pnextl(p)...
false
false
false
false
false
0
SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len) { sslSocket * ss; SSLChannelInfo inf; sslSessionID * sid; if (!info || len < sizeof inf.length) { PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } ss = ssl_FindSocket(fd); if (!ss) { SSL_DBG(("%d:...
false
false
false
false
false
0