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 |
|---|---|---|---|---|---|---|
e_categories_editor_set_categories (ECategoriesEditor *editor,
const gchar *categories)
{
ECategoriesSelector *categories_list;
g_return_if_fail (E_IS_CATEGORIES_EDITOR (editor));
categories_list = editor->priv->categories_list;
e_categories_selector_set_checked (categories_li... | false | false | false | false | false | 0 |
nutclient_tcp_reconnect(NUTCLIENT_TCP_t client)
{
if(client)
{
nut::TcpClient* cl = dynamic_cast<nut::TcpClient*>((nut::Client*)client);
if(cl)
{
try
{
cl->connect();
return 0;
}
catch(...){}
}
}
return -1;
} | false | false | false | false | false | 0 |
globus_extension_release(
globus_extension_handle_t handle)
{
globus_l_extension_handle_t * entry;
globus_l_extension_module_t * owner = NULL;
GlobusFuncName(globus_extension_release);
entry = handle;
GlobusExtensionDebugEnterSymbol(entry->user_hashing ? "" : entry->sy... | false | false | false | false | false | 0 |
orderedToMap(const CertificateInfoOrdered &info)
{
CertificateInfo out;
// first, do all but EmailLegacy
for(int n = 0; n < info.count(); ++n)
{
const CertificateInfoPair &i = info[n];
if(i.type().known() != EmailLegacy)
out.insert(i.type(), i.value());
}
// lastly, apply EmailLegacy
for(int n = 0; n < ... | false | false | false | false | false | 0 |
alloc_params (void)
{
return g_new0 (PhoneyParams, 1);
} | false | false | false | false | false | 0 |
g2_filled_triangle_pd(g2_physical_device *pd,
double x1, double y1,
double x2, double y2,
double x3, double y3)
{
int ix1, iy1, ix2, iy2, ix3, iy3;
double dx1, dy1, dx2, dy2, dx3, dy3;
if(pd->ff[g2_FilledTriangle].fun!=NULL) {
switch(pd->coor_type) {
case g2_IntCoor:
g2_uc... | false | false | false | false | false | 0 |
gt_array_get_last(const GtArray *a)
{
gt_assert(a->next_free);
return gt_array_get(a, a->next_free-1);
} | false | false | false | false | false | 0 |
snd_pcm_rate_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames)
{
snd_pcm_rate_t *rate = pcm->private_data;
snd_pcm_sframes_t n = snd_pcm_mmap_hw_avail(pcm);
if ((snd_pcm_uframes_t)n > frames)
frames = n;
if (frames == 0)
return 0;
snd_atomic_write_begin(&rate->watom);
n = snd_pcm_rate_move_applptr(pcm, -fra... | false | false | false | false | false | 0 |
conv_get_outgoing_charset(void)
{
static CharSet out_charset = -1;
const gchar *cur_locale;
const gchar *p;
gint i;
if (out_charset != -1)
return out_charset;
cur_locale = conv_get_current_locale();
if (!cur_locale) {
out_charset = C_AUTO;
return out_charset;
}
if (strcasestr(cur_locale, "UTF-8")) {
... | false | false | false | false | false | 0 |
HpingRecvCloseHandler(struct recv_handler *ra)
{
ra->rh_ifname[0] = '\0';
if (ra->rh_interp != NULL) {
Tcl_DeleteFileHandler(pcap_fileno(ra->rh_pcapfp));
Tcl_DecrRefCount(ra->rh_handlerscript);
}
pcap_close(ra->rh_pcapfp);
ra->rh_interp = NULL;
} | false | false | false | false | false | 0 |
gog_xy_plot_populate_editor (GogObject *obj,
GOEditor *editor,
GogDataAllocator *dalloc,
GOCmdContext *cc)
{
#ifdef GOFFICE_WITH_GTK
GtkBuilder *gui =
go_gtk_builder_load ("res:go:plot_xy/gog-xy-prefs.ui",
GETTEXT_PACKAGE, cc);
if (gui != NU... | false | false | false | false | false | 0 |
fcc_end_get (krb5_context context,
krb5_ccache id,
krb5_cc_cursor *cursor)
{
if (FCACHE(id) == NULL)
return krb5_einval(context, 2);
if (FCC_CURSOR(*cursor) == NULL)
return krb5_einval(context, 3);
krb5_storage_free(FCC_CURSOR(*cursor)->sp);
close (FCC_CURSOR(*cursor)->fd)... | false | false | false | false | false | 0 |
style(FXint row,FXint,FXint end,FXint pos) const {
register FXuint s=0;
register FXchar ch;
// Selected part of text
if(selstartpos<=pos && pos<selendpos) s|=STYLE_SELECTED;
// Highlighted part of text
if(hilitestartpos<=pos && pos<hiliteendpos) s|=STYLE_HILITE;
// Current active line
if((row==cursor... | false | false | false | false | false | 0 |
_restore_border(E_Border *bd)
{
Border_Extra *extra;
extra = eina_hash_find(_G.border_extras, &bd);
if (!extra) {
ERR("No extra for %p", bd);
return;
}
_e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
_e_border_move_resize(bd,
extra->orig.geom.x,
... | false | false | false | false | false | 0 |
button_cb(Fl_Widget *,void *) {
fl_file_chooser_callback(file_cb);
const char *fname = fl_file_chooser("Image file?","*.{bm,bmp,gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name);
puts(fname ? fname : "(null)"); fflush(stdout);
fl_file_chooser_callback(0);
} | false | false | false | false | false | 0 |
_xdg_glob_determine_type(const char *glob)
{
const char *ptr;
int maybe_in_simple_glob = FALSE;
int first_char = TRUE;
ptr = glob;
while (*ptr != '\000')
{
if (*ptr == '*' && first_char)
maybe_in_simple_glob = TRUE;
else if (*ptr == '\\' || *ptr == '[' || *ptr == '?... | false | false | false | false | true | 1 |
CalculateCentroid()
{
this->Centroid[0] = 0.0;
this->Centroid[1] = 0.0;
this->Centroid[2] = 0.0;
double ctr[3];
for ( int i = 0; i < this->NumberOfHandles; ++i )
{
this->HandleGeometry[i]->GetCenter(ctr);
this->Centroid[0] += ctr[0];
this->Centroid[1] += ctr[1];
this->Centroid[2] += ctr[2... | false | false | false | false | false | 0 |
convert_endianness(const std::string& strFilename,
const std::string& strTempDir,
uint64_t iHeaderSkip,
size_t iComponentSize,
size_t in_core_size)
{
using namespace ... | false | false | false | false | false | 0 |
copy_shield_to_globals( int objnum, shield_info *shieldp )
{
int i, j;
int gi = 0;
int count = 0; // Number of triangles in this shield hit.
int shnum; // shield hit number, index in Shield_hits.
shnum = get_global_shield_tri();
Shield_hits[shnum].type = SH_TYPE_1;
for (i = 0; i < shieldp->ntris; i++ ) ... | false | false | false | false | false | 0 |
unescape_unicode_list(const char **pp, const char *end,
VALUE buf, rb_encoding **encp, onig_errmsg_buffer err)
{
const char *p = *pp;
int has_unicode = 0;
unsigned long code;
size_t len;
while (p < end && ISSPACE(*p)) p++;
while (1) {
code = ruby_scan_hex(p, end-p, &len);
... | false | false | false | false | false | 0 |
_item_block_recalc(Item_Block *itb,
int in,
Eina_Bool qadd)
{
const Eina_List *l;
Elm_Gen_Item *it;
Evas_Coord minw = 0, minh = 0;
Eina_Bool show_me = EINA_FALSE, changed = EINA_FALSE;
Evas_Coord y = 0;
itb->num = in;
EINA_LIST_FOREACH (itb->items, l, it)
... | false | false | false | false | false | 0 |
create_menubar (GtkWidget *win)
{
GtkWidget *menubar;
GtkWidget *fe_toggle;
GtkAccelGroup *accel_group;
GtkItemFactory *item_factory;
GtkItemFactoryEntry menu_items[] = \
{
{ _("/_File"), NULL, NULL, 0, "<Branch>" },
... | false | false | false | false | false | 0 |
WriteJingleViewRequest(const std::string& content_name,
const ViewRequest& request,
XmlElements* elems,
WriteError* error) {
if (request.static_video_views.empty()) {
elems->push_back(CreateNoneVideoViewElem(content_name));
} el... | false | false | false | false | false | 0 |
store_digit(digit_detect_state_t *s, char digit)
{
s->detected_digits++;
if (s->current_digits < MAX_DTMF_DIGITS) {
s->digitlen[s->current_digits] = 0;
s->digits[s->current_digits++] = digit;
s->digits[s->current_digits] = '\0';
} else {
ast_log(LOG_WARNING, "Digit lost due to full buffer\n");
s->lost_digi... | false | false | false | false | false | 0 |
get_nl_goto_field (struct nesting_info *info)
{
tree field = info->nl_goto_field;
if (!field)
{
unsigned size;
tree type;
/* For __builtin_nonlocal_goto, we need N words. The first is the
frame pointer, the rest is for the target's stack pointer save
area. The number of words is control... | false | false | false | false | false | 0 |
SV_FlushRedirect (int sv_redirected, char *outputbuf)
{
if (sv_redirected == RD_PACKET)
{
Netchan_OutOfBandPrint (NS_SERVER, &net_from, "print\n%s", outputbuf);
}
else if (sv_redirected == RD_CLIENT)
{
MSG_WriteByte (&sv_client->netchan.message, svc_print);
MSG_WriteByte (&sv_client->netchan.message, PRINT_H... | false | false | false | false | false | 0 |
PaParseComment(TSourceLoc &lineno, TParseContext& parseContextLocal)
{
int transitionFlag = 0;
int nextChar;
while (transitionFlag != 2) {
nextChar = yyinput();
if (nextChar == '\n')
lineno.line++;
switch (nextChar) {
case '*' :
transitionFlag = ... | false | false | false | false | false | 0 |
CreateMaskBand(int nFlags)
{
ScanDirectories();
if (poMaskDS != NULL)
{
CPLError(CE_Failure, CPLE_AppDefined,
"This TIFF dataset has already an internal mask band");
return CE_Failure;
}
else if (CSLTestBoolean(CPLGetConfigOption("GDAL_TIFF_INTERNAL_MASK", "NO")))
... | false | false | false | false | false | 0 |
cw1200_set_beacon_wakeup_period_work(struct work_struct *work)
{
struct cw1200_common *priv =
container_of(work, struct cw1200_common,
set_beacon_wakeup_period_work);
wsm_set_beacon_wakeup_period(priv,
priv->beacon_int * priv->join_dtim_period >
MAX_BEACON_SKIP_TIME_MS ? 1 :
priv... | false | false | false | false | false | 0 |
gsb_form_initialise_transaction_form ( void )
{
gint row, column;
gint rows_number, columns_number;
gint form_account_number;
gint account_number;
devel_debug (NULL);
/* get the form of the first account */
form_account_number = gsb_data_account_first_number ();
account_number = gsb_data_... | false | false | false | false | false | 0 |
__connman_service_set_passphrase(struct connman_service *service,
const char *passphrase)
{
int err = 0;
if (service->immutable == TRUE || service->hidden == TRUE)
return -EINVAL;
err = check_passphrase(service, service->security, passphrase);
if (err == 0) {
g_free(service->passphrase);
service->pass... | false | false | false | false | false | 0 |
FindFileContainingExtension(
const string& containing_type,
int field_number,
FileDescriptorProto* output) {
for (int i = 0; i < sources_.size(); i++) {
if (sources_[i]->FindFileContainingExtension(
containing_type, field_number, output)) {
// The symbol was found in source i. However... | false | false | false | false | false | 0 |
nautilus_list_view_invert_selection (NautilusView *view)
{
NautilusListView *list_view;
GtkTreeSelection *tree_selection;
GList *node;
GList *iters, *l;
NautilusFile *file;
GList *selection = NULL;
list_view = NAUTILUS_LIST_VIEW (view);
tree_selection = gtk_tree_view_get_selection (list_view->details->tree_vi... | false | false | false | false | false | 0 |
gnm_font_button_clicked (GtkButton *button)
{
GtkFontChooser *font_dialog;
GnmFontButton *font_button = GNM_FONT_BUTTON (button);
GnmFontButtonPrivate *priv = font_button->priv;
if (!font_button->priv->font_dialog)
{
GtkWidget *parent;
parent = gtk_widget_get_toplevel (GTK_WIDGET (fo... | false | false | false | false | false | 0 |
ved_deliver_byterange(const struct sess *sp, ssize_t low, ssize_t high)
{
struct storage *st;
ssize_t l, lx;
u_char *p;
//printf("BR %jd %jd\n", low, high);
lx = 0;
VTAILQ_FOREACH(st, &sp->obj->store, list) {
p = st->ptr;
l = st->len;
//printf("[0-] %jd %jd\n", lx, lx + l);
if (lx + l < low) {
lx += l;
... | false | false | false | false | false | 0 |
Free_Anchor( HB_Anchor* an)
{
if ( an->PosFormat == 3 )
{
_HB_OPEN_Free_Device( &an->af.af3.YDeviceTable );
_HB_OPEN_Free_Device( &an->af.af3.XDeviceTable );
}
} | false | false | false | false | false | 0 |
CopyInfoCVars (
Bag dst,
Bag src )
{
Int i;
if ( SIZE_BAG(dst) < SIZE_BAG(src) ) ResizeBag( dst, SIZE_BAG(src) );
if ( SIZE_BAG(src) < SIZE_BAG(dst) ) ResizeBag( src, SIZE_BAG(dst) );
NR_INFO(dst) = NR_INFO(src);
NLVAR_INFO(dst) = NLVAR_IN... | false | false | false | false | false | 0 |
bsl_ack(struct bsl_device *dev)
{
uint8_t reply;
if (read_with_timeout(dev->serial_fd, &reply, 1) < 0) {
printc_err("bsl: failed to receive reply\n");
return -1;
}
if (reply == DATA_NAK) {
printc_err("bsl: received NAK\n");
return -1;
}
if (reply != DATA_ACK) {
printc_err("bsl: bad ack character: %x\... | false | false | false | false | false | 0 |
gs_watcher_set_active (GSWatcher *watcher,
gboolean active)
{
g_return_val_if_fail (GS_IS_WATCHER (watcher), FALSE);
gs_debug ("turning watcher: %s", active ? "ON" : "OFF");
if (watcher->priv->active == active) {
gs_debug ("Idle detection is already %s"... | false | false | false | false | false | 0 |
score_timezone(const char *tzname, struct tztry * tt)
{
int i;
pg_time_t pgtt;
struct tm *systm;
struct pg_tm *pgtm;
char cbuf[TZ_STRLEN_MAX + 1];
pg_tz *tz;
/* Load timezone definition */
tz = pg_load_tz(tzname);
if (!tz)
return -1; /* unrecognized zone name */
/* Reject if leap seconds involve... | true | true | false | false | false | 1 |
setPriority(Priority type)
{
#ifndef __sun__
int _priority = m_TpEnum.getPriority(type);
int _ok = ACE_Thread::setprio(m_hThreadHandle, _priority);
// remove this ASSERT in case you don't want to know is thread priority change was successful or not
MANGOS_ASSERT(_ok == 0 || (_ok == -1 && errno == ENOTSU... | false | false | false | false | false | 0 |
do_names(int& ct) {
int t = axis_type_check(tk[1]);
xx[t].label_off = false;
if (ntk >= 3 && str_i_equals(tk[2], "FROM") && toupper(tk[3][0]) == 'D') {
// Support syntax "xnames from d1" to retrieve names from the data set
xx[t].setNamesDataSet(get_dataset_identifier(tk[3]));
} else {
ct = 1;
while (ct<ntk)... | false | false | false | false | false | 0 |
removeSuccessor(MachineBasicBlock *MBB) {
while (MBB->succ_size())
MBB->removeSuccessor(*MBB->succ_begin());
} | false | false | false | false | false | 0 |
PTR_UseTraverse(intercept_t * in)
{
int sound;
fixed_t pheight;
if (!in->d.line->special)
{
P_LineOpening(in->d.line);
if (openrange <= 0)
{
if (usething->player)
{
switch (usething->player->class)
{
cas... | false | false | false | false | false | 0 |
print( std::ostream& os, const FunctionTable& functions,
const TermTable& terms ) const
{
os << '(';
if( operator_ == ASSIGN_OP )
os << "assign ";
else if( operator_ == SCALE_UP_OP )
os << "scale-up ";
else if( operator_ == SCALE_DOWN_OP )
os << "scale-down ";
else if( operator_ == INCREASE_O... | false | false | false | false | false | 0 |
PortalRun(Portal portal, long count, bool isTopLevel,
DestReceiver *dest, DestReceiver *altdest,
char *completionTag)
{
bool result;
uint32 nprocessed;
ResourceOwner saveTopTransactionResourceOwner;
MemoryContext saveTopTransactionContext;
Portal saveActivePortal;
ResourceOwner saveResourceOwner;
Memo... | false | false | false | false | false | 0 |
dht_fsetxattr (call_frame_t *frame, xlator_t *this,
fd_t *fd, dict_t *xattr, int flags, dict_t *xdata)
{
xlator_t *subvol = NULL;
dht_local_t *local = NULL;
int op_errno = EINVAL;
data_pair_t *trav = NULL;
VALIDATE_OR_GOTO (frame, err);
... | false | false | false | false | false | 0 |
_SSL_strerror(void)
{
unsigned long code = ERR_get_error();
const char *p = NULL;
if (code == 0x0906D06C) {
/* XXX - bad "PEM_read_bio:no start line" alias */
errno = ECONNREFUSED;
} else {
p = ERR_reason_error_string(code);
... | false | false | false | false | false | 0 |
__getblk_slow(struct block_device *bdev, sector_t block,
unsigned size, gfp_t gfp)
{
/* Size must be multiple of hard sectorsize */
if (unlikely(size & (bdev_logical_block_size(bdev)-1) ||
(size < 512 || size > PAGE_SIZE))) {
printk(KERN_ERR "getblk(): invalid block size %d requested\n",
size);
prin... | false | false | false | false | false | 0 |
sxgbe_disable_mtl_engine(struct sxgbe_priv_data *priv)
{
int queue_num;
SXGBE_FOR_EACH_QUEUE(SXGBE_TX_QUEUES, queue_num)
priv->hw->mtl->mtl_disable_txqueue(priv->ioaddr, queue_num);
} | false | false | false | false | false | 0 |
sendByte(GLEBYTE byte) {
if (m_Index >= m_Components) {
unsigned int adjust = 255-byte;
for (int i = 0; i < m_Components; i++) {
unsigned int output = (unsigned int)m_Buffer[i] + adjust;
if (output >= 0xFF) m_Pipe->sendByte(0xFF);
else m_Pipe->sendByte((GLEBYTE)output);
}
m_Index = 0;
} else {
m_Bu... | false | false | false | false | true | 1 |
prepareArticleForNNTP (Article article)
{
static Buffer dotFirstBuffer ;
static Buffer dotBuffer ;
static Buffer crlfBuffer ;
Buffer *nntpBuffs = NULL ;
int buffLen = 0 ;
int buffIdx = 0 ;
char *start, *end ;
Buffer contents = artGetContents (article) ; /* returns a reference */
if (contents == NULL)... | false | false | false | true | false | 1 |
__dbt_usercopy(env, dbt)
ENV *env;
DBT *dbt;
{
void *buf;
int ret;
if (dbt == NULL || !F_ISSET(dbt, DB_DBT_USERCOPY) || dbt->size == 0 ||
dbt->data != NULL)
return (0);
buf = NULL;
if ((ret = __os_umalloc(env, dbt->size, &buf)) != 0 ||
(ret = env->dbt_usercopy(dbt, 0, buf, dbt->size,
DB_USERCO... | false | false | false | false | false | 0 |
replace(QString& string)
{
QChar previous;
int end = string.length();
int length = 0;
for (int i = 0; i < end; ++i) {
QChar c = string.at(i);
int quote = 2;
if (c == '"') {
quote = 0;
} else if (c != '\'') {
previous = c;
continue;
}
if (!previous.isSpace() && !previous.isNull() && (previous.c... | false | false | false | false | false | 0 |
is_volatile_reg(struct device *dev, unsigned int reg)
{
struct tps65910 *tps65910 = dev_get_drvdata(dev);
/*
* Caching all regulator registers.
* All regualator register address range is same for
* TPS65910 and TPS65911
*/
if ((reg >= TPS65910_VIO) && (reg <= TPS65910_VDAC)) {
/* Check for non-existing re... | false | false | false | false | false | 0 |
Fax4Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
{
Fax3CodecState *sp = EncoderState(tif);
(void) s;
while ((long)cc > 0) {
if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels))
return (0);
_TIFFmemcpy(sp->refline, bp, sp... | false | false | false | false | false | 0 |
cloneBasicBlockSimpleAnalysis(BasicBlock *From,
BasicBlock *To, Loop *L) {
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
LoopPass *LP = getContainedPass(Index);
LP->cloneBasicBlockAnalysis(From, To, L);
}
} | false | false | false | false | false | 0 |
boxaaReadStreamVersion2(FILE *fp)
{
l_int32 n, i, x, y, w, h, version;
l_int32 ignore;
BOXA *boxa;
BOXAA *baa;
PROCNAME("boxaaReadStreamVersion2");
if (!fp)
return (BOXAA *)ERROR_PTR("stream not defined", procName, NULL);
if (fscanf(fp, "\nBoxaa Version %d\n", &version) != 1)
retu... | false | false | false | false | false | 0 |
main()
{
CIMCEnv *ce;
char *msg = NULL;
int rc;
CIMCStatus status;
CMPIObjectPath *op = NULL ;
CIMCEnumeration *enm = NULL;
CIMCClient *client = NULL;
CIMCData data;
char *cim_host, *cim_host_passwd, *cim_host_userid, *cim_host_port;
int count = 0;
/*
* Setup a connection to the CIMOM by checking environmen... | false | false | false | true | true | 1 |
write_rec_buffer( libspectrum_byte *tape_buffer,
libspectrum_dword tape_buffer_used,
int last_level_count )
{
if( last_level_count <= 0xff ) {
tape_buffer[ tape_buffer_used++ ] = last_level_count;
} else {
tape_buffer[ tape_buffer_used++ ] = 0;
tape_buffer[ tape_buffe... | false | false | false | false | false | 0 |
Split(Condition cc,
Label* if_true,
Label* if_false,
Label* fall_through) {
if (if_false == fall_through) {
__ j(cc, if_true);
} else if (if_true == fall_through) {
__ j(NegateCondition(cc), if_false);
} else {
_... | false | false | false | false | false | 0 |
afterTriggerMarkEvents(AfterTriggerEventList *events,
AfterTriggerEventList *move_list,
bool immediate_only)
{
bool found = false;
AfterTriggerEvent event;
AfterTriggerEventChunk *chunk;
for_each_event_chunk(event, chunk, *events)
{
AfterTriggerShared evtshared = GetTriggerSharedData(event);
... | false | false | false | false | false | 0 |
print(raw_ostream &OS) const {
OS << " AliasSet[" << (const void*)this << ", " << RefCount << "] ";
OS << (Alias == SetMustAlias ? "must" : "may") << " alias, ";
switch (Access) {
case NoAccess: OS << "No access "; break;
case RefAccess: OS << "Ref "; break;
case ModAccess: OS << "Mod ... | false | false | false | false | false | 0 |
aclMatchInteger(intlist * data, int i)
{
intlist *first, *prev;
first = data;
prev = NULL;
while (data) {
if (data->i == i) {
if (prev != NULL) {
/* shift the element just found to the second position
* in the list */
prev->next = data->next;
data->next = first->next;
first->next = data... | false | false | false | false | false | 0 |
gabufr_parsedesc(gabufr_parseinf * inf, gaint f, gaint x, gaint y) {
gaint rc = GABUFR_OK;
if (GABUFR_DEBUG) printf("descriptor: (%d, %d, %d)\n", f, x, y);
switch (f) {
case 0:
rc = gabufr_parse_f0(inf, x, y);
break;
case 1:
rc = gabufr_parse_f1(inf, x, y);
break;
case 2:
rc = gabuf... | false | false | false | false | false | 0 |
iwch_ep_disconnect(struct iwch_ep *ep, int abrupt, gfp_t gfp)
{
int ret=0;
unsigned long flags;
int close = 0;
int fatal = 0;
struct t3cdev *tdev;
struct cxio_rdev *rdev;
spin_lock_irqsave(&ep->com.lock, flags);
PDBG("%s ep %p state %s, abrupt %d\n", __func__, ep,
states[ep->com.state], abrupt);
tdev ... | false | false | false | false | false | 0 |
nlm4_cancel_fd_resume (void *carg)
{
nlm4_stats stat = nlm4_denied;
int ret = -EFAULT;
nfs_user_t nfu = {0, };
nfs3_call_state_t *cs = NULL;
struct gf_flock flock = {0, };
... | false | false | false | false | false | 0 |
usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
gfp_t mem_flags)
{
int res;
int i;
for (i = 0; i < ARRAY_SIZE(port->read_urbs); ++i) {
res = usb_serial_generic_submit_read_urb(port, i, mem_flags);
if (res)
goto err;
}
return 0;
err:
for (; i >= 0; --i)
usb_kill_urb(port->read_urb... | false | false | false | false | false | 0 |
hybrid_create_pixbuf(const guchar *pixbuf_data, gint pixbuf_len)
{
GdkPixbufLoader *loader;
GdkPixbuf *pixbuf;
guchar *default_pixbuf_data;
gsize default_pixbuf_size;
loader = gdk_pixbuf_loader_new();
if (!pixbuf_data || pixbuf_len == 0) { /**< Load the default. */
... | false | false | false | false | false | 0 |
position(int p, int m) {
int is_same = 0;
was_up_down = 0;
if (p<0) p = 0;
if (p>size()) p = size();
if (m<0) m = 0;
if (m>size()) m = size();
if (p == m) is_same = 1;
while (p < position_ && p > 0 && (size() - p) > 0 &&
(fl_utf8len((char)(value() + p)[0]) < 1)) { p--; }
int ul = fl_utf8len((c... | false | false | false | false | false | 0 |
processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index)
{
LEErrorCode success = LE_NO_ERROR;
const ContextualGlyphSubstitutionStateEntry *entry = entryTable.getAlias(index, success);
ByteOffset newState = SWAPW(entry->newStateOffset);
le_int16 flags = SWAPW(entry->flags);
W... | false | false | false | false | false | 0 |
assignProblem(CoinPackedMatrix*& matrix,
double*& collb, double*& colub,
double*& obj,
char*& rowsen, double*& rowrhs,
double*& rowrng)
{
modelPtr_->whatsChanged_ = 0;
// Get rid of integer information (modelPtr will get rid of its copy)
loadProblem(*matrix, collb, colub, obj, ... | false | false | false | false | false | 0 |
match_name(DirEntry **epp, const char *name)
{
for (DirEntry *ep; ((ep = *epp) != NULL); epp = &ep->next)
if (!strcmp(ep->name(), name))
return epp;
return NULL;
} | false | false | false | false | false | 0 |
setup (Test *test, gconstpointer unused)
{
test->caller = gcr_secret_exchange_new (NULL);
g_assert (GCR_IS_SECRET_EXCHANGE (test->caller));
g_object_add_weak_pointer (G_OBJECT (test->caller), (gpointer *)&test->caller);
test->callee = gcr_secret_exchange_new (NULL);
g_assert (GCR_IS_SECRET_EXCHANGE (test->callee)... | false | false | false | false | false | 0 |
tls_generate_csr (TlsCreationData * creation_data,
gnutls_x509_privkey_t *key,
gchar ** csr)
{
gnutls_x509_crq_t crq;
size_t csr_len = 0;
if (gnutls_x509_crq_init (&crq) < 0) {
return g_strdup_printf(_("Error when initializing csr structure"));
}
if (gnutls_x509_crq_set_version (crq, 1) < 0){
retu... | false | false | false | false | false | 0 |
getValue(QString node) const
{
QString key,subnode;
if (getKeyRest(node, key, subnode)) {
//not this tier
if (trees_.contains(key))
{
return trees_[key]->getValue(subnode);
}
} else {
//this tier
if (values_.contains(node))
return values_[node];
}
return missingValue;
} | false | false | false | false | false | 0 |
READ_dump_pattern(PATTERN *pattern)
{
int type = PATTERN_type(*pattern);
int index = PATTERN_index(*pattern);
/*pos = (int)(pattern - JOB->pattern);
if (pos < 0 || pos >= JOB->pattern_count)
return;
printf("%d ", pos);*/
if (PATTERN_flag(*pattern) & RT_FIRST)
printf("!");
else
printf(" ");
if (PATTE... | false | false | false | false | false | 0 |
maybe_skip_until (gimple phi, tree target, ao_ref *ref,
tree vuse, bitmap *visited)
{
if (!*visited)
*visited = BITMAP_ALLOC (NULL);
bitmap_set_bit (*visited, SSA_NAME_VERSION (PHI_RESULT (phi)));
/* Walk until we hit the target. */
while (vuse != target)
{
gimple def_stmt = SSA_NAME_DEF_ST... | false | false | false | false | false | 0 |
createObjectWriter(raw_ostream &OS) const {
return createELFObjectWriter(new MBlazeELFObjectWriter(OSType), OS,
/*IsLittleEndian*/ false);
} | false | false | false | false | false | 0 |
gvrender_begin_label(GVJ_t * job, label_type type)
{
gvrender_engine_t *gvre = job->render.engine;
if (gvre) {
if (gvre->begin_label)
gvre->begin_label(job, type);
}
} | false | false | false | false | false | 0 |
lex_begin (int ioi) {
lexer_fd = ioi;
lexptr = NULL;
if (!(lexbuf = malloc (LEXBUFSIZ))) {
fprintf (stderr, "cannot allocate buffer\n");
return -1;
}
lexsiz = LEXBUFSIZ;
return 0;
} | false | false | false | false | false | 0 |
calc()
{
//implementation the old function "Vorwaertsschnitt"
m_intersection_point.set_PktNr( m_bpoint_bore_list_intern->begin()->m_nr );
std::vector<BPoint> m_bpoint_list_intern;
//copy to the old data structure
m_bpoint_list_intern.insert( m_bpoint_list_intern.begin() , m_bpoint_bore_list_intern... | false | false | false | false | false | 0 |
panel_widget_real_focus (GtkWidget *widget,
GtkDirectionType direction)
{
if (gtk_widget_get_can_focus (widget) && gtk_container_get_children (GTK_CONTAINER (widget))) {
gtk_widget_set_can_focus (widget, FALSE);
}
return GTK_WIDGET_CLASS (panel_widget_parent_class)->focus (widget, ... | false | false | false | false | false | 0 |
undoAction( const Context& context )
{
VehicleType* vt = vehicleTypeRepository.getObject_byID( vehicleTypeId );
if ( !vt )
return ActionResult(22902);
getContainer()->deleteProductionLine( vt );
return ContainerCommand::undoAction( context );
} | false | false | false | false | false | 0 |
debugTree(FILE *fp, const int indent) const
{
(void)fprintf(fp, "%02d", indent - 1);
int i;
for (i = 0; i < indent; i++) { (void)fprintf(fp, " "); }
const SbVec3f & vmin = this->nodesize.getMin();
const SbVec3f & vmax = this->nodesize.getMax();
(void)fprintf(fp, "%s, %d items, ",
this->i... | false | false | false | false | false | 0 |
lessThanTrack( const QModelIndex &left, const QModelIndex &right ) const
{
const Meta::TrackPtr leftTrack = Meta::TrackPtr::dynamicCast( treeItem(left)->data() );
const Meta::TrackPtr rightTrack = Meta::TrackPtr::dynamicCast( treeItem(right)->data() );
if( !leftTrack || !rightTrack )
{
DEBUG_BLO... | false | false | false | false | false | 0 |
CalcIndex(const unsigned short int aProb[32], unsigned int *piIdx, unsigned int *pnNonZero)
{
int i;
int j = 32;
/* find max non-zero element */
for (i = 31; i >= 0; --i)
if (aProb[i]) {
j = i;
break;
}
/* find min non-zero element */
*piIdx = 0;
... | false | false | false | false | false | 0 |
eio_handle_mainloop(eio_handle_t *eio)
{
int retval = 0;
struct pollfd *pollfds = NULL;
eio_obj_t **map = NULL;
unsigned int maxnfds = 0, nfds = 0;
unsigned int n = 0;
xassert (eio != NULL);
xassert (eio->magic == EIO_MAGIC);
for (;;) {
/* Alloc memory for pfds and map if neede... | false | false | false | false | false | 0 |
ParseIdentifierNameOrGetOrSet(bool* is_get,
bool* is_set,
bool* ok) {
Identifier result = ParseIdentifierName(ok);
if (!*ok) return Identifier::Default();
if (scanner_->is_literal_ascii() ... | false | false | false | false | false | 0 |
find(object_cref sub, object_cref start, object_cref end) const
{
long result = _BOOST_PYTHON_ASLONG(this->attr("find")(sub,start,end).ptr());
if (PyErr_Occurred())
throw_error_already_set();
return result;
} | false | false | false | false | false | 0 |
rt2x00link_start_vcocal(struct rt2x00_dev *rt2x00dev)
{
struct link *link = &rt2x00dev->link;
if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
rt2x00dev->ops->lib->vco_calibration)
ieee80211_queue_delayed_work(rt2x00dev->hw,
&link->vco_work,
VCO_INTERVAL);
} | false | false | false | false | false | 0 |
gth_sa_collection_traverse(const GthSACollection *sa_collection,
GthSAVisitor *sa_visitor, GthInput *input)
{
GthSACollectionIterator *iterator;
unsigned long num_of_sas = 0;
GthSA *sa;
gt_assert(sa_collection && sa_visitor && input);
gth_sa_visitor_preface(sa_visitor);
itera... | false | false | false | false | false | 0 |
multi_reparse(mp)
MULBUF *mp;
{
m_position to;
/*
* We found something wrong and going to move first byte.
* So, we clear single-shifted character set because it will
* shift only this one byte being makred wrong.
*/
if (mp->ms->sg != WRONGPLANE) {
mp->ms->sg = WRONGPLANE;
fix_status_... | false | false | false | false | false | 0 |
add_busytime(icalcomponent *comp, struct icaltime_span *span,
void *rock)
{
struct busytime *busytime = (struct busytime *) rock;
int is_date = icaltime_is_date(icalcomponent_get_dtstart(comp));
icaltimezone *utc = icaltimezone_get_utc_timezone();
struct icalperiodtype *newp;
/* Grow the array,... | false | false | false | false | false | 0 |
pidff_find_fields(struct pidff_usage *usage, const u8 *table,
struct hid_report *report, int count, int strict)
{
int i, j, k, found;
for (k = 0; k < count; k++) {
found = 0;
for (i = 0; i < report->maxfield; i++) {
if (report->field[i]->maxusage !=
report->field[i]->report_count) {
pr_debu... | false | false | false | false | false | 0 |
atmel_spi_lock(struct atmel_spi *as) __acquires(&as->lock)
{
spin_lock_irqsave(&as->lock, as->flags);
} | false | false | false | false | false | 0 |
ASU_31D( const int& h, const int& k, const int& l )
{ return (k+l>=0 && -l-h>0) || (h==-l && k==-l && h+k-l>=0); } | false | false | false | false | false | 0 |
run(KProcess * p, const QString & executable, const KStartupInfoId& id)
{
return (new KProcessRunner(p, executable, id))->pid();
} | false | false | false | false | false | 0 |
mlxsw_pci_eq_dbg_read(struct seq_file *file, void *data)
{
struct mlxsw_pci *mlxsw_pci = dev_get_drvdata(file->private);
struct mlxsw_pci_queue *q;
int i;
static const char hdr[] =
"NUM CONS_COUNT EV_CMD EV_COMP EV_OTHER COUNT\n";
seq_printf(file, hdr);
for (i = 0; i < mlxsw_pci_eq_count(mlxsw_pci); i... | false | false | false | false | false | 0 |
check_fabric_firmware_versions(struct hfi1_devdata *dd)
{
u32 frame, version, prod_id;
int ret, lane;
/* 4 lanes */
for (lane = 0; lane < 4; lane++) {
ret = read_8051_config(dd, SPICO_FW_VERSION, lane, &frame);
if (ret) {
dd_dev_err(
dd,
"Unable to read lane %d firmware details\n",
lane);
con... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.