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
vpn_connection_state_reason_to_string (NMVPNConnectionStateReason reason) { switch (reason) { case NM_VPN_CONNECTION_STATE_REASON_UNKNOWN: return _("unknown reason"); case NM_VPN_CONNECTION_STATE_REASON_NONE: return _("none"); case NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED: return _("the user was disco...
false
false
false
false
false
0
possible(void) #else Boolean possible() #endif { AltElem *alt[MAXPARAMS+2]; /* List of alt-pointers, one for each param */ int i; /* Parameter index */ fail = FALSE; alt[0] = findalt(header->vrbs, 0); /* Perform global checks */ if (alt[0] != 0 && alt[0]->checks != 0) { if (!trycheck(alt[0]->checks...
false
false
false
false
false
0
_gnutls_x509_write_attribute (const char *given_oid, ASN1_TYPE asn1_struct, const char *where, const void *_data, int sizeof_data) { char tmp[128]; int result; /* write the data (value) */ _gnutls_str_cpy (tmp, sizeof (tmp), where); _gnutls_str_...
false
false
false
false
false
0
vector_subtract_to(int n, real *x, real *y){ /* y = x-y */ int i; for (i = 0; i < n; i++) y[i] = x[i] - y[i]; return y; }
false
false
false
false
false
0
create_point_on_conic(void) { _conic *C; _point *val; double c, s, t; t = POPn; C = POP(_conic); c = Cos(C->d); s = Sin(C->d); get_mem(val, _point); switch (C->type) { case ELLIPSE: parametric_ellipse(&(val->x), &(val->y), t, C->x, C->y, C->a, C->b, c, s); break...
false
false
false
false
false
0
FindPageFromEditor(SEditorBase* eb) { for (size_t i = 0; i < m_pNotebook->GetPageCount(); ++i) { if (m_pNotebook->GetPage(i) == eb) return i; } return -1; }
false
false
false
false
false
0
void_stmts_gen(struct parser_params *parser, NODE *node) { if (!RTEST(ruby_verbose)) return; if (!node) return; if (nd_type(node) != NODE_BLOCK) return; for (;;) { if (!node->nd_next) return; void_expr0(node->nd_head); node = node->nd_next; } }
false
false
false
false
false
0
gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_trans *tr) { struct gfs2_bufdata *bd, *s; struct buffer_head *bh; list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, bd_ail_st_list) { bh = bd->bd_bh; gfs2_assert(sdp, bd->bd_tr == tr); if (buffer_busy(bh)) continue; if (!buffer_uptodate...
false
false
false
false
false
0
permissions() const { if (!d) return 0; return d->m_permissions; }
false
false
false
false
false
0
AeInstallLateHandlers ( void) { ACPI_STATUS Status; UINT32 i; #if (!ACPI_REDUCED_HARDWARE) if (!AcpiGbl_ReducedHardware) { /* Install a user SCI handler */ Status = AeInstallSciHandler (); AE_CHECK_OK (AeInstallSciHandler, Status); /* ...
false
false
false
false
false
0
main(int argc, char *argv[]) { CommandOptions options; if (!options.Parse(argc, argv)) { CommandOptions::ShowUsage(&std::cerr); return 1; } else if (options.help()) { CommandOptions::ShowUsage(&std::cerr); return 0; } const std::string &dic_file_name = options.dic_file_name(); const std::st...
false
false
false
false
false
0
botaddr_write_userfile(FILE *f, struct userrec *u, struct user_entry *e) { register struct bot_addr *bi = (struct bot_addr *) e->u.extra; if (fprintf(f, "--%s %s:%u/%u\n", e->type->name, bi->address, bi->telnet_port, bi->relay_port) == EOF) return 0; return 1; ...
false
false
false
false
false
0
stun_usage_turn_create_refresh (StunAgent *agent, StunMessage *msg, uint8_t *buffer, size_t buffer_len, StunMessage *previous_response, int32_t lifetime, uint8_t *username, size_t username_len, uint8_t *password, size_t password_len, StunUsageTurnCompatibility compatibility) { if (compatibility !...
false
false
false
false
false
0
cell_renderer_frame_icon_render(GtkCellRenderer *cell, GdkDrawable *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags) { CellRendererFrameIcon *cellframe = (CellRendererFrameIcon*) cell; GdkPixbuf *pixbuf = NULL; GdkRectangle...
false
false
false
false
false
0
count_array_dimention( int entry, symbol_kind kind, Element *use_id_ptr ) { Element *use_dim; Sub_data *use_sub; int i; i = 0; for( use_dim = use_id_ptr; use_dim; use_dim = use_dim->next_dim ){ for( use_sub = use_dim->sub_script; use_sub; use_sub = use_sub->next ){ if( (use_sub->kind == kind) && ...
false
false
false
false
false
0
finished(void) const { if (fio_repp->is_file_error() || !fio_repp->is_file_ready()) return true; return false; }
false
false
false
false
false
0
option_match(const char *a, const char *b) { g_assert(a); g_assert(b); for (;;) { if (underscore_to_hyphen(*a) != underscore_to_hyphen(*b)) return FALSE; if ('\0' == *a) break; a++; b++; } return TRUE; }
true
true
false
false
false
1
foo_scroll_area_init (FooScrollArea *scroll_area) { GtkWidget *widget; widget = GTK_WIDGET (scroll_area); gtk_widget_set_has_window (widget, FALSE); gtk_widget_set_redraw_on_allocate (widget, FALSE); scroll_area->priv = g_new0 (FooScrollAreaPrivate, 1); scroll_area->priv->width = 0; scroll_area->priv->...
false
false
false
false
false
0
shell_exec_download_add(struct gnutella_shell *sh, int argc, const char *argv[]) { const char *url; bool success; shell_check(sh); g_assert(argv); g_assert(argc > 0); if (argc < 3) { shell_set_msg(sh, _("URL missing")); goto error; } url = argv[2]; if (is_strcaseprefix(url, "http://")) { success = do...
false
false
false
false
false
0
check_crc(u8 *buf, int buflen) { u16 crc; crc = crc_ccitt(0xffff, buf, buflen - 2); crc = ~crc; if (buf[buflen - 2] != (crc & 0xff) || buf[buflen - 1] != (crc >> 8)) { pr_err(ST21NFCA_HCI_DRIVER_NAME ": CRC error 0x%x != 0x%x 0x%x\n", crc, buf[buflen - 1], buf[buflen - 2]); pr_info(DRIVER_D...
false
false
false
false
false
0
ShowLoop(BVertex *first) { int i, n; BVertex *p0; char buf[32]; FILE *foo; sprintf(buf, "bad%d.dx", nShow++); foo = fopen(buf, "w"); if ( foo ) { n = 0; p0 = first; do { n++; } while ((p0 = p0->next) != first); fprintf(foo, "object \"faces\" class array type int rank 0 ...
true
true
false
false
true
1
gogo_start (GsfXMLIn *xin, xmlChar const **attrs) { GogXMLReadState *state = (GogXMLReadState *)xin->user_state; xmlChar const *type = NULL, *role = NULL; GogObject *res; unsigned i; for (i = 0; attrs != NULL && attrs[i] && attrs[i+1] ; i += 2) if (0 == strcmp (attrs[i], "type")) type = attrs[i+1]; else if...
false
false
false
false
false
0
selectCurrent() { int x = lbx_proxy->currentItem(); if(x != -1) lbx_proxy->setSelected(x, true); }
false
false
false
false
false
0
lengthGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot &slot) { return jsNumber(static_cast<StringInstance*>(slot.slotBase())->internalValue()->value().size()); }
false
false
false
false
false
0
hydra_tobase64(unsigned char *buf, int buflen, int bufsize) { unsigned char small[3] = { 0, 0, 0 }; unsigned char big[5]; unsigned char *ptr = buf; int i = bufsize; unsigned int len = 0; unsigned char bof[i]; if (buf == NULL || strlen((char *) buf) == 0) return; bof[0] = 0; memset(big, 0, sizeof(...
true
true
false
false
false
1
_IO_old_do_write (fp, data, to_do) _IO_FILE *fp; const char *data; _IO_size_t to_do; { return (to_do == 0 || (_IO_size_t) old_do_write (fp, data, to_do) == to_do) ? 0 : EOF; }
false
false
false
false
false
0
gnc_ledger_display2_subaccounts (Account *account) { SplitRegisterType2 reg_type; GNCLedgerDisplay2 *ld; ENTER("account=%p", account); reg_type = gnc_get_reg_type (account, LD2_SUBACCOUNT); ld = gnc_ledger_display2_internal (account, NULL, LD2_SUBACCOUNT, reg...
false
false
false
false
false
0
NC_unimp(cp) CHANNEL *cp; { register char *p; char buff[SMBUF]; /* Nip off the first word. */ for (p = cp->In.Data; *p && !ISWHITE(*p); p++) continue; *p = '\0'; (void)sprintf(buff, "%d \"%s\" not implemented; try \"help\".", NNTP_BAD_COMMAND_VAL, MaxLength(cp->In.Data, cp->In.Data)...
false
false
false
false
false
0
add_event(MouseEvent *mouseEvent) { //---- call the game object to see if the mouse cursor icon needs to be changed, or if the nation selection square needs to be activated ----// power.mouse_handler(); //--------- update the mouse cursor ----------// mouse_cursor.process(cur_x, cur_y); // repaint mouse curs...
false
false
false
false
false
0
go_combo_set_tearoff_state (GOComboBox *combo, gboolean torn_off) { g_return_if_fail (combo != NULL); g_return_if_fail (GO_IS_COMBO_BOX (combo)); if (combo->priv->torn_off != torn_off) { combo->priv->torn_off = torn_off; if (combo->priv->torn_off) { go_combo_popup_tear_off (combo, TRUE); set_arr...
false
false
false
false
false
0
set_label_size_request (ButtonData *button_data) { gint width, height; GtkRequisition nat_req, bold_req; if (button_data->label == NULL) { return; } gtk_widget_get_preferred_size (button_data->label, NULL, &nat_req); gtk_widget_get_preferred_size (button_data->bold_label, &bold_req, NULL); width = MA...
false
false
false
false
false
0
about_cb (GtkWidget* widget, Application* self) { GtkAboutDialog* _tmp0_; GtkAboutDialog* _tmp2_; GtkAboutDialog* _tmp3_; GtkWindow* _tmp4_; GtkAboutDialog* _tmp5_; GtkAboutDialog* _tmp6_; const gchar* _tmp7_ = NULL; GtkAboutDialog* _tmp8_; GtkAboutDialog* _tmp9_; GtkAboutDialog* _tmp10_; GtkAboutDialog* _tm...
false
false
false
false
false
0
define_typealias(void) { char *id; type_datum_t *t; if (pass == 2) { while ((id = queue_remove(id_queue))) free(id); return 0; } id = (char *)queue_remove(id_queue); if (!id) { yyerror("no type name for typealias definition?"); return -1; } if (!is_id_in_scope(SYM_TYPES, id)) { yyerror2("type %s...
false
false
false
false
false
0
wsgi_acquire_interpreter(const char *name) { PyThreadState *tstate = NULL; PyInterpreterState *interp = NULL; InterpreterObject *handle = NULL; PyGILState_STATE state; /* * In a multithreaded MPM must protect the * interpreters table. This lock is only needed to * avoid a secondary ...
false
false
false
false
false
0
Indexdb_read_with_diagterm (int *nentries, T this, Storedoligomer_T oligo, int diagterm) { Genomicpos_T *positions; Positionsptr_T ptr0, end0, ptr; int i; #ifdef WORDS_BIGENDIAN if (this->offsetscomp_access == ALLOCATED) { ptr0 = Genome_offsetptr_from_gammas(&end0,this->gammaptrs,this->offsetscomp,this->of...
false
false
false
false
false
0
construct(const char *name) { P18F452 *p = new P18F452(name); if(verbose) cout << " 18F452 construct\n"; p->create(); p->create_invalid_registers(); p->create_symbols(); return p; }
false
false
false
false
false
0
calcNumMI(int Opc, int ExtraOpc, unsigned Bytes, unsigned NumBits, unsigned Scale) { unsigned NumMIs = 0; unsigned Chunk = ((1 << NumBits) - 1) * Scale; if (Opc == ARM::tADDrSPi) { unsigned ThisVal = (Bytes > Chunk) ? Chunk : Bytes; Bytes -= ThisVal; NumMIs++; NumBits = ...
false
false
false
false
false
0
InitQueryHashTable(void) { HASHCTL hash_ctl; MemSet(&hash_ctl, 0, sizeof(hash_ctl)); hash_ctl.keysize = NAMEDATALEN; hash_ctl.entrysize = sizeof(PreparedStatement); prepared_queries = hash_create("Prepared Queries", 32, &hash_ctl, HASH_ELEM); }
false
false
false
false
false
0
pmcraid_cancel_hcam( struct pmcraid_cmd *cmd, u8 type, void (*cmd_done) (struct pmcraid_cmd *) ) { struct pmcraid_instance *pinstance; struct pmcraid_hostrcb *hcam; pinstance = cmd->drv_inst; hcam = (type == PMCRAID_HCAM_CODE_LOG_DATA) ? &pinstance->ldn : &pinstance->ccn; /* prepare for cancelling previou...
false
false
false
false
false
0
gda_postgres_blob_op_new (GdaConnection *cnc) { GdaPostgresBlobOp *pgop; g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL); pgop = g_object_new (GDA_TYPE_POSTGRES_BLOB_OP, NULL); pgop->priv->cnc = cnc; return GDA_BLOB_OP (pgop); }
false
false
false
false
false
0
press(const Event& e) { OL_Stepper::press(e); if (!forward_ && !backward_) { dragging_ = true; glyph_->flip_to(dragging); } }
false
false
false
false
false
0
qlcnic_detach_work(struct work_struct *work) { struct qlcnic_adapter *adapter = container_of(work, struct qlcnic_adapter, fw_work.work); struct net_device *netdev = adapter->netdev; u32 status; netif_device_detach(netdev); /* Dont grab rtnl lock during Quiscent mode */ if (adapter->dev_state == QLCNIC_DEV_NE...
false
false
false
false
false
0
get_language (GtkTextBuffer *buffer, const gchar *filename) { GtkSourceLanguage *language = NULL; GtkTextIter start; GtkTextIter end; gchar *text; gchar *lang_string; gtk_text_buffer_get_start_iter (buffer, &start); end = start; gtk_text_iter_forward_line (&end); #define LANG_STRING "gtk-source-lang:...
false
false
false
false
false
0
gen8_ppgtt_enable(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; struct intel_engine_cs *ring; int j; for_each_ring(ring, dev_priv, j) { u32 four_level = USES_FULL_48BIT_PPGTT(dev) ? GEN8_GFX_PPGTT_48B : 0; I915_WRITE(RING_MODE_GEN7(ring), _MASKED_BIT_ENABLE(GFX_PPGTT_ENA...
false
false
false
false
false
0
oom_adj_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file_inode(file)); char buffer[PROC_NUMBUF]; int oom_adj = OOM_ADJUST_MIN; size_t len; unsigned long flags; if (!task) return -ESRCH; if (lock_task_sighand(task, &flags)) { if (tas...
false
false
false
false
false
0
video_orc_unpack_NV24 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n) { OrcExecutor _ex, *ex = &_ex; static volatile int p_inited = 0; static OrcCode *c = 0; void (*func) (OrcExecutor *); if (!p_inited) { orc_once_mutex_lock (); if (!p_inited) { ...
false
false
false
false
false
0
json_array_clear(json_t *json) { json_array_t *array; unsigned int i; if(!json_is_array(json)) return -1; array = json_to_array(json); for(i = 0; i < array->entries; i++) json_decref(array->table[i]); array->entries = 0; return 0; }
false
false
false
false
false
0
saa7127_set_input_type(struct v4l2_subdev *sd, int input) { struct saa7127_state *state = to_state(sd); switch (input) { case SAA7127_INPUT_TYPE_NORMAL: /* avia */ v4l2_dbg(1, debug, sd, "Selecting Normal Encoder Input\n"); state->reg_3a_cb = 0; break; case SAA7127_INPUT_TYPE_TEST_IMAGE: /* color bar */ v...
false
false
false
false
false
0
usage(int status, const char *program_name) { if (status != 0) { fprintf(stderr, "Wrong input parameters," " try %s -h' for more information.\n", program_name); } else { fprintf(stdout, "Usage: %s [-h] [-s] [-b file] "\ "[-w file] [-f output_file] "\ "[controller] [...]\n", program_name); fprintf(st...
false
false
false
false
false
0
io_popen (lua_State *L) { const char *filename = luaL_checkstring(L, 1); const char *mode = luaL_optstring(L, 2, "r"); FILE **pf = newfile(L); *pf = lua_popen(L, filename, mode); return (*pf == NULL) ? pushresult(L, 0, filename) : 1; }
false
false
false
false
false
0
get_jmp_target_post_dominater( Block *bpt ) { Block *target; for( target = get_next_1suc(bpt); target; target = get_next_1suc(target) ){ if( target->oneway_type != SPB || target->no == 1 || ( target->ncfsuc == 0 && (in_IntSet(bpt->post_dom, ta...
false
false
false
false
false
0
push_source_open_cb (GObject *source, GAsyncResult *res, gpointer user_data) { GFile *source_file = G_FILE (source); SftpPushHandle *handle = user_data; GError *error = NULL; GFileInputStream *fin; fin = g_file_read_finish (source_file, res, &error); if (fin) { handle->in = G_INPUT_STREAM (fin); ...
false
false
false
false
false
0
soap_serialize(struct soap *soap) const { #ifndef WITH_NOIDREF if (this->__ptr && !soap_array_reference(soap, this, (struct soap_array*)&this->__ptr, 1, SOAP_TYPE_ns__Data)) if (this->id || this->type) soap->mode |= SOAP_ENC_DIME; #endif }
false
false
false
false
false
0
gdip_create_font_from_logfont (void *hdc, void *lf, GpFont **font, BOOL ucs2) { GpFont *result = (GpFont*) GdipAlloc (sizeof (GpFont)); LOGFONTA *logfont = (LOGFONTA *)lf; if (logfont->lfHeight < 0) { result->sizeInPixels = fabs (logfont->lfHeight); } else { result->sizeInPixels = logfont->lfHeight; // Fixme -...
false
false
false
false
false
0
is_negated_errno(unsigned long int val) { unsigned long int max = -(long int) nerrnos; if (personality_wordsize[current_personality] < sizeof(val)) { val = (unsigned int) val; max = (unsigned int) max; } return val > max; }
false
false
false
false
false
0
decref(node *n) { if (!refctr) return; if (n == NULL) return; if (n->rc == -1) return; n->rc--; /* DEBUG */ cnt_dec++; //printf("decref to %i for ", n->rc); //display(n); if (n->rc == 0) { /* DEBUG */ cnt_free++; if (n->type == t_cons && n->opr.op...
false
false
false
false
true
1
decode_getfattr_generic(struct xdr_stream *xdr, struct nfs_fattr *fattr, struct nfs_fh *fh, struct nfs4_fs_locations *fs_loc, struct nfs4_label *label, const struct nfs_server *server) { unsigned int savep; uint32_t attrlen, bitmap[3] = {0}; int status; status = decode_op_hdr(xdr, OP_GETATTR); if (status <...
false
false
false
false
false
0
sraSpanListCount(const sraSpanList *list) { sraSpan *curr = list->front._next; unsigned long count = 0; while (curr != &(list->back)) { if (curr->subspan) { count += sraSpanListCount(curr->subspan); } else { count += 1; } curr = curr->_next; } return count; }
false
false
false
false
false
0
close( void) { RCODE rc = FERR_OK; // Verify that Setup has been called. flmAssert( m_bSetupCalled == TRUE); // Terminate and flush. if( RC_BAD( rc = endMessage())) { goto Exit; } // Reset the member variables. m_pIStream = NULL; Exit: return( rc); }
false
false
false
false
false
0
return_error(Continuation *ret, const Error error) { ret->_conn.send(ErrorMessage(ret->_call, error.name(), error.message())); ContinuationMap::iterator di = _continuations.find(ret->_tag); delete di->second; _continuations.erase(di); }
false
false
false
false
false
0
new_qpol_policy_t(char const *path,int const options){ qpol_policy_t *p; BEGIN_EXCEPTION if (qpol_policy_open_from_file(path, &p, qpol_swig_message_callback, qpol_swig_message_callback_arg, options) < 0) { {SWIG_JavaException(local_jenv, SWIG_IOError, "Error opening policy"); goto fail;}; } END_EXCEPTION ...
false
false
false
false
false
0
go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len) { struct go7007_usb *usb = go->hpi_context; int transferred, pipe; int timeout = 500; pr_debug("DownloadBuffer sending %d bytes\n", len); if (usb->board->flags & GO7007_USB_EZUSB) pipe = usb_sndbulkpipe(usb->usbdev, 2); else pipe = usb_sndbulkpi...
false
false
false
false
false
0
message_validate_attribute(struct message *msg, struct payload *p) { #ifdef USE_ISAKMP_CFG /* If we don't have an exchange yet, create one. */ if (!msg->exchange) { if (zero_test((u_int8_t *) msg->iov[0].iov_base + ISAKMP_HDR_MESSAGE_ID_OFF, ISAKMP_HDR_MESSAGE_ID_LEN)) msg->exchange = exchange_setup_p1(ms...
false
false
false
false
false
0
host_file_write_experimental(gpointer data, gchar *local, gchar *remote) { gchar *text; struct host_pak *host = data; gpointer scan; if (!host->connected) return(FALSE); scan = scan_new(local); if (!scan) return(1); text = g_strdup_printf("ascii-xfr -v -r %s\n", remote); write(host->input, text, s...
false
false
false
false
false
0
ssl_var_lookup_ssl_cert_dn_oneline(apr_pool_t *p, request_rec *r, X509_NAME *xsname) { char *result = NULL; SSLDirConfigRec *dc; int legacy_format = 0; if (r) { dc = myDirConfig(r); legacy_format = dc->nOptions & SSL_OPT_LEGACYDNFORMAT; ...
false
false
false
false
false
0
C_i_assq(C_word x, C_word lst) { C_word a; while(!C_immediatep(lst) && C_block_header(lst) == C_PAIR_TAG) { a = C_u_i_car(lst); if(!C_immediatep(a) && C_block_header(a) == C_PAIR_TAG) { if(C_u_i_car(a) == x) return a; } else barf(C_BAD_ARGUMENT_TYPE_ERROR, "assq", a); lst = C_u_i_cdr(...
false
false
false
false
false
0
updateVisibleIDs(Hashtable& result, UErrorCode& status) const { if (U_SUCCESS(status)) { for(int32_t i=0;gCalTypes[i] != NULL;i++) { UnicodeString id((UChar)0x40); /* '@' a variant character */ id.append(UNICODE_STRING_SIMPLE("calendar=")); id.appe...
false
false
false
false
false
0
homebank_alienfile_recognize(gchar *filename) { GIOChannel *io; gint i, retval = FILETYPE_UNKNOW; gchar *tmpstr; gint io_stat; GError *err = NULL; static gint csvtype[7] = { CSV_DATE, CSV_INT, CSV_STRING, CSV_STRING, CSV_STRING, CSV_DOUBLE, CSV_STRING, }; DB( g_print("\n[homeb...
false
false
false
false
false
0
evemu_write(const struct evemu_device *dev, FILE *fp) { int i; fprintf(fp, "# EVEMU %d.%d\n", EVEMU_FILE_MAJOR, EVEMU_FILE_MINOR); write_desc(dev, fp); fprintf(fp, "N: %s\n", evemu_get_name(dev)); fprintf(fp, "I: %04x %04x %04x %04x\n", evemu_get_id_bustype(dev), evemu_get_id_vendor(dev), evemu_get_id_pr...
false
false
false
false
false
0
parse_with_strptime (const gchar *value, struct tm *result, const gchar **formats, gint n_formats) { const gchar *parse_end = NULL, *pos; gchar *locale_str; gchar *format_str; ETimeParseStatus parse_ret; gint i, n; if (string_is_empty (value)) { me...
false
false
false
false
false
0
ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen) { UT_return_if_fail (m_dict); UT_return_if_fail (toCorrect && toCorrectLen); UT_UTF8String ignore (toCorrect, toCorrectLen); enchant_dict_add_to_session (m_dict, ignore.utf8_str(), ignore.byteLength()); }
false
false
false
false
false
0
JustRespawned() { m_uiFollowState = STATE_FOLLOW_NONE; if (!IsCombatMovement()) { SetCombatMovement(true); } Reset(); }
false
false
false
false
false
0
charset_encode_mimebody(const char *msg_base, int len, char *retval, int *outlen, int *outlines) { const unsigned char *s; unsigned char s0, s1, s2; char *d; int b64_len, b64_lines, cnt; b64_len = ((len + 2) / 3) * 4; b64_lines = (b64_len + BASE64_MAX_LINE_LEN - 1) / BASE64_MAX_LINE_LE...
false
false
false
false
false
0
nm_dhcp_manager_set_hostname_provider (NMDHCPManager *manager, NMHostnameProvider *provider) { NMDHCPManagerPrivate *priv; g_return_if_fail (NM_IS_DHCP_MANAGER (manager)); priv = NM_DHCP_MANAGER_GET_PRIVATE (manager); if (priv->hostname_provider) { g_object_weak_unref (G_OBJECT (priv->hostname_prov...
false
false
false
false
false
0
HPL_slamc1 ( int * BETA, int * T, int * RND, int * IEEE1 ) #else static void HPL_slamc1 ( BETA, T, RND, IEEE1 ) /* * .. Scalar Arguments .. */ int * BETA, * IEEE1, * RND, * T; #endif { /* ...
false
false
false
false
false
0
dht_is_subvol_in_layout (dht_layout_t *layout, xlator_t *xlator) { int i = 0; for (i = 0; i < layout->cnt; i++) { if (!strcmp (layout->list[i].xlator->name, xlator->name)) return _gf_true; } return _gf_false; }
false
false
false
false
false
0
session_set_stash(session *s, const char *key, const char *value) { if (!s) return; if (!s->tcp) return; if (!s->stash) s->stash = sl_string_create2(); sl_string_add(s->stash, key, value); }
false
false
false
false
false
0
setup_fmodes (int hpos) { switch (fmode & 3) { case 0: fetchmode = 0; break; case 1: case 2: fetchmode = 1; break; case 3: fetchmode = 2; break; } badmode = GET_RES_AGNUS (bplcon0) != GET_RES_DENISE (bplcon0); bplcon0_res = GET_RES_AGNUS (bplcon0); bplcon0_planes = GET_PLANES (bplcon0); bplcon0_p...
false
false
false
false
true
1
glusterd_uuid_to_hostname (uuid_t uuid) { char *hostname = NULL; glusterd_conf_t *priv = NULL; glusterd_peerinfo_t *entry = NULL; priv = THIS->private; GF_ASSERT (priv); if (!uuid_compare (MY_UUID, uuid)) { hostname = gf_st...
false
false
false
false
false
0
dib3000_write_reg(struct dib3000_state *state, u16 reg, u16 val) { u8 b[] = { (reg >> 8) & 0xff, reg & 0xff, (val >> 8) & 0xff, val & 0xff, }; struct i2c_msg msg[] = { { .addr = state->config.demod_address, .flags = 0, .buf = b, .len = 4 } }; deb_i2c("writing i2c bus (reg: %5d 0x%04x, val: %5d 0x%04x)\n",reg...
false
false
false
false
false
0
d_bare_function_type (struct d_info *di, int has_return_type) { struct demangle_component *return_type; struct demangle_component *tl; char peek; /* Detect special qualifier indicating that the first argument is the return type. */ peek = d_peek_char (di); if (peek == 'J') { d_advance (di, ...
false
false
false
false
false
0
btrfs_release_delayed_inode(struct btrfs_delayed_node *delayed_node) { struct btrfs_delayed_root *delayed_root; if (delayed_node && test_bit(BTRFS_DELAYED_NODE_INODE_DIRTY, &delayed_node->flags)) { BUG_ON(!delayed_node->root); clear_bit(BTRFS_DELAYED_NODE_INODE_DIRTY, &delayed_node->flags); delayed_node->...
false
false
false
false
false
0
FMR(GLfloat v1[3], GLfloat v2[3], GLfloat v3[3], int level) { if (level == Level) { GLfloat norm[3]; if (v1[1] <= cutoff && v2[1]<=cutoff && v3[1]<=cutoff) return; triagnormal(v1, v2, v3, norm); glNormal3fv(norm); glVertex3fv(v1); glVertex3fv(v2); glVertex3fv(v3); } else { GLfloat m...
false
false
false
false
false
0
find_hit_side(Ball *ball, Entity *one) { gint x1, x2, y1, y2; Side side = SIDE_NONE; /* First, find out where the ball was -before- it hit */ x1 = ball->geometry.x1 - ((gdouble) ball->speed * sin(ball->direction)); x2 = ball->geometry.x2 - ((gdouble) ball->speed * sin(ball->direction)); y1 = ball->geometry.y1 -...
false
false
false
false
false
0
processOut(xmlNode *localroot) { for(xmlNode *i = localroot->children; i != NULL; i = i->next) { if(i->type == XML_ELEMENT_NODE) { if(defaultAttrs == lu) { if(!xmlStrcmp(i->name, (const xmlChar *) "lu")) { string myword = ""; for(xmlNode *j = i->children; j != NULL; j = j...
false
false
false
false
false
0
enqueueNotification(Notification::Ptr pNotification, int priority) { poco_check_ptr (pNotification); FastMutex::ScopedLock lock(_mutex); if (_waitQueue.empty()) { _nfQueue.insert(NfQueue::value_type(priority, pNotification)); } else { poco_assert_dbg(_nfQueue.empty()); WaitInfo* pWI = _waitQueue.front(); ...
false
false
false
false
false
0
killedAt(SlotIndex I) const { Ranges::const_iterator r = std::lower_bound(ranges.begin(), ranges.end(), I); // Now r points to the first interval with start >= I, or ranges.end(). if (r == ranges.begin()) return false; --r; // Now r points to the last interval with end <= I. // r->end is the kill poin...
false
false
false
false
false
0
rt2x00usb_assign_endpoint(struct data_queue *queue, struct usb_endpoint_descriptor *ep_desc) { struct usb_device *usb_dev = to_usb_device_intf(queue->rt2x00dev->dev); int pipe; queue->usb_endpoint = usb_endpoint_num(ep_desc); if (queue->qid == QID_RX) { pipe = usb_rcvbulkpipe(usb_dev, queue->usb_endpo...
false
false
false
false
false
0
bucket_tree_choose(struct crush_bucket_tree *bucket, int x, int r) { int n; __u32 w; __u64 t; /* start at root */ n = bucket->num_nodes >> 1; while (!terminal(n)) { int l; /* pick point in [0, w) */ w = bucket->node_weights[n]; t = (__u64)crush_hash32_4(bucket->h.hash, x, n, r, bucket->h...
false
false
false
false
false
0
RecomputeCRCs(void) { uint32_t crc, hSize; int littleEndian = 1; // If the header size is bigger than the GPT header data structure, reset it; // otherwise, set both header sizes to whatever the main one is.... if (mainHeader.headerSize > sizeof(GPTHeader)) hSize = secondHeader.headerSize = mainHe...
false
false
false
false
false
0
main(int argc, char **argv) { struct ifreq ifr; struct passwd *pw; long owner = geteuid(); int tap_fd, opt, delete = 0, brief = 0; char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end; while((opt = getopt(argc, argv, "bd:f:t:u:")) > 0){ switch(opt) { case 'b': brief = 1; ...
false
false
false
false
false
0
u_goto_eol(BW *bw) { if (bw->o.hex) { if (bw->cursor->byte + 15 - bw->cursor->byte%16 > bw->b->eof->byte) pset(bw->cursor,bw->b->eof); else pfwrd(bw->cursor, 15 - bw->cursor->byte%16); } else p_goto_eol(bw->cursor); return 0; }
false
false
false
false
false
0
rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) { struct sta_info *psta = NULL; struct wlan_network *pwlan = NULL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)pcmd->parmbuf; struct wlan_network *tgt_network = &(pmlmepriv->cu...
false
true
false
false
false
1
soap_get_http_body(struct soap *soap) { #ifndef WITH_LEAN register size_t l = 0, n = 0; register char *s; /* get HTML body of HTTP error content */ if (!(soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) != SOAP_IO_CHUNK) { n = soap->length; if (!n) return NULL; } #ifdef WITH_FAST soap->labi...
false
false
false
false
false
0
safe_splice_exact(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags) { ssize_t ret = safe_splice(fd_in, off_in, fd_out, off_out, len, flags); if (ret < 0) return ret; if ((size_t)ret != len) return -EDOM; return 0; }
false
false
false
false
false
0
do_write(FILETYPE fd, unsigned char *buff, int siz) { int w = write(fd, buff, siz); if (w != siz) { if (w >= 0) { errno = ENOSPC; } return -1; } return siz; }
false
false
false
false
false
0
binary_primary_evaluate(test_expressions::token_t token, const wcstring &left, const wcstring &right, wcstring_list_t &errors) { using namespace test_expressions; long long left_num, right_num; switch (token) { case test_string_equal: return left == right; case test_string_n...
false
false
false
false
false
0
tcm_qla2xxx_make_tpg( struct se_wwn *wwn, struct config_group *group, const char *name) { struct tcm_qla2xxx_lport *lport = container_of(wwn, struct tcm_qla2xxx_lport, lport_wwn); struct tcm_qla2xxx_tpg *tpg; unsigned long tpgt; int ret; if (strstr(name, "tpgt_") != name) return ERR_PTR(-EINVAL); if (kst...
false
false
false
false
false
0
midgard_base_mixin_get_type (void) { static GType type = 0; if (type == 0) { static const GTypeInfo info = { sizeof (MidgardBaseMixinIFace), (GBaseInitFunc) __midgard_base_mixin_init, NULL, /* base_finalize */ NULL, /* class_init */ NULL, /* class_finalize */ NULL, /* class_data */ 0, ...
false
false
false
false
false
0
initAvailableConvertersList(UErrorCode &errCode) { U_ASSERT(gAvailableConverterCount == 0); U_ASSERT(gAvailableConverters == NULL); ucln_common_registerCleanup(UCLN_COMMON_UCNV, ucnv_cleanup); UEnumeration *allConvEnum = ucnv_openAllNames(&errCode); int32_t allConverterCount = uenum_count(allConvEn...
false
false
false
false
false
0