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
load_current_file (GthLoadFileDataTask *self) { GFile *file; int n_remaining; char *details; GList *files; if (self->priv->current == NULL) { self->priv->file_data_list = g_list_reverse (self->priv->file_data_list); gth_task_completed (GTH_TASK (self), NULL); return; } file = self->priv->current->dat...
false
false
false
false
false
0
setCameraMode(bool track_users) { manual_rotate = false; manual_zoom = false; this->track_users = track_users; if(selectedUser!=0) camera.lockOn(track_users); manual_camera = false; gGourceSettings.camera_mode = track_users ? "track" : "overview"; }
false
false
false
false
false
0
ms_sensors_ht_read_humidity(struct ms_ht_dev *dev_data, u32 *humidity) { int ret; u32 adc; u16 delay; mutex_lock(&dev_data->lock); delay = ms_sensors_ht_h_conversion_time[dev_data->res_index]; ret = ms_sensors_convert_and_read(dev_data->client, MS_SENSORS_HT_H_CONVERSION_START, MS_SENSORS_NO_RE...
false
false
false
false
false
0
insertChild( QwtMmlNode *parent, QwtMmlNode *new_node, QString *errorMsg ) { if ( new_node == 0 ) return true; Q_ASSERT( new_node->parent() == 0 && new_node->nextSibling() == 0 && new_node->previousSibling() == 0 ); if ( parent != 0 ) ...
false
false
false
false
false
0
libssh2_channel_write_ex(LIBSSH2_CHANNEL *channel, int stream_id, const char *buf, size_t buflen) { ssize_t rc; if(!channel) return LIBSSH2_ERROR_BAD_USE; BLOCK_ADJUST(rc, channel->session, _libssh2_channel_write(channel, stream_id, ...
false
false
false
false
false
0
gen6_get_stolen_reserved(struct drm_i915_private *dev_priv, unsigned long *base, unsigned long *size) { uint32_t reg_val = I915_READ(GEN6_STOLEN_RESERVED); *base = reg_val & GEN6_STOLEN_RESERVED_ADDR_MASK; switch (reg_val & GEN6_STOLEN_RESERVED_SIZE_MASK) { case GEN6_STOLEN_RESERVED_1M: *size = 1024 * ...
false
false
false
false
false
0
getResult(FXint column,FXbool & v){ if (getNumData()) { FXint i; i = sqlite3_column_int((sqlite3_stmt*)statement,column); v = (i==0) ? FALSE : TRUE; } }
false
false
false
false
false
0
getMaxLinkId() { // TODO: change to Utils::Database::max() QSqlDatabase DB = QSqlDatabase::database(Constants::USER_DB_CONNECTION); if (!connectDatabase(DB, __LINE__)) { return false; } DB.transaction(); QSqlQuery query(DB); if (!query.exec(select(Constants::Table_INFORMATION, Consta...
false
false
false
false
false
0
tp_cm_message_set_message (TpMessage *self, guint part, const gchar *key, TpMessage *message) { GPtrArray *parts; guint i; g_return_if_fail (self != NULL); g_return_if_fail (part < self->parts->len); g_return_if_fail (key != NULL); g_return_if_fail (message != NULL); g_return_if_fail (self !=...
false
false
false
false
false
0
SquareToString(int square) { int line = square/8; std::string result; switch(square%8) { case 0: result += 'a'; break; case 1: result += 'b'; break; case 2: result += 'c'; break; case 3: result += 'd'; break; case 4: result += 'e'; break; case 5: result += 'f'; break; ...
false
false
false
false
false
0
emit_jump_insn (x) rtx x; { rtx last = NULL_RTX, insn; switch (GET_CODE (x)) { case INSN: case JUMP_INSN: case CALL_INSN: case CODE_LABEL: case BARRIER: case NOTE: insn = x; while (insn) { rtx next = NEXT_INSN (insn); add_insn (insn); last = insn; insn = ne...
false
false
false
false
false
0
board_count_diff_winner_get_empties (const Board *const b, const Player p) { g_assert(b); g_assert(p == BLACK_PLAYER || p == WHITE_PLAYER); int pcount, ocount, difference, empties; Player o; o = player_opponent(p); pcount = board_count_pieces(b, player_color(p)); oco...
false
false
false
false
false
0
SelectSMRD(SDValue Addr, SDValue &SBase, SDValue &Offset, bool &Imm) const { SDLoc SL(Addr); if (CurDAG->isBaseWithConstantOffset(Addr)) { SDValue N0 = Addr.getOperand(0); SDValue N1 = Addr.getOperand(1); if (SelectSMRDOffset(N1, Offset, Imm)) { SBase = N0; ...
false
false
false
false
false
0
unmap_notify (XEvent *ev) { rp_frame *frame; rp_window *win; /* ignore SubstructureNotify unmaps. */ if(ev->xunmap.event != ev->xunmap.window && ev->xunmap.send_event != True) return; /* FIXME: Should we only look in the mapped window list? */ win = find_window_in_list (ev->xunmap.window, &rp_map...
false
false
false
false
false
0
adj_value_changed_cb(GtkAdjustment* data, gpointer window) { char *buffer; float freq = rint(gtk_adjustment_get_value(adj))/STEPS; const char *preset_title = get_preset(freq, &mom_ps); preset_combo_set_item(mom_ps); redraw_status_window(); if (preset_title) buffer = g_strdup_printf(_("Gnomeradio - %s"), pr...
false
false
false
false
false
0
emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); MachineFrameInfo *MFI = MF.getFrameInfo(); const MipsInstrInfo &TII = *static_cast<const MipsInstrInfo*>(MF.getTarget().getInstrInfo()); ...
false
false
false
false
false
0
multiplexer_serialStatusToString (Multiplexer* self, gint status) { gchar* result = NULL; GString* sb = NULL; GString* _tmp0_ = NULL; gint _tmp1_ = 0; gint _tmp3_ = 0; gint _tmp5_ = 0; gint _tmp7_ = 0; gint _tmp9_ = 0; GString* _tmp11_ = NULL; const gchar* _tmp12_ = NULL; gchar* _tmp13_ = NULL; g_return_val...
false
false
false
false
false
0
parse_netprefix(isc_sockaddr_t **sap, const char *value) { isc_result_t result = ISC_R_SUCCESS; isc_sockaddr_t *sa = NULL; struct in_addr in4; struct in6_addr in6; isc_uint32_t netmask = 0; char *slash = NULL; isc_boolean_t parsed = ISC_FALSE; if ((slash = strchr(value, '/'))) { *slash = '\0'; result = isc...
false
false
false
false
false
0
MatchStarSymbol( const char *dv, const char *sv ) // Date : July 12, 2002 // Author : Thomas Wilkens // Task : This function is called, if the search pattern contains a star symbol. It determines // if dv (the dataset's value) still matches sv (the search mask's value). This functio...
false
false
false
false
false
0
__clk_set_parent_after(struct clk_core *core, struct clk_core *parent, struct clk_core *old_parent) { unsigned long flags; /* * Finish the migration of prepare state and undo the changes done * for preventing a race with clk_enable(). */ if (core->prepare_count) { flags = clk_enable_lock(); ...
false
false
false
false
false
0
ucftp_get_password(struct ucftpfs *fs, const char *host, const char *user) { struct ucftpsession *fts; char *account; account = av_stradd(NULL, user, USER_SEP_STR, host, NULL); fts = ucftp_find_session(fs, account); av_free(account); if(fts == NULL) { ...
false
false
false
false
false
0
xpw_find_included_file (char * const *path, const char *including_file, const char *name, const char *suffix) { char *dir; /* Of the including file. */ char *res; struct stat statbuf; if (*name == DIRECTORY_SEPARATOR) /* Path is absolute */ dir = NULL; else /* Relative. Give its root. */ ...
false
false
false
false
false
0
sqlstatementMysqlNewRun(AjPSqlconnection sqlc, const AjPStr statement, AjBool debug) { AjPSqlstatement sqls = NULL; MYSQL *Pmysql = NULL; MYSQL_RES *Pmysqlres = NULL; debug |= ajDebugTest("sqlstatement...
false
false
false
false
false
0
parse_header_metadata(struct ecryptfs_crypt_stat *crypt_stat, char *virt, int *bytes_read, int validate_header_size) { int rc = 0; u32 header_extent_size; u16 num_header_extents_at_front; header_extent_size = get_unaligned_be32(virt); virt += sizeof(__be32); num_header_extents_at_front = get_unaligned_...
false
false
false
false
false
0
main( int argc, char ** argv ) { struct state state; memset( &state, 0, sizeof( state ) ); // Catch errors if ( setjmp( state.err_jump ) ) { if ( state.err_msg ) fprintf( stderr, "%s\n", state.err_msg ); state_destroy( &state ); return EXIT_FAILURE; } // Configure read_options( &st...
false
false
false
false
false
0
ib_find_qp_mgid ( struct ib_device *ibdev, union ib_gid *gid ) { struct ib_queue_pair *qp; struct ib_multicast_gid *mgid; list_for_each_entry ( qp, &ibdev->qps, list ) { list_for_each_entry ( mgid, &qp->mgids, list ) { if ( memcmp ( &mgid->gid, gid, sizeof ( mgid->gid ) ) == 0 ) { return qp...
false
false
false
false
false
0
lex_include_file(const char *incfile) { FILE *bakup; DEBUG_PRINT("'%s'\n", incfile); if (incl_buff >= INCLUDE_RECURSION_LIMIT) { warning("Recursion limit reached in file '%s'", incfile); return false; } bakup = yyin; yyin = open_src_file(incfile, options.src_path); if (yyi...
false
false
false
false
false
0
SQUID_MD5Update(struct MD5Context *ctx, const void *_buf, unsigned len) { uint8_t const *buf = _buf; uint32_t t; /* Update byte count */ t = ctx->bytes[0]; if ((ctx->bytes[0] = t + len) < t) ctx->bytes[1]++; /* Carry from low to high */ t = 64 - (t & 0x3f); /* Space available in ctx->in (at ...
false
false
false
false
false
0
_pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert) { Pager_Desk *pd; Evas_Object *o, *evo; E_Border_List *bl; E_Border *bd; int w, h; Evas *e; if (!desk) return NULL; pd = E_NEW(Pager_Desk, 1); if (!pd) return NULL; pd->xpos = xpos; pd->ypos = ypos; pd->u...
false
false
false
false
false
0
DebugOutV(uint8 verbosity, const char* message, va_list& vars) { uint32 length = (uint32) strlen(message); char* buffer = new char[length + 256]; vsnprintf(buffer, length + 256, message, vars); length = (uint32) min(strlen(buffer), (size_t) length + 253); buffer[length] = '\n'; buffer[length+1] = '\r'; b...
false
false
false
false
false
0
findMaxLatency(ArrayRef<SUnit*> ReadySUs) { SUnit *LateSU = nullptr; unsigned RemLatency = 0; for (ArrayRef<SUnit*>::iterator I = ReadySUs.begin(), E = ReadySUs.end(); I != E; ++I) { unsigned L = getUnscheduledLatency(*I); if (L > RemLatency) { RemLatency = L; LateSU = *I; } } i...
false
false
false
false
false
0
unref_deferred() const { Resource* r = (Resource*)this; if (r->refcount_ != 0) { r->refcount_ -= 1; } if (r->refcount_ == 0) { r->cleanup(); if (ResourceImpl::deferred_) { if (ResourceImpl::deletes_ == nil) { ResourceImpl::deletes_ = new ResourceList; } ResourceImpl::deletes_->append...
false
false
false
false
false
0
set_nc_cache(size_t newsize) { #if HAVENETCDF4==1 size_t size,nelems; gafloat preemption; gaint rc; /* Get the cache size, nelems, and preemption policy. */ rc = nc_get_chunk_cache(&size, &nelems, &preemption); size = newsize; nelems = 51203; /* Set the new cache size and nelems, recycle preemption pol...
false
false
false
false
false
0
dbigcg_gcgopenlib(const AjPStr lname, AjPFile* libr, AjPFile* libs) { AjPStr rname = NULL; AjPStr sname = NULL; ajStrAssignS(&rname, lname); ajStrAssignS(&sname, lname); ajFilenameReplaceExtC(&rname,"ref"); ajFilenameReplaceExtC(&sname,"seq"); ajFileClose(libr); ajFileClose(libs);...
false
false
false
false
false
0
qlcnic_alloc_adapter_resources(struct qlcnic_adapter *adapter) { struct qlcnic_hardware_context *ahw = adapter->ahw; int err = 0; adapter->recv_ctx = kzalloc(sizeof(struct qlcnic_recv_context), GFP_KERNEL); if (!adapter->recv_ctx) { err = -ENOMEM; goto err_out; } if (qlcnic_83xx_check(adapter)) { ahw-...
false
false
false
false
false
0
nfs_clone_sb_security(struct super_block *s, struct dentry *mntroot, struct nfs_mount_info *mount_info) { /* clone any lsm security options from the parent to the new sb */ if (d_inode(mntroot)->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) return -ESTALE; return security_sb_clone_mnt_opts(mount_info...
false
false
false
false
false
0
list_ins_next(List *list, ListElmt *element, const void *data) { ListElmt *new_element; if((new_element = (ListElmt *)malloc(sizeof(ListElmt))) == NULL) return(-1); new_element->data = (void *)data; /* handle insertion at head */ if(element == NULL) { if(list_size(list) == 0) list->tail = new_element; ...
false
false
false
false
false
0
portcmp(void *instance, REQUEST *req UNUSED, VALUE_PAIR *request, VALUE_PAIR *check, VALUE_PAIR *check_pairs, VALUE_PAIR **reply_pairs) { char buf[MAX_STRING_LEN]; char *s, *p, *next; uint32_t lo, hi; uint32_t port; instance = instance; check_pairs = check_pairs; /* shut the compiler up */ reply_pairs = r...
false
false
false
false
false
0
search_control_hmdf(Block *block_head) { Block *bpt; Hmdf_table *hmdfpt = NULL; bpt = block_head; if (bpt != NULL) bpt = bpt->outer; while ((bpt != NULL) && (hmdfpt == NULL)) { if (bpt->hmdf != NULL) hmdfpt = bpt->hmdf; bpt = bpt->outer; } return hmdfpt; }
false
false
false
false
false
0
process_zinfo_copy ( struct input_file *input, struct output_file *output, union zinfo_record *zinfo ) { struct zinfo_copy *copy = &zinfo->copy; size_t offset = copy->offset; size_t len = copy->len; if ( ( offset + len ) > input->len ) { fprintf ( stderr, "Input buffer overrun on copy\n" ); return -1; ...
false
true
false
false
false
1
canvas_free(struct canvas *store) { FREESURFACE(store->surf); free(store); }
false
false
false
false
false
0
on_unlock_renderer_clicked (GcrUnlockRenderer *unlock, gpointer user_data) { GcrViewerWidget *self = GCR_VIEWER_WIDGET (user_data); GError *error = NULL; gconstpointer data; gsize n_data; gulong sig; /* Override our main authenticate signal handler */ sig = g_signal_connect (self->pv...
false
false
false
false
false
0
get6hex( FILE *fp_in ) { int bytehi, bytemid, bytelow, addr; bytehi = get2hex( fp_in ); if( bytehi != -1 ) { bytemid = get2hex( fp_in ); if( bytemid != -1 ) { bytelow = get2hex( fp_in ); if( bytelow != -1 ) { addr = (bytehi << 16) + (bytemid << 8) + bytelow; return addr; } } } return ...
false
false
false
false
false
0
change_verbose(FILE * f, char *line) { char *s = line; if (strsep(&s, "\t ") && s) simverb = strtoul(s, 0, 0); fprintf(f, "simulator verbose level is %d\n", simverb); return 0; }
false
false
false
false
false
0
daemonize (glusterfs_ctx_t *ctx) { int ret = -1; cmd_args_t *cmd_args = NULL; int cstatus = 0; cmd_args = &ctx->cmd_args; ret = glusterfs_pidfile_setup (ctx); if (ret) goto out; if (cmd_args->no_daemon_mode) ...
false
false
false
false
true
1
NDT_V7_GetNodeType(u32 NDT_Tag, u32 NodeTag) { if(!NDT_Tag || !NodeTag) return 0; switch(NDT_Tag) { case NDT_SFWorldNode: return ALL_GetNodeType(SFWorldNode_V7_TypeToTag, SFWorldNode_V7_Count, NodeTag, GF_BIFS_V7); case NDT_SF3DNode: return ALL_GetNodeType(SF3DNode_V7_TypeToTag, SF3DNode_V7_Count, NodeTag, GF_B...
false
false
false
false
false
0
process(struct text_norm_state *s, enum cstate *st, const char *buf, int length, int fout) { do { switch (*st) { case CSTATE_NONE: if (*buf == '[') { *st = CSTATE_TJ; } else { const char *nl = memchr(buf, '\n', length); if (!nl)...
false
false
false
false
false
0
adcli_conn_get_krb5_context (adcli_conn *conn) { return_val_if_fail (conn != NULL, NULL); if (ensure_k5_ctx (conn) != ADCLI_SUCCESS) return NULL; return conn->k5; }
false
false
false
false
false
0
CS (Tree sig) { //contextor contextRecursivness; string code; if (!getCompiledExpression(sig, code)) { // not compiled yet /* if (getRecursivness(sig) != contextRecursivness.get()) { contextRecursivness.set(getRecursivness(sig)); }*/ code = generateCode(sig...
false
false
false
false
false
0
qos_client_tolerance_cmd(cmd_parms *cmd, void *dcfg, const char *arg1) { qos_srv_config *sconf = (qos_srv_config*)ap_get_module_config(cmd->server->module_config, &qos_module); const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL...
false
false
false
false
false
0
FDKaacEnc_psyInit(PSY_INTERNAL *hPsy, PSY_OUT **phpsyOut, const INT nSubFrames, const INT nMaxChannels, const AUDIO_OBJECT_TYPE audioObjectType, ...
false
false
false
false
true
1
ReadParameterFile(const std::string& filename) { std::ifstream rtp; bool modified = false; rtp.open(filename.c_str()); if (rtp.fail()) { std::cout << "Parameter file " << filename << " could not be opened." << std::endl; return false; } std::string line; while (std::getline(rtp, line)) ...
false
false
false
false
false
0
exo_icon_view_unselect_all_internal (ExoIconView *icon_view) { ExoIconViewItem *item; gboolean dirty = FALSE; GList *lp; if (G_LIKELY (icon_view->priv->selection_mode != GTK_SELECTION_NONE)) { for (lp = icon_view->priv->items; lp != NULL; lp = lp->next) { item = E...
false
false
false
false
false
0
HandleAuraModAllCritChance(bool apply, bool Real) { // spells required only Real aura add/remove if (!Real) return; Unit* target = GetTarget(); if (target->GetTypeId() != TYPEID_PLAYER) return; ((Player*)target)->HandleBaseModValue(CRIT_PERCENTAGE, FLAT_MOD, float(m_modifi...
false
false
false
false
false
0
isl_term_alloc(__isl_take isl_space *dim, __isl_take isl_mat *div) { isl_term *term; int n; if (!dim || !div) goto error; n = isl_space_dim(dim, isl_dim_all) + div->n_row; term = isl_calloc(dim->ctx, struct isl_term, sizeof(struct isl_term) + (n - 1) * sizeof(int)); if (!term) goto error; term->ref =...
false
false
false
false
false
0
get(LLVMContext &C) { OpaqueType *OT = new OpaqueType(C); // All opaque types are distinct. LLVMContextImpl *pImpl = C.pImpl; pImpl->OpaqueTypes.insert(OT); return OT; }
false
false
false
false
false
0
image_check(boot_image_t *img) { boot_image_t *b; if (img == NULL) return -1; /* do the obvious first */ if (img->label[0] == '\0') { config_error(L"image has no label"); return -1; } /* image_list points to the */ for(b=image_list; b; b = b->next) { if (img == b) continue; if (!StrCmp(img->label, b->...
false
false
false
false
false
0
gamgi_gtk_cell_align_translation (GtkWidget *widget, void *data) { gamgi_window *window = GAMGI_CAST_WINDOW data; GtkWidget *dialog = window->dialog0; GtkWidget *button; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) == TRUE) { /********************* * reset Cell dialog * *********************...
false
false
false
false
false
0
alignment() { if (sym->alignment == 0) sym->size(Loc()); return sym->alignment; }
false
false
false
false
false
0
hkl_pseudo_axis_engine_mode_init_psi_constant_vertical_real(HklPseudoAxisEngineMode *self, HklPseudoAxisEngine *engine, HklGeometry *geometry, HklDetector *detector, HklSample *sample, HklError **error) { HklVector hkl; HklVector ki, kf, Q, n; int status = HKL_SUCCESS; if (!...
false
false
false
false
false
0
pathname() const { if (!d->invalid() && d->addr.un->sun_family == AF_UNIX) return QFile::decodeName(d->addr.un->sun_path); return QString(); }
false
false
false
false
false
0
em2800_i2c_check_for_device(struct em28xx *dev, u8 addr) { u8 buf; int ret; ret = em2800_i2c_recv_bytes(dev, addr, &buf, 1); if (ret == 1) return 0; return (ret < 0) ? ret : -EIO; }
false
false
false
false
false
0
fc_vport_terminate(struct fc_vport *vport) { struct Scsi_Host *shost = vport_to_shost(vport); struct fc_host_attrs *fc_host = shost_to_fc_host(shost); struct fc_internal *i = to_fc_internal(shost->transportt); struct device *dev = &vport->dev; unsigned long flags; int stat; if (i->f->vport_delete) stat = i->f...
false
false
false
false
false
0
_ibox_resize_handle(IBox *b) { Eina_List *l; IBox_Icon *ic; int w, h; evas_object_geometry_get(b->o_box, NULL, NULL, &w, &h); if (e_box_orientation_get(b->o_box)) w = h; else h = w; e_box_freeze(b->o_box); EINA_LIST_FOREACH(b->icons, l, ic) { e_box_pack_options_set(ic->o_...
false
false
false
false
false
0
gui_init_window_title(void) { gchar title[256]; const char *revision = product_get_revision(); if (revision[0] != '\0') { str_bprintf(title, sizeof(title), "gtk-gnutella %s %s", product_get_version(), revision); } else { str_bprintf(title, sizeof(title), "gtk-gnutella %s", product_get_version()); } gt...
false
false
false
false
false
0
openioc_parse_content(xmlTextReaderPtr reader, struct openioc_hash ** elems, int context_hash) { const xmlChar * xmlval; struct openioc_hash * elem; int rc = CL_SUCCESS; if (context_hash == 0) { xmlChar * type = xmlTextReaderGetAttribute(reader, (const xmlChar *)"type"); if (type == NUL...
false
false
false
false
false
0
UpLogoEvent(GtkWidget * widget) { int column, row; gn_bmp tbitmap; memcpy(&tbitmap, &bitmap, sizeof(gn_bmp)); for (row = 0; row < bitmap.height - 1; row++) for (column = 0; column < bitmap.width; column++) if (IsPoint(column, row + 1)) gn_bmp_point_set(&bitmap, column, row); else gn_bmp_point_cle...
false
true
false
false
false
1
libmpq__file_read(mpq_archive_s *mpq_archive, uint32_t file_number, uint8_t *out_buf, libmpq__off_t out_size, libmpq__off_t *transferred) { /* some common variables. */ uint32_t i; uint32_t blocks = 0; int32_t result = 0; libmpq__off_t file_offset = 0; libmpq__off_t unpacked_size = 0; ...
false
false
false
false
false
0
nex_input(bool rem_out) { NexusSet*result = new NexusSet; if (word_) { NexusSet*tmp = word_->nex_input(rem_out); result->add(*tmp); delete tmp; } if (base_) { NexusSet*tmp = base_->nex_input(rem_out); result->add(*tmp); delete tmp; } return result; }
false
false
false
false
false
0
searchFileRecursive(QString& dir, const QString& name) { // we leave this in... qDebug("Checking %s/%s", qPrintable(dir), qPrintable(name)); if (QFile::exists(dir + '/' + name)) return true; // check in subdirectories QDir d(dir); d.setFilter( QDir::Dirs | QDir::NoSymLinks ); d.setSorting( QDir::Unsorte...
false
false
false
false
false
0
ixgbe_clear_vxlan_port(struct ixgbe_adapter *adapter) { switch (adapter->hw.mac.type) { case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: IXGBE_WRITE_REG(&adapter->hw, IXGBE_VXLANCTRL, 0); #ifdef CONFIG_IXGBE_VXLAN adapter->vxlan_port = 0; #endif break; default: break; } }
false
false
false
false
false
0
ins_compl_addleader(c) int c; { #ifdef FEAT_MBYTE int cc; if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) { char_u buf[MB_MAXBYTES + 1]; (*mb_char2bytes)(c, buf); buf[cc] = NUL; ins_char_bytes(buf, cc); } else #endif ins_char(c); /* If we didn't complete finding matches we must sear...
false
false
false
false
false
0
gfm_server_replica_lost(struct peer *peer, int from_client, int skip) { gfarm_error_t e; gfarm_ino_t inum; gfarm_uint64_t gen; struct host *spool_host; struct inode *inode; static const char diag[] = "GFM_PROTO_REPLICA_LOST"; e = gfm_server_get_request(peer, diag, "ll", &inum, &gen); if (e != GFARM_ERR_NO_ERRO...
false
false
false
false
false
0
OnRemoveExclusiveApp(wxCommandEvent& ev) { wxArrayInt selections; int numSelected = m_exclusiveApsListBox->GetSelections(selections); // The selection indices are returned in random order. // We must sort them to ensure deleting the correct items. selections.Sort((sortcomparefunc)&myCompareInts); ...
false
false
false
false
false
0
ebb_compute_jump_reg_dependencies (rtx insn, regset cond_set, regset used, regset set) { basic_block b = BLOCK_FOR_INSN (insn); edge e; edge_iterator ei; FOR_EACH_EDGE (e, ei, b->succs) if (e->flags & EDGE_FALLTHRU) /* The jump may be a by-product of a branch that has been merged in the main...
false
false
false
false
false
0
session_set_timeout(Session *session, guint interval) { if (session->timeout_tag > 0) g_source_remove(session->timeout_tag); session->timeout_interval = interval; if (interval > 0) { #if GLIB_CHECK_VERSION(2,14,0) if (interval % 1000 == 0) session->timeout_tag = g_timeout_add_seconds(interval/1000, sessi...
false
false
false
false
false
0
sn_DoDestroy() { #ifdef DEBUG static bool recursion = false; tASSERT( !recursion ); recursion = true; #endif for ( int i = sn_Destroyed.Len()-1 ; i>=0; --i ) { nDestroyInfo& info = sn_Destroyed( i ); unsigned short id = info.id; // check if the message timed out boo...
false
false
false
false
false
0
allocate_colors(Gif_XColormap *gfxc) { Gif_XContext *gfx = gfxc->x_context; uint16_t size = gfxc->colormap->ncol; Gif_Color *c = gfxc->colormap->col; unsigned long *pixels = gfxc->pixels; XColor xcol; int i; if (!gfxc->allocated) { if (size > gfxc->npixels) size = gfxc->npixels; for (i = 0; i < si...
false
false
false
false
false
0
atcommand_item3(const int fd, struct map_session_data* sd, AtCommandType command, const char* message) { struct map_session_data *pl_sd; struct item_data *item_data; char item_name[100]; char character[100]; int item_id = 0, number = 0; nullpo_retr(-1, sd); if (!message || !*message) return -1; if (sscanf(...
false
false
false
false
false
0
gtr_close_tab (GtrTab * tab, GtrWindow * window) { g_object_set_data (G_OBJECT (window), GTR_IS_CLOSING_ALL, GINT_TO_POINTER (0)); if (!_gtr_tab_can_close (tab)) { GtkWidget *dlg; dlg = gtr_close_confirmation_dialog_new_single (GTK_WINDOW (window), ...
false
false
false
false
false
0
store(longlong nr, bool unsigned_val) { ASSERT_COLUMN_MARKED_FOR_WRITE; if (nr < 0 || (nr >= 100 && nr <= 1900) || nr > 2155) { *ptr= 0; set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); return 1; } if (nr != 0 || field_length != 4) // 0000 -> 0; 00 -> 2000 { if (nr <...
false
false
false
false
false
0
hub_log_initialize(const char* file, int syslog) { setlocale(LC_ALL, "C"); #ifdef MEMORY_DEBUG memfile = fopen(MEMORY_DEBUG_FILE, "w"); if (!memfile) { fprintf(stderr, "Unable to create " MEMORY_DEBUG_FILE " for logging memory allocations\n"); return; } #endif #ifdef NETWORK_DUMP_DEBUG netdump = fopen(NETW...
false
false
false
false
false
0
bus_filter_service_ready (GDBusConnection *connection, const gchar *sender, const gchar *object, const gchar *interface, const gchar *signal, GVariant *params, gpointer user_data) { if (g_strcmp0(signal, "ServiceReady") != 0) { g_warning ("Unexpected signal on context daemon i...
false
false
false
false
false
0
User_isuser(char *nick) { userrec *u; u = User_user(nick); if(!u->registered) return 0; else return 1; }
false
false
false
false
false
0
get_permissions_reply (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) { NMClient *self = NM_CLIENT (user_data); GHashTable *permissions; GError *error = NULL; dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_MAP_OF_STRING, &...
false
false
false
false
false
0
dhcp_lease_destroy (omapi_object_t *h, const char *file, int line) { struct lease *lease; if (h -> type != dhcp_type_lease) return DHCP_R_INVALIDARG; lease = (struct lease *)h; if (lease -> uid) uid_hash_delete (lease); hw_hash_delete (lease); if (lease -> on_release) executable_statement_dereference (&l...
false
false
false
false
false
0
message_received (GstBus * bus, GstMessage * message, gpointer data) { GstElement *pipeline = GST_ELEMENT (data); GstMessageType type = message->type; GST_DEBUG ("message received"); switch (type) { case GST_MESSAGE_STATE_CHANGED: { GstState old, new, pending; GST_DEBUG ("state change mess...
false
false
false
false
false
0
FmiMakeFsmBddNode( FsmFigure ) fsmfig_list *FsmFigure; { fsmstate_list *ScanState; fsmlocout_list *ScanLocout; fsmtrans_list *ScanTrans; bddnode *BddNode; bddnode *BddNodeOut; bddnode *BddNodeLocout; setbddlocalcircuit( FsmFigure->CIRCUIT ); setbddlocalsystem( BddLocalCircuit-...
false
false
false
true
false
1
main (int argc, char* argv[]) { const char* fname_sp; //15bp file const char* fname_cmp;//12bp file if (argc < 2) { fprintf(stderr, "ERROR: No input file specified.\n"); return 1; } fname_sp = argv[1]; fprintf(stderr, "INFO: Reading file %s...\n", fname_sp); if ( ! parse_seq...
false
false
false
false
false
0
chs_ok(chs a, char *v, char *w) { longchs aa = chs_to_longchs(a); int ret = 1; if (is_equal_chs(a, zero_chs)) return 1; if (B.heads && aa.h >= B.heads) { my_warn(_("%s of partition %s has impossible value for head: " "%lu (should be in 0-%lu)\n"), w, v, aa.h, B.heads - 1); ret = 0; } if ...
false
false
false
false
false
0
CanReadFile(const char* name) { // First make sure the file exists. This prevents an empty file // from being created on older compilers. struct stat fs; if(stat(name, &fs) != 0) { return 0; } // Test if the file with the given name is a VTKFile with the given // type. vtkXMLFileReadTes...
false
false
false
false
false
0
sys_get_global_config(global_t *global) { sys_gconf_t *config = module_get_config(global->config, sys_module); if (config == NULL) { lock(global->mutex); config = module_get_config(global->config, sys_module); if (config == NULL) { config = apr_pcalloc(global->pool, sizeof(*config)); module_...
false
false
false
false
false
0
calculate_interval_lengths(CHARSET_INFO *cs, TYPELIB *interval, uint32 *max_length, uint32 *tot_length) { const char **pos; uint *len; *max_length= *tot_length= 0; for (pos= interval->type_names, len= interval->type_lengths; *pos ; pos++, len++) { size_t length= cs->...
false
false
false
false
false
0
Generate() { if (!receiver_.is(rax)) { __ movq(rax, receiver_); } __ Move(rcx, name_); Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); __ Call(ic, RelocInfo::CODE_TARGET); // The call must be followed by a test rax instruction to indicate // that the inobject property case was inlined...
false
false
false
false
false
0
td_sched_bb(bb_node* bb) { GCM_DUMP( sblog << "td scheduling BB_" << bb->id << "\n"; ); while (!ready.empty()) { for (sq_iterator N, I = ready.begin(), E = ready.end(); I != E; I = N) { N = I; ++N; td_schedule(bb, *I); ready.erase(I); } } }
false
false
false
false
false
0
VideoModeChange( void ) { if ( (view->Width() != w) || (view->Height() != h) ) { SetSize( view->Width(), view->Height() ); mview->Resize( *this ); Draw(); } }
false
false
false
false
false
0
compose_quote_list_of_addresses(gchar *str) { GSList *list = NULL, *item = NULL; gchar *qname = NULL, *faddr = NULL, *result = NULL; list = address_list_append_with_comments(list, str); for (item = list; item != NULL; item = item->next) { gchar *spec = item->data; gchar *endofname = strstr(spec, " <"); if (e...
false
false
false
false
false
0
snd_ice1712_gpio_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char mask = kcontrol->private_value & 0xff; int invert = (kcontrol->private_value & (1<<24)) ? mask : 0; unsigned int val, nval; if (kcontrol->private_valu...
false
false
false
false
false
0
ASU_232( const int& h, const int& k, const int& l ) { return (l>=h && h>=0 && (h>0 || k>=0)); }
false
false
false
false
false
0
L8() {register object *base=vs_base; register object *sup=base+VM8; VC8 vs_check; vs_top=sup; goto TTL; TTL:; base[0]= (((object)VV[6])->s.s_dbind); { object V24= base[0]; if(V24==Cnil){ base[1]= Cnil; vs_top=(vs_base=base+1)+1; return;} goto T99; T99:; {object V26; object V27; V26= CMPcar((V24->c.c_car)...
false
false
false
false
false
0