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
nextLine(const QString &line) { if (!line.startsWith(QLatin1String("[GNUPG:]"))) { return notHandled; } if (line.contains(QLatin1String( "ALREADY_SIGNED" ))) { asTransaction()->setSuccess(TS_ALREADY_SIGNED); return handledFalse; } else if (line.contains(QLatin1String( "GOOD_PASSPHRASE" ))) { asTransaction...
false
false
false
false
false
0
gnc_book_write_accounts_to_xml_file_v2( QofBackend *be, QofBook *book, const char *filename) { FILE *out; gboolean success = TRUE; out = g_fopen(filename, "w"); /* Try to write as much as possible */ if (!out || !gnc_book_write_accounts_to_xml_filehandle_v2 (be, book, out) ...
false
false
false
false
false
0
sil24_exec_polled_cmd(struct ata_port *ap, int pmp, const struct ata_taskfile *tf, int is_cmd, u32 ctrl, unsigned long timeout_msec) { void __iomem *port = sil24_port_base(ap); struct sil24_port_priv *pp = ap->private_data; struct sil24_prb *prb = &pp->cmd_block[0].ata.prb; dma_addr_t paddr = pp->cmd...
false
false
false
false
false
0
uv_async_init(uv_loop_t* loop, uv_async_t* async, uv_async_cb async_cb) { uv__handle_init(loop, (uv_handle_t*)async, UV_ASYNC); loop->counters.async_init++; ev_async_init(&async->async_watcher, uv__async); async->async_cb = async_cb; /* Note: This does not have symmetry with the other libev wrappers. */ e...
false
false
false
false
false
0
ucs2_to_utf8(const gchar *data, guint len) { const gchar *encoding = NULL; guint16 c; gboolean be; gchar *utf8 = NULL; memcpy (&c, data, 2); switch (c) { case 0xfeff: case 0xfffe: be = (G_BYTE_ORDER == G_BIG_ENDIAN); be = (c == 0xfeff) ? be : !be; encoding = be ? "UCS-2BE" : "UCS-2LE"; data += 2; l...
false
false
false
false
false
0
set_config () { int result = 0; static int server_started; phase_scope_init (); /* Build the Phase Scope GCs */ draw_arc (); /* redraw the phase scope circle */ if (server_started == 0) { server_started = 1; if (strlen (ini_settings.ptt_device) != 0) result = server_main (ini_settings.audi...
false
false
false
false
false
0
ensure_dir_exists (const char *dir) { if (g_file_test (dir, G_FILE_TEST_IS_DIR)) return TRUE; if (g_mkdir_with_parents (dir, 0700) == 0) { /* If the folder is created try migrating from the old folder */ migrate_config_folder (dir); return TRUE; } if (errno == EEXIST) return g_file_test (dir, G_FILE_TES...
false
false
false
false
false
0
createWrapperObject(int prim_type_no, void *pntr, int flags) { static char *wrapper_names[] = {"java/lang/Boolean", "java/lang/Byte", "java/lang/Character", "java/lang/Short", ...
false
false
false
false
false
0
static_compare_length (const void *a, const void *b) { int *sequence_a = (int *) a; int *sequence_b = (int *) b; /******************************************************* * elements are swaped if the return value is positive * *******************************************************/ if (sequence_a[0] > sequence_b[0]...
false
false
false
false
false
0
fps(const struct v4l2_bt_timings *t) { if (!V4L2_DV_BT_FRAME_HEIGHT(t) || !V4L2_DV_BT_FRAME_WIDTH(t)) return 0; return DIV_ROUND_CLOSEST((unsigned)t->pixelclock, V4L2_DV_BT_FRAME_HEIGHT(t) * V4L2_DV_BT_FRAME_WIDTH(t)); }
false
false
false
false
false
0
divide_bits(unsigned long*ap, unsigned long*bp, unsigned wid) { // Do all our work a cpu-word at a time. The "words" variable // is the number of words of the wid. unsigned words = (wid+CPU_WORD_BITS-1) / CPU_WORD_BITS; unsigned btop = words-1; while (btop > 0 && bp[btop] == 0) btop -= 1; //...
false
false
false
false
false
0
RemoveToken(int idx) { if (idx<0 || (size_t)idx >= m_Tokens.size()) return; RemoveToken(m_Tokens[idx]); }
false
false
false
false
false
0
hash(char *s) { unsigned h, g; h = 0; while (*s != '\0') { h = (h << 4) + *s++; g = h & 0xF0000000; if (g != 0) { h ^= g >> 24; h ^= g; } } return h; }
false
false
false
false
false
0
setBreakCount(s,n) /* set skip count value for breakpoint */ String s; Int n; { Breakpt b = findBreakpt(s); if (b >= BRKMIN) breakpt(b).count = n; }
false
false
false
false
false
0
init(const RBBIDataHeader *data, UErrorCode &status) { if (U_FAILURE(status)) { return; } fHeader = data; if (fHeader->fMagic != 0xb1a0 || fHeader->fFormatVersion[0] != 3) { status = U_INVALID_FORMAT_ERROR; return; } // Note: in ICU version 3.2 and earlier, there was...
false
false
false
false
false
0
get_history(char *nick, time_t timelimit) { Reg aName *wp, *wp2; wp = wp2 = &was[ww_index]; timelimit = timeofday - timelimit; do { if (wp == was) { wp = was + ww_size; } wp--; if (wp->ww_logout < timelimit) { /* no point in checking more, only old or unused * entry's left. */ return NU...
false
false
false
false
false
0
from_tk_ReadGridHData(ClientData clientData, Tcl_Interp *interp, int argc, char* argv[]) { Model* model = theControlCenter->getModel(); if (model == NULL) { TheUI->errMsg(0, "ReadGridHData: Command not legal. No model exists!"); return TCL_OK; } //----GridH data setParameterData(model, EC...
false
false
false
false
false
0
usr_cache_compare_fn(const void *v1, const void *v2) { UserCacheObj *usrObj1 = (UserCacheObj *)v1; UserCacheObj *usrObj2 = (UserCacheObj *)v2; if (usrObj1->derCert && usrObj2->derCert) return usr_cache_compare_certs(usrObj1->derCert, usrObj2->derCert); else if (!usrObj1->derCert && !usrObj2->derCert) ...
false
false
false
false
false
0
cbf_write_saveframename (const cbf_node *saveframe, cbf_file *file) { /* Does the node exist? */ if (!saveframe) return CBF_ARGUMENT; /* Write the name */ if (saveframe->name) { cbf_failnez (cbf_write_st...
false
false
false
false
false
0
OnMouseMove() { // See whether we're active if ( this->State == vtkBrokenLineWidget::Outside || this->State == vtkBrokenLineWidget::Start ) { return; } int X = this->Interactor->GetEventPosition()[0]; int Y = this->Interactor->GetEventPosition()[1]; // Do different things depending on sta...
false
false
false
false
false
0
deltaR ( const HepLorentzVector & w ) const { double a = eta() - w.eta(); double b = pp.deltaPhi(w.getV()); return std::sqrt ( a*a + b*b ); }
false
false
false
false
false
0
unregister_engine (GConfEngine *conf) { g_return_if_fail (engines_by_address != NULL); g_assert (conf->persistent_address != NULL); g_hash_table_remove (engines_by_address, conf->persistent_address); g_free (conf->persistent_address); conf->persistent_address = NULL; if (g_hash_table_size (engines_by_add...
false
false
false
false
false
0
efreet_menu_merge_dir(Efreet_Menu_Internal *parent, Efreet_Xml *xml, const char *path) { Eina_Iterator *it; Eina_File_Direct_Info *info; if (!parent || !xml || !path) return 0; /* check to see if we've merged this directory already */ if (eina_hash_find(efreet_merged_dirs, path)) return 1; ein...
false
false
false
false
false
0
camel_vee_summary_replace_flags (CamelVeeSummary *summary, const gchar *uid) { CamelMessageInfo *mi; CamelVeeMessageInfo *vmi; g_return_if_fail (CAMEL_IS_VEE_SUMMARY (summary)); g_return_if_fail (uid != NULL); camel_folder_summary_lock (&summary->summary, CAMEL_FOLDER_SUMMARY_SUM...
false
false
false
false
false
0
_check_standard_fds(void) { int err = is_valid_fd(STDERR_FILENO); if (!is_valid_fd(STDIN_FILENO) && !(stdin = fopen(_PATH_DEVNULL, "r"))) { if (err) perror("stdin stream open"); else printf("stdin stream open: %s\n", strerror(errno)); return 0; } if (!is_valid_fd(STDOUT_FILENO) && ...
true
true
false
false
true
1
ddf_get_matrix_storage_size_sparse(int storageType, int n, matrix_description_struct* matrix) { size_t storageSize = 0; switch(storageType) { case MATRIX_STORAGE_TYPE_FULL: storageSize = n*n*sizeof(ergo_real); break; case MATRIX_STORAGE_TYPE_TRIANGLE: storageSize = (n * (n+1) / 2) * si...
false
false
false
false
false
0
read_file(File* filePtr) { if (!read_with_record_size(filePtr, this, &visit_tornado<FileReaderVisitor>, TORNADO_RECORD_SIZE)) return 0; //------------ post-process the data read ----------// sprite_info = sprite_res[sprite_id]; sprite_info->load_bitmap_res(); return 1; }
false
false
false
false
false
0
alarm_alarm (Alarm *alarm) { g_debug ("Alarm(%p) #%d: alarm() DING!", alarm, alarm->id); // Clear first, if needed alarm_clear (alarm); // Update triggered flag alarm->triggered = TRUE; // Do we want to repeat this alarm? if (alarm_should_repeat (alarm)) { g_debug ("Alarm(%p) #%d: alarm() R...
false
false
false
false
false
0
fsm_var_bind_stmt( statement* stmt, /*!< Pointer to statement to bind */ const char* funit_name /*!< String name of functional unit which will contain stmt */ ) { PROFILE(FSM_VAR_BIND_STMT); bool retval = FALSE; /* Return value for this function */ funit_link* funitl; /* Pointer to fou...
false
false
false
false
false
0
xid(Display* d, WindowVisual* wv) { if (display_ != d) { if (xcursor_ != 0) { XFreeCursor(display_->rep()->display_, xcursor_); } Style* s = d->style(); if (fg_ == nil) { fg_ = make_color( d, s, "pointerColor", "foreground", "Foreground", "#000000" ); } if (bg_ == nil) { bg_ = make_col...
false
false
false
false
false
0
nand_write_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip, int page) { int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; int eccsize = chip->ecc.size, length = mtd->oobsize; int i, len, pos, status = 0, sndcmd = 0, steps = chip->ecc.steps; const uint8_t *bufpoi = chip->oob_poi; ...
false
false
false
false
false
0
operator<<(OMSTREAM& o, LANGUAGE* x) { if (x) { return (o << x->name()); }else{ return (o << "none"); } }
false
false
false
false
false
0
stringFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeString; _value.asString = new std::string(XmlRpcUtil::xmlDecode(valueXml.substr(*offset, valueEnd-*offset))); ...
false
false
false
false
false
0
s_intersects (BoxObj& userb, Graphic* gs) { Coord* convx, *convy; BoxObj b; boolean result = false; getBox(b, gs); if (b.Intersects(userb)) { convx = new Coord[count()]; convy = new Coord[count()]; transformList(x(), y(), count(), convx, convy, gs); MultiLineObj ml (convx, convy, count()); res...
false
false
false
false
false
0
f2c_v2imap(int ncid, int varid, const int* fimap, ptrdiff_t* cimap) { int rank; nc_type datatype; if (nc_inq_vartype(ncid, varid, &datatype) || nc_inq_varndims(ncid, varid, &rank) || rank <= 0) { return NULL; } /* else */ if (fimap[0] == 0) { /* * Special Fortran version 2 semant...
false
false
false
false
false
0
itemAtIndex(int index) { if (index<0) return 0; int j(0); for (Q3ListViewItemIterator it=firstChild(); it.current(); ++it) { if (j==index) return it.current(); ++j; }; return 0; }
false
false
false
false
false
0
ubi_early_get_peb(struct ubi_device *ubi, struct ubi_attach_info *ai) { int err = 0; struct ubi_ainf_peb *aeb, *tmp_aeb; if (!list_empty(&ai->free)) { aeb = list_entry(ai->free.next, struct ubi_ainf_peb, u.list); list_del(&aeb->u.list); dbg_bld("return free PEB %d, EC %d", aeb->pnum, aeb->ec); re...
false
false
false
false
false
0
rfc959_close_data_connection (gftp_request * request) { rfc959_parms * parms; g_return_if_fail (request != NULL); parms = request->protocol_data; if (parms->data_connection != -1) { close (parms->data_connection); parms->data_connection = -1; } }
false
false
false
false
false
0
gtk_source_gutter_renderer_activate (GtkSourceGutterRenderer *renderer, GtkTextIter *iter, GdkRectangle *area, GdkEvent *event) { g_return_if_fail (GTK_SOURCE_IS_GUTTER_R...
false
false
false
false
false
0
operator*(const R4Matrix& a, const R4Matrix& b) { R4Matrix result; int r, c; // Multiply matrix for (r=0; r<4; r++) for (c=0; c<4; c++) result.m[r][c] = a.m[r][0] * b.m[0][c] + a.m[r][1] * b.m[1][c] + a.m[r][2] * b.m[2][c] + a.m[r][3] * b.m[3][c]; // Return result return ...
false
false
false
false
false
0
apply_policy_on_type( enum connman_session_type policy, enum connman_session_type type) { if (type == CONNMAN_SESSION_TYPE_UNKNOWN) return CONNMAN_SESSION_TYPE_UNKNOWN; if (policy == CONNMAN_SESSION_TYPE_ANY) return type; if (policy == CONNMAN_SESSION_TYPE_LOCAL) return CONNMAN_SESSION_TYPE_LOCAL; re...
false
false
false
false
false
0
FDKaacEnc_findBestBook( const INT* const bc, INT* const book, const INT useVCB11 ) { INT minBits = INVALID_BITCOUNT, j; int end = CODE_BOOK_ESC_NDX; for (j = 0; j <= end; j++) { if (bc[j] < minBits) { minBits = bc[j]; ...
false
false
false
false
false
0
int_to_base10(int val) { static char buf_base10[17]; int p = 0; int i = 16; buf_base10[16] = 0; if (!val) { buf_base10[15] = '0'; return buf_base10 + 15; } if (val < 0) { p = 1; val *= -1; } while (val) { i--; buf_base10[i] = '0' + (val % 10); val /= 10; } if (p) { ...
false
false
false
false
false
0
gst_audio_cd_src_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstAudioCdSrc *src = GST_AUDIO_CD_SRC (object); GST_OBJECT_LOCK (src); switch (prop_id) { case ARG_MODE:{ src->priv->mode = g_value_get_enum (value); break; } case ARG_DEVICE:{...
false
false
false
false
false
0
copy_new_to_old() { interp_list *current, *new_old, *prev_old; /* Loop through the list of current interpretations and copy them */ /* to a list of old interpretations */ current = current_interps->next_interp; prev_old = old_interps; while (current != NULL) { if ((new_old = (interp_list *) malloc(...
false
false
false
false
false
0
ocrdma_reg_mr(struct ocrdma_dev *dev, struct ocrdma_hw_mr *hwmr, u32 pdid, int acc) { int status; u32 last = 0; u32 cur_pbl_cnt, pbl_offset; u32 pending_pbl_cnt = hwmr->num_pbls; pbl_offset = 0; cur_pbl_cnt = min(pending_pbl_cnt, MAX_OCRDMA_NSMR_PBL); if (cur_pbl_cnt == pending_pbl_cnt) last = 1; status...
false
false
false
false
false
0
VisitStatementsAndSpill(ZoneList<Statement*>* statements) { #ifdef DEBUG int original_height = frame_->height(); #endif ASSERT(in_spilled_code()); set_in_spilled_code(false); VisitStatements(statements); if (frame_ != NULL) { frame_->SpillAll(); } set_in_spilled_code(true); ASSERT(!has_valid_frame(...
false
false
false
false
false
0
__secure_computing(void) { u32 phase1_result = seccomp_phase1(NULL); if (likely(phase1_result == SECCOMP_PHASE1_OK)) return 0; else if (likely(phase1_result == SECCOMP_PHASE1_SKIP)) return -1; else return seccomp_phase2(phase1_result); }
false
false
false
false
false
0
radeon_driver_irq_postinstall_kms(struct drm_device *dev) { struct radeon_device *rdev = dev->dev_private; if (ASIC_IS_AVIVO(rdev)) dev->max_vblank_count = 0x00ffffff; else dev->max_vblank_count = 0x001fffff; return 0; }
false
false
false
false
false
0
displayFromChain(int i) { const QSslCertificate &cert = d->certificateChain[i]; QString trusted; if (!d->certificateErrors[i].isEmpty()) { trusted = i18nc("The certificate is not trusted", "NO, there were errors:"); foreach (KSslError::Error e, d->certificateErrors[i]) { KSslErr...
false
false
false
false
false
0
intersects(const Ray& ray ) { // Only check if portal is enabled if (mEnabled) { if (mType == PORTAL_TYPE_QUAD) { // since ogre doesn't have built in support for a quad, I'm going to first // find the intersection point (if any) of the ray and the portal plane. Then ...
false
false
false
false
false
0
chrif_searchcharid(int char_id) { if (char_fd < 0) return; WFIFOW(char_fd,0)=0x2b08; WFIFOL(char_fd,2)=char_id; WFIFOSET(char_fd,6); return; }
false
false
false
false
false
0
eel_canvas_w2c (EelCanvas *canvas, double wx, double wy, int *cx, int *cy) { double zoom; g_return_if_fail (EEL_IS_CANVAS (canvas)); zoom = canvas->pixels_per_unit; if (cx) *cx = floor ((wx - canvas->scroll_x1)*zoom + canvas->zoom_xofs + 0.5); if (cy) *cy = floor ((wy - canvas->scroll_y1)*zoom + canvas->z...
false
false
false
false
false
0
ini_config_changed(struct ini_cfgfile *file_ctx1, struct ini_cfgfile *file_ctx2, int *changed) { TRACE_FLOW_ENTRY(); if ((file_ctx1 == NULL) || (file_ctx2 == NULL) || (changed == NULL)) { TRACE_ERROR_NUMBER("Invalid parameter.", EINVAL); ...
false
false
false
false
false
0
process_reply(int reply_id, char *reply, char *reply_buf, void *bin_reply, int bin_size, int *last_reply_id, int *reply_slot, struct slave_state *sstate) { /* Resend everything if slave returned an error. */ if (*reply != '=') { *last_reply_id = -1; return true; } /* Make sure we are still in sync...
false
true
false
false
true
1
hfield_free(header_field_t *h) { header_field_check(h); slist_free_all(&h->lines, hfield_free_item); HFREE_NULL(h->name); h->magic = 0; WFREE(h); }
false
false
false
false
false
0
layout_geometry_get_dividers(LayoutWindow *lw, gint *h, gint *v) { if (!layout_valid(&lw)) return FALSE; if (lw->h_pane && GTK_PANED(lw->h_pane)->child1->allocation.x >= 0) { *h = GTK_PANED(lw->h_pane)->child1->allocation.width; } else if (h != &lw->options.main_window.hdivider_pos) { *h = lw->options.mai...
false
false
false
false
false
0
arg_pri(char *arg) { int n = atoi(arg); if (had_pri) SPQ.spq_pri = (unsigned char) (n + SPQ.spq_pri); else { SPQ.spq_pri = (unsigned char) n; had_pri = 1; } }
false
false
false
false
false
0
qlafx00_prep_cont_type1_iocb(struct req_que *req, cont_a64_entry_t *lcont_pkt) { cont_a64_entry_t *cont_pkt; /* Adjust ring index. */ req->ring_index++; if (req->ring_index == req->length) { req->ring_index = 0; req->ring_ptr = req->ring; } else { req->ring_ptr++; } cont_pkt = (cont_a64_entry_t *...
false
false
false
false
false
0
RunMenu(int is_startup) { int start_menu = is_startup ? MENU_STARTUP : MENU_ESCAPE; SetCurrentFont(Menu_BFont); Activate_Conservative_Frame_Computation(); if (is_startup) { // Can the music be disabled by a submenu ? SwitchBackgroundMusicTo(MENU_BACKGROUND_MUSIC_SOUND); SDL_SetClipRect(Screen, NULL); if (s...
false
false
false
false
false
0
cpl_propertylist_prepend_long_long(cpl_propertylist *self, const char *name, long long value) { cpl_property *property = NULL; if (self == NULL || name == NULL) { return cpl_error_set_(CPL_ERROR_NULL_INPUT); } property = cpl_property_new(name, CPL_TYPE_LON...
false
false
false
false
false
0
usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message) { struct dsbr100_device *radio = usb_get_intfdata(intf); mutex_lock(&radio->v4l2_lock); if (!radio->muted && dsbr100_stop(radio) < 0) dev_warn(&intf->dev, "dsbr100_stop failed\n"); mutex_unlock(&radio->v4l2_lock); dev_info(&intf->dev, "going...
false
false
false
false
false
0
list_all(int argc, char* argv[], bool crc) { string file(argv[0]); for(int i=0;i<argc;++i) { list_single(argv[i], crc); } }
false
false
false
false
false
0
free_var_map_head(Var_map *vmh) { Var_map *vm, *vmnext; for (vm = vmh; vm != NULL; vm = vmnext) { vmnext = vm->next; vm->next = NULL; free_var_map(vm); vm = NULL; } }
false
false
false
false
false
0
I_alloc_double3(int a, int b, int c) { double ***x; int i, n; x = (double ***)G_malloc((a + 1) * sizeof(double **)); for (i = 0; i < a; i++) { x[i] = I_alloc_double2(b, c); if (x[i] == NULL) { for (n = 0; n < i; n++) G_free(x[n]); G_free(x); return (double ***)NULL; } } x[...
false
false
false
false
false
0
real_unmerge_menus (NautilusView *view) { GtkUIManager *ui_manager; ui_manager = nautilus_view_get_ui_manager (view); if (ui_manager == NULL) { return; } nautilus_ui_unmerge_ui (ui_manager, &view->details->dir_merge_id, &view->details->dir_action_group); nautilus_ui_unmerge_ui (ui_manager, &view->...
false
false
false
false
false
0
jid() const { XMPP::Jid jid; jid.set(ui_.host->text(), ui_.room->text()); return jid; }
false
false
false
false
false
0
masterconf_init(const char *ident, const char *alt_config) { char *buf; const char *prefix; /* Open the log file with the appropriate facility so we * correctly log any config errors */ openlog(ident, LOG_PID, SYSLOG_FACILITY); config_ident = ident; config_read(alt_config); prefix =...
true
true
false
false
false
1
dfb_layer_context_set_clip_regions( CoreLayerContext *context, const DFBRegion *regions, int num_regions, DFBBoolean positive ) { DFBResult ret; CoreLayerRegionConfig ...
false
false
false
false
false
0
getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal) { // Construct the context before querying for the existence of the DIE in case // such construction creates the DIE (as is the case for member function // declarations). DIE *ContextDIE = Minimal ? &getUnitDie() : getOrCreateContextDIE(resolv...
false
false
false
false
false
0
__pyx_pw_9lightning_4impl_14primal_cd_fast_7Squared_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_verbose = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupCont...
false
false
false
false
false
0
conv_filename_from_utf8(const gchar *utf8_file) { gchar *fs_file; GError *error = NULL; fs_file = g_filename_from_utf8(utf8_file, -1, NULL, NULL, &error); if (error) { debug_print("failed to convert encoding of file name: %s\n", error->message); g_error_free(error); } if (!fs_file) fs_file = g_strdup(...
false
false
false
false
false
0
_cl5CanTrim (time_t time, long *numToTrim) { *numToTrim = 0; if (s_cl5Desc.dbTrim.maxAge == 0 && s_cl5Desc.dbTrim.maxEntries == 0) return PR_FALSE; if (s_cl5Desc.dbTrim.maxAge == 0) { *numToTrim = cl5GetOperationCount (NULL) - s_cl5Desc.dbTrim.maxEntries; return ( *numToTrim > 0 ); } if (s_cl5Desc....
false
false
false
false
false
0
print_buffer(unsigned char pbuffer[]) { unsigned int i, l; for (i = 0, l = 0; i < sector_size; i++, l++) { if (l == 0) printf("0x%03X:", i); printf(" %02X", pbuffer[i]); if (l == MAX_PER_LINE - 1) { printf("\n"); l = -1; } } if (l > 0) printf("\n"); printf("\n"); }
false
false
false
false
false
0
hisv6_ctl(void *history, int selector, void *val) { struct hisv6 *h = history; bool r = true; switch (selector) { case HISCTLG_PATH: *(char **)val = h->histpath; break; case HISCTLS_PATH: if (h->histpath) { hisv6_seterror(h, concat("path already set in handle", NULL)); r = false; } e...
false
false
false
false
false
0
posFromIndent(FXint start,FXint indent) const { register FXint pos=start; register FXint in=0; register FXwchar c; FXASSERT(0<=start && start<=length); while(in<indent && pos<length){ c=getChar(pos); if(c=='\n'){ break; } else if(c=='\t'){ in+=(tabcolumns-in%tabcolumns); } ...
false
false
false
false
false
0
DeEscapeString(const char *str) { ASSERT(str); char *newstr = new char[STRLEN(str) + 1]; char c, *pnew = newstr; const char *pstr = str; while ( (c = *pstr) ) { switch (c) { case '\\': pstr++; switch (*pstr) { case 'n': *pnew = '\n'; break; /* '\n' */ case 't'...
false
false
false
false
false
0
intel_guc_ucode_init(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw; const char *fw_path; if (!HAS_GUC_SCHED(dev)) i915.enable_guc_submission = false; if (!HAS_GUC_UCODE(dev)) { fw_path = NULL; } else if (IS_SKYLAKE(dev)) {...
false
false
false
false
false
0
transformCreateStmt(CreateStmt *stmt, const char *queryString) { ParseState *pstate; CreateStmtContext cxt; List *result; List *save_alist; ListCell *elements; /* * We must not scribble on the passed-in CreateStmt, so copy it. (This is * overkill, but easy.) */ stmt = (CreateStmt *) copyObject(st...
false
false
false
false
false
0
isns_policy_validate_source(const isns_policy_t *policy, const isns_source_t *source) { const char *src_name = isns_source_name(source); int rv = 0; if (!__validate_node_name(policy, src_name)) goto reject; rv = 1; reject: isns_debug_auth(":: policy %s source %s %s\n", policy->ip_name, src_name, rv? "...
false
false
false
false
false
0
getSentValue(TxInRef & txin) { if(txin.isCoinbase()) return -1; return getPrevTxOut(txin).getValue(); }
false
false
false
false
false
0
init_game(void) { void make_map(void), place_cities(void); count_t i; kill_display (); /* nothing on screen */ automove = false; resigned = false; debug = false; print_debug = false; print_vmap = false; trace_pmap = false; save_movie = false; win = no_win; date = 0; /* ...
false
false
false
false
false
0
node_check_remote_ip_header(const host_addr_t peer, header_t *head) { host_addr_t addr; g_assert(head != NULL); /* * Remote-IP -- IP address of this node as seen from remote node * * Modern nodes include our own IP, as they see it, in the * handshake headers and reply, whether it indicates a success or not...
false
false
false
false
false
0
extend_affine_hull(struct isl_tab *tab, __isl_take isl_basic_set *hull, __isl_keep isl_basic_set *bset) { int i, j; unsigned dim; if (!tab || !hull) goto error; dim = tab->n_var; if (isl_tab_extend_cons(tab, 2 * dim + 1) < 0) goto error; for (i = 0; i < dim; ++i) { struct isl_vec *sample; struct isl_...
false
false
false
false
false
0
imProcessLocalMaxThreshold(const imImage* src_image, imImage* dst_image, int ks, int min_thres) { int ret = 0; int counter = imProcessCounterBegin("Local Max Threshold"); imCounterTotal(counter, src_image->depth*src_image->height, "Filtering..."); thresAux = min_thres; switch(src_image->data_type) { cas...
false
false
false
false
false
0
Clear() { /* Closing the cursor if opened */ if( m_hStmt != NULL ) SQLFreeStmt( m_hStmt, SQL_CLOSE ); ClearColumnData(); if( m_pszStatement != NULL ) { CPLFree( m_pszStatement ); m_pszStatement = NULL; } m_nStatementLen = 0; m_nStatementMax = 0; m_nCo...
false
false
false
false
false
0
ktest_equal_fast_finished(krb5_fast_finished *ref, krb5_fast_finished *var) { int p = TRUE; if (ref == var) return TRUE; else if (ref == NULL || var == NULL) return FALSE; p = p && scalar_equal(timestamp); p = p && scalar_equal(usec); p = p && ptr_equal(client, ktest_equal_principal_data); p...
false
false
false
false
false
0
flush_interface_routes(struct interface *ifp, int v4only) { int i; i = 0; while(i < route_slots) { struct babel_route *r; r = routes[i]; while(r) { if(r->neigh->ifp == ifp && (!v4only || v4mapped(r->nexthop))) { flush_route(r); ...
false
false
false
false
false
0
lua_travstack (int (*fn)(TObject *)) { StkId i; for (i = (top-1)-stack; i>=0; i--) fn (stack+i); }
false
false
false
false
false
0
team_set_rx_mode(struct net_device *dev) { struct team *team = netdev_priv(dev); struct team_port *port; rcu_read_lock(); list_for_each_entry_rcu(port, &team->port_list, list) { dev_uc_sync_multiple(port->dev, dev); dev_mc_sync_multiple(port->dev, dev); } rcu_read_unlock(); }
false
false
false
false
false
0
StrAt ( const CurrentWord_t & Word, int iStart, int iLength, const char * szStr1, const char * szStr2, const char * szStr3, const char * szStr4, const char * szStr5 ) { if ( iStart < 0 || iStart >= Word.iLengthPadded ) return false; char * szPos = (char *)Word.pWord + iStart; return !strncmp ( szPos, szStr1, iLen...
false
false
false
false
false
0
ena_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, u64 *data) { struct ena_adapter *adapter = netdev_priv(netdev); const struct ena_stats *ena_stats; u64 *ptr; int i; for (i = 0; i < ENA_STATS_ARRAY_GLOBAL; i++) { ena_stats = &ena_stats_global_strings[i]; ptr = (u64 *)(...
false
false
false
false
false
0
identify_jump_threads (void) { basic_block bb; gimple dummy; int i; edge e; /* Ugh. When substituting values earlier in this pass we can wipe the dominance information. So rebuild the dominator information as we need it within the jump threading code. */ calculate_dominance_info (CDI_DOMINATOR...
false
false
false
false
false
0
getInstanceVarInfo(StackHandler & sa,VarRefPtr & vr,SQUserPointer & data) { HSQOBJECT ho = sa.GetObjectHandle(1); SquirrelObject instance(ho); #ifdef _DEBUG SQObjectType type = (SQObjectType)sa.GetType(2); #endif const SQChar * el = sa.GetString(2); ScriptStringVar256 varNameTag; getVarNameTag(varNameTag,si...
false
false
false
false
false
0
ndmp_connection_tape_get_state( NDMPConnection *self, guint64 *blocksize, guint64 *file_num, guint64 *blockno) { g_assert(!self->startup_err); NDMP_TRANS_NO_REQUEST(self, ndmp4_tape_get_state) NDMP_CALL(self); if (reply->unsupported & NDMP4_TAPE_STATE_BLOCK_SIZE_UNS) *blocksize = 0; else *blo...
false
false
false
false
false
0
convert_dup2_x2(struct parse_context *ctx) { struct expression *value1, *value2, *value3, *value4; /* Refer to the JVM spec at http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc3.html#dup2_x2 */ value1 = stack_pop(ctx->bb->mimic_stack); value2 = stack_pop(ctx->bb->mimic_stack); if (value...
false
false
false
false
false
0
sys_fork(void) { int pid; struct proc *np; if((np = copyproc(cp)) == 0) return -1; pid = np->pid; np->state = RUNNABLE; return pid; }
false
false
false
false
false
0
gt_xfgetc(FILE *stream) { int cc; if ((cc = fgetc(stream)) == EOF) { if (ferror(stream)) { perror("cannot read char"); exit(EXIT_FAILURE); } } return cc; }
false
true
false
false
true
1
AcceptResult(const PGresult *result) { bool OK; if (!result) OK = false; else switch (PQresultStatus(result)) { case PGRES_COMMAND_OK: case PGRES_TUPLES_OK: case PGRES_EMPTY_QUERY: case PGRES_COPY_IN: case PGRES_COPY_OUT: /* Fine, do nothing */ OK = true; break; case PGRES_BAD_...
false
false
false
false
false
0
parse_num(const char *arg) { char *endptr; unsigned long long num; num = strtoull(arg, &endptr, 0); if (endptr == arg) { return -1; } if (*endptr == 'k' || *endptr == 'K') { if (num >= (-1ULL) / 1024) { return -1; } num *= 1024LL; endptr++; ...
false
false
false
false
false
0