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
display_transport_state() { jack_transport_state_t ts; jack_position_t pos; ts = jack_transport_query(client2, &pos); switch (ts) { case JackTransportStopped: Log("Transport is stopped...\n"); break; case JackTransportRolling: Log("Transport is rollin...
false
false
false
false
false
0
LoadInt(LoadState* S) { int x; LoadVar(S,x); if (x<0) error(S,"corrupted"); return x; }
false
false
false
false
false
0
ChooseLeafForInsert(GInt32 nXMin, GInt32 nYMin, GInt32 nXMax, GInt32 nYMax) { GBool bFound = FALSE; if (m_numEntries < 0) return -1; /*----------------------------------------------------------------- * Look for the best candidate to contain the n...
false
false
false
false
false
0
seekRegion(BamReaderData * data) { int tid, beg, end; if (data->conf->reg) { // Create BAM iterator at region if (bam_parse_region(data->data->h, data->conf->reg, &tid, &beg, &end) < 0) { fprintf(stderr, "[%s] malformatted region or wrong seqname for input.\n", __func__); exit(1); } data->data->iter = ...
false
false
false
false
false
0
odkm_Add(GF_Box *s, GF_Box *a) { GF_OMADRMKMSBox *ptr = (GF_OMADRMKMSBox *)s; switch (a->type) { case GF_ISOM_BOX_TYPE_OHDR: if (ptr->hdr) gf_isom_box_del((GF_Box*)ptr->hdr); ptr->hdr = (GF_OMADRMCommonHeaderBox *)a; return GF_OK; case GF_ISOM_BOX_TYPE_ODAF: if (ptr->fmt) gf_isom_box_del((GF_Box*)ptr->fmt);...
false
false
false
false
false
0
relocationEncodingFromString (const std::string &s, bool hasOpSizePrefix) { if(!hasOpSizePrefix) { // For instructions without an OpSize prefix, a declared 16-bit register or // immediate encoding is special. ENCODING("i16imm", ENCODING_IW) } ENCODING("i16imm", ENCODING_Iv) ENCO...
false
false
false
false
false
0
trace() const { REPORT int i = nrows_val; int w = lower_val+1; Real sum = 0.0; Real* s = store+lower_val; // while (i--) { sum += *s; s += w; } if (i) for (;;) { sum += *s; if (!(--i)) break; s += w; } ((GeneralMatrix&)*this).tDelete(); return sum; }
false
false
false
false
false
0
anjuta_docman_get_pixbuf_for_file (GFile* file) { /* add a nice mime-type icon if we can */ GdkPixbuf* pixbuf = NULL; GFileInfo* file_info; GError* err = NULL; g_return_val_if_fail (file != NULL, NULL); file_info = g_file_query_info (file, "standard::*", G_FILE_QUERY_INFO_NONE, ...
false
false
false
false
false
0
parser__pickler(PyObject *self, PyObject *args) { NOTE(ARGUNUSED(self)) PyObject *result = NULL; PyObject *st = NULL; PyObject *empty_dict = NULL; if (PyArg_ParseTuple(args, "O!:_pickler", &PyST_Type, &st)) { PyObject *newargs; PyObject *tuple; if ((empty_dict = PyDict_New(...
false
false
false
false
false
0
MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT, LoopInfo *LI, MemoryDependenceAnalysis *MemDep) { // Don't merge away blocks who have their address taken. if (BB->hasAddressTaken()) return false; // Can't merge if there are mu...
false
false
false
false
false
0
_updateSpeed(Creature& u) { // pet only sync speed with owner if (!((Creature&)u).IsPet() || !i_target.isValid() || i_target->GetObjectGuid() != u.GetOwnerGuid()) { return; } u.UpdateSpeed(MOVE_RUN, true); u.UpdateSpeed(MOVE_WALK, true); u.UpdateSpeed(MOVE_SWIM, true); }
false
false
false
false
false
0
flimage_delete_all_text( FL_IMAGE * im ) { int i; if ( ! im || ! im->ntext || ! im->text ) return; for ( i = 0; i < im->ntext; i++ ) fl_free( im->text[ i ].str ); fl_free( im->text ); im->ntext = 0; im->text = 0; }
false
false
false
false
false
0
crypto_aead_free_instance(struct crypto_instance *inst) { struct aead_instance *aead = aead_instance(inst); if (!aead->free) { inst->tmpl->free(inst); return; } aead->free(aead); }
false
false
false
false
false
0
window_fs_toolbar_show_int (void) { window_fs_toolbar_set_geometry (); window_fs_toolbar_move (NULL); window_show (fs_toolbar, NULL); if (fs_is_sticky) gtk_window_stick (GTK_WINDOW(fs_toolbar)); XChangeProperty (GDK_WINDOW_XDISPLAY (fs_toolbar->window), GDK_WINDOW_XWINDOW (fs_toolbar->window), opacit...
false
false
false
false
false
0
hwarc_probe(struct usb_interface *iface, const struct usb_device_id *id) { int result; struct uwb_rc *uwb_rc; struct hwarc *hwarc; struct device *dev = &iface->dev; if (iface->cur_altsetting->desc.bNumEndpoints < 1) return -ENODEV; if (!usb_endpoint_xfer_int(&iface->cur_altsetting->endpoint[0].desc)) ...
false
false
false
false
false
0
fc_exch_recv_abts(struct fc_exch *ep, struct fc_frame *rx_fp) { struct fc_frame *fp; struct fc_ba_acc *ap; struct fc_frame_header *fh; struct fc_seq *sp; if (!ep) goto reject; fp = fc_frame_alloc(ep->lp, sizeof(*ap)); if (!fp) goto free; spin_lock_bh(&ep->ex_lock); if (ep->esb_stat & ESB_ST_COMPLETE) { ...
false
false
false
false
false
0
UpdateParentItems(wxTreeItemId hChild, bool add) { wxTreeItemId parent = hChild; while (parent != GetRootItem()) { parent = GetItemParent(parent); if (add) { if (GetItemImage(parent) == IMAGE_FOLDER_SUB_SHARED) { // parent already marked -> so are all its parents, finished break; } else { SetHas...
false
false
false
false
false
0
dump_queued_macros (cpp_reader *pfile ATTRIBUTE_UNUSED) { macro_queue *q; /* End the previous line of text. */ if (print.printed) { putc ('\n', print.outf); print.src_line++; print.printed = 0; } for (q = define_queue; q;) { macro_queue *oq; fputs ("#define ", print....
false
false
false
false
false
0
ssl3_get_server_done(SSL *s) { int ok,ret=0; long n; n=s->method->ssl_get_message(s, SSL3_ST_CR_SRVR_DONE_A, SSL3_ST_CR_SRVR_DONE_B, SSL3_MT_SERVER_DONE, 30, /* should be very small, like 0 :-) */ &ok); if (!ok) return((int)n); if (n > 0) { /* should contain no data */ ssl3_send_alert(s,SSL3_AL_...
false
false
false
false
false
0
S_sv_i_ncmp(pTHX_ SV *const a, SV *const b) { const IV iv1 = SvIV(a); const IV iv2 = SvIV(b); PERL_ARGS_ASSERT_SV_I_NCMP; return iv1 < iv2 ? -1 : iv1 > iv2 ? 1 : 0; }
false
false
false
false
false
0
i40e_fcoe_fc_eof(struct sk_buff *skb, u8 *eof) { /* the first byte of the last dword is EOF */ skb_copy_bits(skb, skb->len - 4, eof, 1); if (!i40e_fcoe_eof_is_supported(*eof)) return -EINVAL; return 0; }
false
false
false
false
false
0
comm_local_port(int fd) { struct sockaddr_in addr; socklen_t addr_len = 0; fde *F = &fd_table[fd]; /* If the fd is closed already, just return */ if (!F->flags.open) { debug(5, 0) ("comm_local_port: FD %d has been closed.\n", fd); return 0; } if (F->local_port) return F->local_port; ...
false
false
false
false
true
1
get_memory_driver_dev(dev_t *devp) { char buf[BUFSIZE]; char *arglist[MAXARGS]; int argcnt; FILE *misc; int minor; dev_t dev; dev = 0; if ((misc = fopen("/proc/misc", "r")) == NULL) { error(INFO, "/proc/misc: %s", strerror(errno)); } else { while (fgets(buf, BUFSIZE, m...
true
true
false
false
true
1
ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist) { ExecAuxRowMark *aerm = (ExecAuxRowMark *) palloc0(sizeof(ExecAuxRowMark)); char resname[32]; aerm->rowmark = erm; /* Look up the resjunk columns associated with this rowmark */ if (erm->relation) { Assert(erm->markType != ROW_MARK_COPY); /* if chil...
true
true
false
false
false
1
GetPlayerNumPending(ObjectGuid const& guid) { CalendarInvitesList inviteList; GetPlayerInvitesList(guid, inviteList); uint32 pendingNum = 0; time_t currTime = time(NULL); for (CalendarInvitesList::const_iterator itr = inviteList.begin(); itr != inviteList.end(); ++itr) { if (CalendarEve...
false
false
false
false
false
0
parseCommandLine( ) { KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kde"); if (args && args->isSet("style")) { extern QString kde_overrideStyle; // see KGlobalSettings. Should we have a static setter? QString reqStyle(args->getOption("style").toLower()); if (QStyleFactory::keys().c...
false
false
false
false
false
0
restriction_set_new (void *ptr, GretlObjType type, gretlopt opt) { gretl_restriction *rset; rset = malloc(sizeof *rset); if (rset == NULL) return NULL; rset->obj = ptr; rset->otype = type; rset->opt = opt; rset->test = NADBL; rset->pval = NADBL; rset->lnl ...
false
false
false
false
false
0
e2_utils_replace_wildcards (gchar *raw) { //quick check if (strchr (raw, '*') == NULL //if always ascii ;, don't need g_utf8_strchr() && strchr (raw, '?') == NULL) //if always ascii ;, don't need g_utf8_strchr() return raw; gchar *p, *s, *freeme, *expanded = g_strdup (""); gchar sep[2] = {'\0', '\0'}; gint cn...
false
false
false
false
false
0
gst_date_time_new_from_g_date_time (GDateTime * dt) { GstDateTime *gst_dt; if (!dt) return NULL; gst_dt = g_slice_new (GstDateTime); gst_dt->datetime = dt; gst_dt->fields = GST_DATE_TIME_FIELDS_YMD_HMS; gst_dt->ref_count = 1; return gst_dt; }
false
false
false
false
false
0
_mv88e6xxx_atu_mac_read(struct dsa_switch *ds, unsigned char *addr) { int i, ret; for (i = 0; i < 3; i++) { ret = _mv88e6xxx_reg_read(ds, REG_GLOBAL, GLOBAL_ATU_MAC_01 + i); if (ret < 0) return ret; addr[i * 2] = ret >> 8; addr[i * 2 + 1] = ret & 0xff; } return 0; }
false
false
false
false
false
0
zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC) /* {{{ */ { zval *property; int len = strlen(value); if (ce->type & ZEND_INTERNAL_CLASS) { ALLOC_PERMANENT_ZVAL(property); ZVAL_STRINGL(property, zend_strndup(value, len), len, 0); } else { ...
false
false
false
false
true
1
goMessage(size_t messageNum, string mimeid, void (myMessage::*completedFuncArg)()) { openMessage(messageNum, mimeid, false, completedFuncArg); }
false
false
false
false
false
0
showHighscores() { if ( m_KSameMode ) { QPointer<KScoreDialog> d = new KScoreDialog( KScoreDialog::Name | KScoreDialog::Score, this ); d->initFromDifficulty(Kg::difficulty(), /*setConfigGroup=*/ false); d->setConfigGroup( qMakePair( QByteArray( "KSame" ), i18n( "High Scores" ) ) ); d...
false
false
false
false
false
0
MaildirAbort() { if (is_open && !is_afs) unlink( (const char *)tmpname ); }
false
false
false
false
false
0
matewnck_tasklist_connect_screen (MatewnckTasklist *tasklist) { GList *windows; guint *c; int i; MatewnckScreen *screen; g_return_if_fail (tasklist->priv->screen != NULL); screen = tasklist->priv->screen; i = 0; c = tasklist->priv->screen_connections; c [i++] = g_signal_connect_object (G_OBJECT...
false
false
false
false
false
0
clutter_actor_set_translation (ClutterActor *self, gfloat translate_x, gfloat translate_y, gfloat translate_z) { g_return_if_fail (CLUTTER_IS_ACTOR (self)); g_object_freeze_notify (G_OBJECT (self)); ...
false
false
false
false
false
0
set_screen_size (int rows, int cols) { if (!isatty(0)) { return ; } struct winsize winsz ; winsz.ws_row = rows ; winsz.ws_col = cols ; ioctl (0, TIOCSWINSZ, (char *) &winsz); lines = rows ; }
false
false
false
false
false
0
writePPM(FILE *stream, const int bits, const unsigned long frame) { if ((stream != NULL) && (Image != NULL)) return Image->writePPM(stream, frame, Image->getBits(bits)); return 0; }
false
false
false
false
false
0
resample_sync_dataset (DATASET *dset) { if (dset->v > fullset->v) { char **varname; VARINFO **varinfo; int i, nv = fullset->v; for (i=fullset->v; i<dset->v; i++) { free(dset->varname[i]); free(dset->varinfo[i]); } varname = realloc(dset->varname, nv * sizeof *varname); if (varname == NULL) { ...
false
false
false
false
false
0
ne_net_fill(NSOCK *sock) { NEOERR *err; struct timeval tv; fd_set fds; int r; /* Ok, we are assuming a model where one side of the connection is the * consumer and the other the producer... and then it switches. So we * flush the output buffer (if any) before we read */ if (sock->ol) { err = n...
false
false
false
false
false
0
download_is_completed_filename(const char *name) { static const char *ext[] = { DL_OK_EXT, DL_BAD_EXT, DL_UNKN_EXT }; unsigned i; size_t namelen; g_assert(name != NULL); namelen = strlen(name); for (i = 0; i < G_N_ELEMENTS(ext); i++) { if (is_strsuffix(name, namelen, ext[i])) return TRUE; } return FALS...
false
false
false
false
false
0
send_notice_ctcp(const std::string &nickname, const std::string &command, const std::string &data) { std::string line = data.empty() ? command : command + std::string(" ") + data; // Add CTCP escapes: std::string::size_type pos; pos = 0; while (pos != std::string::npos) { pos = line.find('\\', pos); if (pos...
false
false
false
false
false
0
save_mtab() { FILE *mtab; mnt_node *mnt,*next; mtab=setmntent(mtab_filename,"w"); for(mnt=mounted_list;mnt;mnt=next) { addmntent(mtab,&mnt->ms); next=mnt->next; free_mtab_node(mnt); } mounted_list=mounted_list_end=NULL; endmntent(mtab); mtab_changed=0; }
false
false
false
false
false
0
setup_func(xmlNodePtr node) { xmlNodePtr n; Options *o; o = g_slice_new0(Options); if ((n = obt_xml_find_node(node, "edge"))) { gchar *s = obt_xml_node_string(n); o->corner_specified = TRUE; if (!g_ascii_strcasecmp(s, "top")) o->corner = OBT_PROP_ATOM(NET_WM_MOVERE...
false
false
false
false
false
0
is_legal_nickname(const char *s) { size_t len; tor_assert(s); len = strlen(s); return len > 0 && len <= MAX_NICKNAME_LEN && strspn(s,LEGAL_NICKNAME_CHARACTERS) == len; }
false
false
false
false
false
0
do_grid_render (struct thread_grid_render *params) { /* actual function: rendering a GRID pixels block */ unsigned char red; unsigned char green; unsigned char blue; unsigned char *p_out; short *p_int16; unsigned short *p_uint16; int *p_int32; unsigned int *p_uint32; float *p_float; ...
false
false
false
false
false
0
xfer_new( XferElement **elements, unsigned int nelements) { Xfer *xfer = g_new0(Xfer, 1); unsigned int i; g_assert(elements); g_assert(nelements >= 2); xfer->status = XFER_INIT; xfer->status_mutex = g_mutex_new(); xfer->status_cond = g_cond_new(); xfer->fd_mutex = g_mutex_new()...
false
false
false
false
false
0
sifnpmode(u, proto, mode) int u; int proto; enum NPmode mode; { struct npioctl npi; npi.protocol = proto; npi.mode = mode; if (ioctl(ppp_dev_fd, PPPIOCSNPMODE, (caddr_t) &npi) < 0) { if (! ok_error (errno)) error("ioctl(PPPIOCSNPMODE, %d, %d): %m", proto, mode); return 0; } ...
false
false
false
false
false
0
unitsIsPressure(const char *units) { int status = FALSE; if ( memcmp(units, "millibar", 8) == 0 || memcmp(units, "mb", 2) == 0 || memcmp(units, "hectopas", 8) == 0 || memcmp(units, "hPa", 3) == 0 || memcmp(units, "Pa", 2) == 0 ) { status = TRUE; } retur...
false
false
false
false
false
0
getFatTreeNodeByNode(IBNode *p_node) { FatTreeNode* p_ftNode; vec_byte tupple(N, 0); tupple = TuppleByNode[p_node]; p_ftNode = &NodeByTupple[tupple]; return p_ftNode; }
false
false
false
false
false
0
coerce_to_character(x) object x; { BEGIN: switch (type_of(x)) { case t_fixnum: if (0 <= fix(x) && fix(x) < CHCODELIM) return(code_char(fix(x))); break; case t_character: return(x); case t_symbol: case t_string: if (x->st.st_fillp == 1) return(code_char(x->ust.ust_self[0])); break; default: bre...
false
false
false
false
false
0
addWord(TextWord *word) { TextWord **newPool; int wordBaseIdx, newMinBaseIdx, newMaxBaseIdx, baseIdx; TextWord *w0, *w1; // expand the array if needed wordBaseIdx = (int)(word->base / textPoolStep); if (minBaseIdx > maxBaseIdx) { minBaseIdx = wordBaseIdx - 128; maxBaseIdx = wordBaseIdx + 128; p...
false
false
false
false
false
0
on_window_keyboard_changed (InputPadGtkWindow *window, gint group, gpointer data) { InputPadGtkButton *button; guint **keysyms; int i = 0; gchar *tooltip, *display_name; g_return_if_fail (window != NULL && ...
false
false
false
false
false
0
compactForSorting() { ArrayStorage* storage = m_storage; unsigned usedVectorLength = min(m_length, m_vectorLength); unsigned numDefined = 0; unsigned numUndefined = 0; // This compacts normal values (e.g. not undefined) in a contiguous run // at the beginning of the array, and then puts any s...
false
false
false
false
false
0
tracker_miner_manager_reindex_by_mimetype (TrackerMinerManager *manager, const GStrv mimetypes, GError **error) { TrackerMinerManagerPrivate *priv; GVariant *v; GError *new_error = NULL; g_return_val_if_fa...
false
false
false
false
false
0
matroxfb_fillrect(struct fb_info* info, const struct fb_fillrect* rect) { struct matrox_fb_info *minfo = info2minfo(info); switch (rect->rop) { case ROP_COPY: matroxfb_accel_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect->height, rect->width); break; } }
false
false
false
false
false
0
mbdmac_read (uae_u32 addr, int mode) { #if A3000_DEBUG > 1 uae_u32 vaddr = addr; #endif uae_u32 v = 0xffffffff; if (currprefs.cs_mbdmac > 1) return 0; addr &= 0xffff; switch (addr) { case 0x02: case 0x03: v = dmacreg_read (dmac_dawr, addr - 0x02, 2); break; case 0x04: case 0x05: case 0x06: case 0x07...
false
false
false
false
false
0
RemoveStyle (int l1, int i1, int l2, int i2, int style) { for (int l = l1; l <= l2; ++l) { int first = (l == l1) ? i1 : -10000; int last = (l == l2) ? i2 : 10000; Line(l, true)->RemoveStyle(this, l, first, last, style); } if (l1 <= caretline && l2 >= caretline) { ShowCaret();...
false
false
false
false
false
0
num_bars() const { unsigned n; // keep 100 % num_bars == 0 switch (static_cast<int>(draw_height / (fontsize + 14))) { case 0: case 1: n = 1; break; case 2: case 3: n = 2; break; case 4: n = 4; ...
false
false
false
false
false
0
dJointGetHinge2Angle2Rate( dJointID j ) { dxJointHinge2* joint = ( dxJointHinge2* )j; dUASSERT( joint, "bad joint argument" ); checktype( joint, Hinge2 ); if ( joint->node[0].body && joint->node[1].body ) { dVector3 axis; dMULTIPLY0_331( axis, joint->node[1].body->posr.R, joint->axis...
false
false
false
false
false
0
string_array_find_( double *string_array_header, char *test_string, int *test_len, int *result_array, int *result_array_size, int *num_indices ) { int i,j=0; in...
false
false
false
false
false
0
service_paste_buf() { if (!BX_KEY_THIS pastebuf) return; BX_DEBUG(("service_paste_buf: ptr at %d out of %d", BX_KEY_THIS pastebuf_ptr, BX_KEY_THIS pastebuf_len)); int fill_threshold = BX_KBD_ELEMENTS - 8; BX_KEY_THIS paste_service = 1; while ((BX_KEY_THIS pastebuf_ptr < BX_KEY_THIS pastebuf_len) && !BX_KEY_TH...
false
false
false
false
false
0
start_inmd_window() { GtkWidget *win = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_realize (win); xim_xwin = GDK_WINDOW_XWINDOW(gtk_widget_get_window(win)); dbg("xim_xwin %x\n", xim_xwin); }
false
false
false
false
false
0
t_pool_next_result_locked(t_results_queue *q) { t_pool_result *r, *last; for (last = NULL, r = q->result_head; r; last = r, r = r->next) { if (r->serial == q->next_serial) break; } if (r) { if (q->result_head == r) q->result_head = r->next; else last->next = r->next; if (q->result_...
false
false
false
false
false
0
libewf_single_file_entry_free( libewf_single_file_entry_t **single_file_entry, libcerror_error_t **error ) { static char *function = "libewf_single_file_entry_free"; if( single_file_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_...
false
false
false
false
false
0
GetDeskNumber(List *list, int n, long *Desk) { Item *temp; for (temp=list->head;temp && temp->count!=n;temp=temp->next); if (temp==NULL) return 0; *Desk=temp->Desk; return 1; }
false
false
false
false
false
0
ft_cardfindseq(fits, key, match) FITSHead fits; FITSCard key; int *match; { FITSCard card; FITSCard xnear = NULL; if ( fits == NULL ) return NULL; if ( key == NULL ) return NULL; *match = 0; for ( card = fits->cards; card != &fits->cards[fits->ncard]; card++ ) { if ( !strncmp(k...
false
false
false
false
false
0
test_status_ignore__empty_repo_with_gitignore_rewrite(void) { status_entry_single st; g_repo = cl_git_sandbox_init("empty_standard_repo"); cl_git_mkfile( "empty_standard_repo/look-ma.txt", "I'm going to be ignored!"); memset(&st, 0, sizeof(st)); cl_git_pass(git_status_foreach(g_repo, cb_status__single, &st));...
false
false
false
false
false
0
qmonCQHandleEnterLeave( Widget w, XtPointer cld, XEvent *ev, Boolean *ctd ) { /* int root_x, root_y, pos_x, pos_y; Window root, child; unsigned int keys_buttons; */ static char line[] = "+++++++++++++++++++++++++++++++++++++++++++\n"; static int prev_row = -1; int row, col; String str; lL...
false
false
false
false
false
0
DoAuto(CommandLine &CmdL) { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); pkgDepCache *DepCache = CacheFile.GetDepCache(); if (unlikely(Cache == NULL || DepCache == NULL)) return false; APT::PackageList pkgset = APT::PackageList::FromCommandLine(CacheFile, CmdL.FileList + 1); ...
false
false
false
false
false
0
gphpedit_status_combo_box_set_item_text (GphpeditStatusComboBox *combo, GtkMenuItem *item, const gchar *text) { g_return_if_fail (GPHPEDIT_IS_STATUS_COMBO_BOX (combo)); g_return_if_fail (GTK_IS_MENU_ITEM (item)); g_object_set_data_full (G_OBJECT (item), COMBO_BOX_TEXT_DATA, g_...
false
false
false
false
false
0
gt_graphics_set_margins(GtGraphics *g, double margin_x, double margin_y) { gt_assert(g && g->c_class); gt_rwlock_wrlock(g->pvt->lock); g->c_class->set_margins(g, margin_x, margin_y); gt_rwlock_unlock(g->pvt->lock); }
false
false
false
false
false
0
createFromName(const UUID& nsid, const std::string& name, DigestEngine& de) { poco_assert_dbg (de.digestLength() >= 16); UUID netNsid = nsid; netNsid.toNetwork(); de.reset(); de.update(&netNsid._timeLow, sizeof(netNsid._timeLow)); de.update(&netNsid._timeMid, sizeof(netNsid._timeMid)); de.update(&netNsid._timeH...
false
false
false
false
false
0
hx509_crl_alloc(hx509_context context, hx509_crl *crl) { int ret; *crl = calloc(1, sizeof(**crl)); if (*crl == NULL) { hx509_set_error_string(context, 0, ENOMEM, "out of memory"); return ENOMEM; } ret = hx509_certs_init(context, "MEMORY:crl", 0, NULL, &(*crl)->revoked); if (ret) { free(*crl...
false
false
false
false
false
0
ast_lookup_block_num(struct ast_node *ast, struct gfs2_sbd *sbd) { uint64_t bn = 0; switch (ast->ast_type) { case AST_EX_OFFSET: bn = ast_lookup_block_num(ast->ast_left, sbd) + ast->ast_num; break; case AST_EX_ADDRESS: if (gfs2_check_range(sbd, ast->ast_num)) break; bn = ast->ast_num; break; case AST_...
false
false
false
false
false
0
tg3_switch_clocks(struct tg3 *tp) { uint32_t orig_clock_ctrl, clock_ctrl; clock_ctrl = tr32(TG3PCI_CLOCK_CTRL); orig_clock_ctrl = clock_ctrl; clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE | 0x1f); tp->pci_clock_ctrl = clock_ctrl; if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) &&...
false
false
false
false
false
0
delta_is_ok(int delta) { if (delta < -119 || delta > +119) return false; if ((delta & 0xF) == 8) return false; // HACK: delta % 16 would be ill-defined for negative numbers return true; }
false
false
false
false
false
0
dup_db_args(kadm5_server_handle_t handle, char **db_args) { int count = 0; int ret = 0; for (count=0; db_args && db_args[count]; count++); if (count == 0) { handle->db_args = NULL; goto clean_n_exit; } handle->db_args = calloc(sizeof(char*), count+1); if (handle->db_args =...
false
false
false
false
false
0
hackTimes(const UnicodeString& hackPattern, UErrorCode& status) { UnicodeString conflictingString; fp->set(hackPattern); UnicodeString mmss; UBool gotMm=FALSE; for (int32_t i=0; i<fp->itemNumber; ++i) { UnicodeString field = fp->items[i]; if ( fp->isQuoteLiteral(field) ) { ...
false
false
false
false
false
0
activate (void) { getPlayer ()->loadOptions (); if ( Music::isPaused () ) { Music::resume (); } else { m_BackgroundMusic->play (); } }
false
false
false
false
false
0
remove_newline(LINEBUF_REC *rec) { char *ptr; ptr = linebuf_find(rec, '\n'); if (ptr == NULL) { /* LF wasn't found, wait for more data.. */ if (rec->len < MAX_CHARS_IN_LINE) return 0; /* line buffer is too big - force a newline. */ linebuf_append(rec, "\n", 1); ptr = rec->str+rec->len-1;...
false
false
false
false
true
1
main(int argc, char** argv) { int i, retval; char file_name[256]; int host_id; host_id = 0; strcpy(file_name, ""); check_stop_daemons(); for (i=1; i<argc; i++) { if (is_arg(argv[i], "host_id")) { if (!argv[++i]) { fprintf(stderr, "%s requires an argumen...
true
true
false
false
true
1
jpc_coc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_coc_t *coc = &ms->parms.coc; uint_fast8_t tmp; if (cstate->numcomps <= 256) { if (jpc_getuint8(in, &tmp)) { return -1; } coc->compno = tmp; } else { if (jpc_getuint16(in, &coc->compno)) { return -1; } } if (jpc_getuint8(i...
false
false
false
false
false
0
SetBufferSize(jack_nframes_t buffer_size) { jack_log("JackGraphManager::SetBufferSize size = %ld", buffer_size); jack_port_id_t port_index; for (port_index = FIRST_AVAILABLE_PORT; port_index < fPortMax; port_index++) { JackPort* port = GetPort(port_index); if (port->IsUsed()) po...
false
false
false
false
false
0
em_capitol_case(EditLine *el, Int c __attribute__((__unused__))) { Char *cp, *ep; ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, el->el_state.argument, ce__isword); for (cp = el->el_line.cursor; cp < ep; cp++) { if (Isalpha(*cp)) { if (Islower(*cp)) *cp = Toupper(*cp); cp++; break;...
false
false
false
false
false
0
traverse_one_object(struct object *obj, struct object *parent) { int result; struct tree *tree = NULL; if (obj->type == OBJ_TREE) { obj->parsed = 0; tree = (struct tree *)obj; if (parse_tree(tree) < 0) return 1; /* error already displayed */ } result = fsck_walk(obj, mark_object, obj); if (tree) { fre...
false
false
false
false
false
0
find_file(const char *file) { // Check that we're open if(mode == MPAK_CLOSED) return -1; for(UINT32 f=0; f<num_files; f++) if(strcmp(files[f], file) == 0) return f; return -1; }
false
false
false
false
false
0
proc_file (FILE * fh) { char buf[1024]; char * flags = buf+128; char * dev = buf+512; int state; int use; int blocksize; int area, node; char * hwa; if ( fgets(buf, 1024, fh) == NULL ) { fprintf(stderr, "Error: can not read banner from file\n"); return -1; } if ( strcmp(buf, "Addr Flags State Use ...
false
false
false
false
false
0
handleFiltCounter( void* userData, uint64_t time, uint32_t process, uint32_t counter, uint64_t value ) { FF FiltHandlerArgument* fha = static_cast<FiltHandlerArgument*>(userData); Process& proc = fha->t2p.find( ...
false
false
false
false
false
0
dbxflat_ParseGenbank(EmbPBtreeEntry entry, AjPFile inf) { ajlong pos = 0L; AjBool ret = ajTrue; ajStrAssignC(&dbxflatRdline, ""); ajStrAssignC(&dbxflatSumline, ""); while(!ajStrPrefixC(dbxflatRdline,"//") && ret) { if(ajStrPrefixC(dbxflatRdline,"LOCUS")) { entry->fpos = pos; ...
false
false
false
false
false
0
JoinServerFunc (void *unused) { int i; char buffer[128]; cl.tactical = false; remoteserver_runspeed = 300; //default for ( i = 0; i < 16; i++) { if( !strcmp("aa tactical", Info_ValueForKey(mod_names, local_mods_data[i])) ) { remoteserver_runspeed = 200; //for correct prediction M_Menu_T...
true
true
true
false
false
1
sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, int len) { struct sd *sd = (struct sd *) gspca_dev; /* check the JPEG end of frame */ if (len >= 3 && data[len - 3] == 0xff && data[len - 2] == 0xd9) { /*fixme: what does the last byte mean?*/ gspca_frame_add(gspca_dev, LAST_PACKET, data, len - 1); ...
false
false
false
false
false
0
amp_node_property_has_flags (AnjutaProjectNode *node, const gchar *id, const gchar *value) { AnjutaProjectProperty *prop; prop = anjuta_project_node_get_property (node, id); if (prop != NULL) { return am_node_property_find_flags (prop, value, strlen (value)) != NULL ? TRUE : FALSE; } else { return FALSE; }...
false
false
false
false
false
0
string_zfill(PyStringObject *self, PyObject *args) { Py_ssize_t fill; PyObject *s; char *p; Py_ssize_t width; if (!PyArg_ParseTuple(args, "n:zfill", &width)) return NULL; if (PyString_GET_SIZE(self) >= width) { if (PyString_CheckExact(self)) { Py_INCREF(self); ...
false
false
false
false
true
1
GetCacheEntry(Address pc) { Counters::pc_to_code.Increment(); ASSERT(IsPowerOf2(kPcToCodeCacheSize)); uint32_t hash = ComputeIntegerHash( static_cast<uint32_t>(reinterpret_cast<uintptr_t>(pc))); uint32_t index = hash & (kPcToCodeCacheSize - 1); PcToCodeCacheEntry* entry = cache(index); if (entry->pc =...
false
false
false
false
false
0
cupsArrayNew3(cups_array_func_t f, /* I - Comparison function or @code NULL@ for an unsorted array */ void *d, /* I - User data or @code NULL@ */ cups_ahash_func_t h, /* I - Hash function or @code NULL@ for unhashed lookups */ int hsize, /* I - Hash size...
false
true
false
false
false
1
interface_load (PluginHandle * plugin) { IfacePlugin * i = plugin_get_header (plugin); g_return_val_if_fail (i, FALSE); if (PLUGIN_HAS_FUNC (i, init) && ! i->init ()) return FALSE; current_interface = i; return TRUE; }
false
false
false
false
false
0
OnAudioMuteStateChange( const std::string& nick, bool was_muted, bool is_muted) { if (!was_muted && is_muted) { console_->PrintLine("%s now muted.", nick.c_str()); } else if (was_muted && !is_muted) { console_->PrintLine("%s no longer muted.", nick.c_str()); } }
false
false
false
false
false
0
cut(ButEnv *env, But *but) { Tbin *tbin = but->iPacket; int storeLen; adjustBreak(tbin, break_loCur, 0); if (tbin->locs[tbin_loCur].tin == tbin->locs[tbin_hiCur].tin) storeLen = tbin->locs[tbin_hiCur].index - tbin->locs[tbin_loCur].index; else storeLen = tbin->locs[tbin_hiCur].index + tbin->tins[t...
false
false
false
false
false
0
mermin(field_t field1, field_t *field2) { long i, j, nx, ny; int rnmiss = 0; int grid = field1.grid; int nmiss = field1.nmiss; double missval = field1.missval; double *array = field1.ptr; double rmin = 0; nx = gridInqXsize(grid); ny = gridInqYsize(grid); for ( i = 0; i < nx;...
false
false
false
false
false
0