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 |
|---|---|---|---|---|---|---|
glue_header_name (pfile)
cpp_reader *pfile;
{
cpp_token *header = NULL;
const cpp_token *token;
unsigned char *buffer;
size_t len, total_len = 0, capacity = 1024;
/* To avoid lexed tokens overwriting our glued name, we can only
allocate from the string pool once we've lexed everything. */
buffer... | false | false | false | false | false | 0 |
eti_table_model_pre_change (ETableModel *table_model,
ETableItem *eti)
{
eti_cancel_drag_due_to_model_change (eti);
eti_check_cursor_bounds (eti);
if (eti_editing (eti))
e_table_item_leave_edit_(eti);
eti->motion_row = -1;
eti->motion_col = -1;
eti_freeze (eti);
} | false | false | false | false | false | 0 |
mos_lines_width(const float *spectrum, int length)
{
const char *func = "mos_lines_width";
double *profile1 = cpl_calloc(length - 1, sizeof(double));
double *profile2 = cpl_calloc(length - 1, sizeof(double));
double norm, value, max;
int radius = 20;
int short_length = length - 2*radius - 1;
i... | false | false | false | false | false | 0 |
newStringList() {
/*
create a new string list
*/
struct sStringList *stringList;
// create the dummy head element
stringList = malloc(sizeof(struct sStringList));
if (stringList == NULL) {
stderror();
return NULL;
}
stringList->str = NULL;
stringList->next = NULL;
return stringList;
} | false | false | false | false | false | 0 |
listExtensionContents(const char *pattern)
{
PQExpBufferData buf;
PGresult *res;
int i;
if (pset.sversion < 90100)
{
fprintf(stderr, _("The server (version %d.%d) does not support extensions.\n"),
pset.sversion / 10000, (pset.sversion / 100) % 100);
return true;
}
initPQExpBuffer(&buf);
printfPQEx... | false | false | false | false | false | 0 |
dwarf_formref(Dwarf_Attribute attr,
Dwarf_Off * ret_offset, Dwarf_Error * error)
{
Dwarf_Debug dbg = 0;
Dwarf_Unsigned offset = 0;
Dwarf_CU_Context cu_context = 0;
Dwarf_Unsigned maximumoffset = 0;
int res = DW_DLV_ERROR;
*ret_offset = 0;
res = get_attr_dbg(&dbg,&cu_context,attr,error... | false | false | false | false | false | 0 |
new_ccmx(void) {
ccmx *p;
if ((p = (ccmx *)calloc(1, sizeof(ccmx))) == NULL)
return NULL;
p->refrmode = -1;
p->cbid = 0;
/* Init method pointers */
p->del = del_ccmx;
p->set_ccmx = set_ccmx;
p->create_ccmx = create_ccmx;
p->write_ccmx = write_ccmx;
p->buf_write_ccmx = buf_write_cc... | false | false | false | false | false | 0 |
save_pre_frame( cpl_frame * frame, xsh_instrument * instrument,
cpl_frame *B_frame)
{
xsh_pre *pre = NULL;
cpl_frame * res_frame = NULL ;
const char * fname = NULL ;
cpl_propertylist *list_B = NULL;
const char * name_B = NULL;
double ra_off_B, dec_off_B;
double ra_cumoff_B, dec_cumoff_B;
/* Load pre ... | false | false | false | false | false | 0 |
grasp (const Event& e, Tool31& tool) {
ToolState& ts = tool.toolstate();
ts._init = e;
ts._last = e;
getbounds(ts._l, ts._b, ts._r, ts._t);
if (tool.tool() == Tool31::scale) {
Coord lx, ly;
Coord cx, cy;
lx = e.pointer_x();
ly = e.pointer_y();
cx = (ts._l + t... | false | false | false | false | false | 0 |
VechMatVecVec(void* AA, double x[], int n, double *v){
vechmat* A=(vechmat*)AA;
int info,rank=n,i=0,j,k,kk;
const int *ind=A->ind,ishift=A->ishift;
double vv=0,dd;
const double *val=A->val,nnz=A->nnzeros;
if (A->factored==3){
info=VechMatGetRank(AA,&rank,n);
if (nnz>3 && rank<nnz){
info=Eig... | false | false | false | false | false | 0 |
lpfc_sli4_repost_scsi_sgl_list(struct lpfc_hba *phba)
{
LIST_HEAD(post_sblist);
int num_posted, rc = 0;
/* get all SCSI buffers need to repost to a local list */
spin_lock_irq(&phba->scsi_buf_list_get_lock);
spin_lock(&phba->scsi_buf_list_put_lock);
list_splice_init(&phba->lpfc_scsi_buf_list_get, &post_sblist);
... | false | false | false | false | false | 0 |
hawki_bkg_from_running_mean_frame_extension
(hawki_bkg_frames_buffer * frames_buffer,
cpl_vector * offsets_x,
cpl_vector * offsets_y,
cpl_image * globalmask,
double mask_off_x,
double mask_off_y,
cpl_image * distortion_x,
... | false | false | false | false | false | 0 |
roadriot_sloop_tweak(int offset)
{
/*
sequence 1:
touch $68000
touch $68eee and $124/$678/$abc/$1024(bank) in the same instruction
touch $69158/$6a690/$6e708/$71166
sequence 2:
touch $5edb4 to add 2 to the bank
touch $5db0a to add 1 to the bank
touch $5f042
touch $69158/$6a690/$6e708/$7... | false | false | false | false | false | 0 |
vmap_find_lwobj(path_map_t path_map[], view_map_t *vmap,
loc_t loc, move_info_t *move_info, int beat_cost)
{
perimeter_t *cur_land;
perimeter_t *cur_water;
perimeter_t *new_land;
perimeter_t *new_water;
int cur_cost;
cur_land = &p1;
cur_water = &p2;
new_water = &p3;
new_land = &... | false | false | false | false | false | 0 |
loop_exit_at_end_p (struct loop *loop)
{
struct niter_desc *desc = get_simple_loop_desc (loop);
rtx insn;
if (desc->in_edge->dest != loop->latch)
return false;
/* Check that the latch is empty. */
FOR_BB_INSNS (loop->latch, insn)
{
if (NONDEBUG_INSN_P (insn))
return false;
}
return tr... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
BOOL config_read;
/* parse args and set global vars as needed */
parse_args(argc, argv);
if (option_config_path == NULL)
option_config_path = DEFAULT_CONFIG_PATH;
config_read = read_config(option_config_path);
if (config_read)
log_message(STREAM_MAIN, MSG_GOOD, ... | false | false | false | false | false | 0 |
scanA(struct histindex *index, int line1, int count1)
{
unsigned int ptr, tbl_idx;
unsigned int chain_len;
struct record **rec_chain, *rec;
for (ptr = LINE_END(1); line1 <= ptr; ptr--) {
tbl_idx = TABLE_HASH(index, 1, ptr);
rec_chain = index->records + tbl_idx;
rec = *rec_chain;
chain_len = 0;
while (re... | false | false | false | false | false | 0 |
open_read_cancelled_cb (GVfsJob *job, gpointer data)
{
guint tag = GPOINTER_TO_INT (data);
g_print ("open_read_cancelled_cb\n");
if (g_source_remove (tag))
g_vfs_job_failed (job, G_IO_ERROR,
G_IO_ERROR_CANCELLED,
_("Operation was cancelled"));
} | false | false | false | false | false | 0 |
FSAdjustStack(
FDB * pDb,
LFILE * pLFile,
BTSK * pStack,
FLMBOOL bMovedNext)
{
RCODE rc = FERR_OK;
pStack->uiFlags = FULL_STACK;
// Pop the stack and go to the next element This is a recursive call
// back to FSBtNextElm() or FSBtPrevElm() Watch out, this will not work
// if the concurrency model changes t... | false | false | false | false | false | 0 |
xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
struct usb_host_endpoint *ep)
{
struct xhci_hcd *xhci;
struct xhci_container_ctx *in_ctx, *out_ctx;
struct xhci_input_control_ctx *ctrl_ctx;
unsigned int ep_index;
struct xhci_ep_ctx *ep_ctx;
u32 drop_flag;
u32 new_add_flags, new_drop_flags;
int... | false | false | false | false | false | 0 |
del_estr(EXPSTR * es)
{
#if DEBUG_UGLY_EXPSTR
if (es)
{
if (es->es_data)
{
#if DEBUG_UGLY_EXPSTR == 2
STRARR s[17];
strncpy(s, es->es_data, 17);
s[16] = 0;
D(fprintf(stderr, DEXP "del_estr(%p,`%s')\n", es, s));
umem_wallcheck("del_estr(... | false | true | false | false | true | 1 |
add_patch(int adrs, char *str)
{
int len;
char *ctext;
COMMENT_PTR patch_ptr;
len = strlen(str) - 1;
if (len >= 0 && (str[len] == '\n' || str[len] == '\r'))
str[len] = '\0'; // get rid of newline
if (!patch_list) // first patch
{
patch_list = malloc(sizeof(struct comment)... | false | true | false | false | false | 1 |
nfs3_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
{
struct nfs3_linkargs arg = {
.fromfh = NFS_FH(inode),
.tofh = NFS_FH(dir),
.toname = name->name,
.tolen = name->len
};
struct nfs3_linkres res;
struct rpc_message msg = {
.rpc_proc = &nfs3_procedures[NFS3PROC_LINK],
.rpc_arg... | false | false | false | false | false | 0 |
anjuta_report_get_docman (AnjutaReport* self) {
IAnjutaDocumentManager* result;
IAnjutaDocumentManager* _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = self->priv->_docman;
result = _tmp0_;
return result;
} | false | false | false | false | false | 0 |
entryMap(const QString& aGroup) const
{
Q_D(const KConfig);
QMap<QString, QString> theMap;
const QByteArray theGroup(aGroup.isEmpty() ? "<default>" : aGroup.toUtf8());
const KEntryMapConstIterator theEnd = d->entryMap.constEnd();
KEntryMapConstIterator it = d->entryMap.findEntry(theGroup, 0, 0);
... | false | false | false | false | false | 0 |
gck_enumerator_get_object_type (GckEnumerator *self)
{
GType result;
g_return_val_if_fail (GCK_IS_ENUMERATOR (self), 0);
g_mutex_lock (self->pv->mutex);
result = self->pv->object_type;
g_mutex_unlock (self->pv->mutex);
return result;
} | false | false | false | false | false | 0 |
xaccTransIsBalanced (const Transaction *trans)
{
MonetaryList *imbal_list;
gboolean result;
gnc_numeric imbal = gnc_numeric_zero();
gnc_numeric imbal_trading = gnc_numeric_zero();
if (trans == NULL) return FALSE;
if (xaccTransUseTradingAccounts(trans))
{
/* Transaction is imbalance... | false | false | false | false | false | 0 |
add_wraps_around_facet(struct isl_wraps *wraps,
struct isl_coalesce_info *info, int k, isl_int *bound,
__isl_keep isl_set *set)
{
struct isl_tab_undo *snap;
int n;
unsigned total = isl_basic_map_total_dim(info->bmap);
snap = isl_tab_snap(info->tab);
if (isl_tab_select_facet(info->tab, info->bmap->n_eq + k) < 0... | false | false | false | false | false | 0 |
concatenate_unary_strings(struct bt_list_head *head)
{
struct ctf_node *node;
GString *str;
int i = 0;
str = g_string_new("");
bt_list_for_each_entry(node, head, siblings) {
char *src_string;
if (node->type != NODE_UNARY_EXPRESSION
|| node->u.unary_expression.type != UNARY_STRING
|| !((node->u.unary_... | false | false | false | false | false | 0 |
diff(const RCP<const Symbol> &x) const
{
return mul(sub(one, pow(tanh(get_arg()), i2)), get_arg()->diff(x));
} | false | false | false | false | false | 0 |
rtl88eu_phy_lc_calibrate(struct adapter *adapt)
{
bool singletone = false, carrier_sup = false;
u32 timeout = 2000, timecount = 0;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
struct odm_dm_struct *dm_odm = &hal_data->odmpriv;
if (!(dm_odm->SupportAbility & ODM_RF_CALIBRATION))
return;
if (singletone... | false | false | false | false | false | 0 |
lto_streamer_cache_create (void)
{
struct lto_streamer_cache_d *cache;
VEC(tree, heap) *common_nodes;
unsigned i;
tree node;
cache = XCNEW (struct lto_streamer_cache_d);
cache->node_map = htab_create (101, tree_int_map_hash, tree_int_map_eq, NULL);
cache->node_map_entries = create_alloc_pool ("node map... | false | false | false | false | false | 0 |
deriv(char x) const {
ptr<expr> de = e->d(x);
// Check conditions on de [same as make]
switch ( de->type() ) {
// Map expression match generation into exit generation
case eps_type: return look_expr::make(eg(0));
case look_type: return look_expr::make(eg(de->match().max()));
// Propegate fail and infi... | false | false | false | false | false | 0 |
rld_restore_header(const char *fn, FILE **_fp)
{
FILE *fp;
rld_t *e;
char magic[4];
uint64_t a[3];
int32_t i, x;
if (strcmp(fn, "-") == 0) *_fp = fp = stdin;
else if ((*_fp = fp = fopen(fn, "rb")) == 0) return 0;
fread(magic, 1, 4, fp);
if (strncmp(magic, "RLD\2", 4)) return 0;
fread(&x, 4, 1, fp);
e = rld_... | false | false | true | false | true | 1 |
dumpCExpression ( dumpInterface* dump, const DLTree* C )
{
if ( C == NULL )
return;
Token t = C->Element().getToken();
diOp tag;
switch (t)
{
case TOP:
return dump->dumpTop();
case BOTTOM:
return dump->dumpBottom();
case CNAME:
case INAME:
return dump->dumpConcept(static_cast<TConcept*>(C->Element().... | false | false | false | false | false | 0 |
SaveToDB()
{
static SqlStatementID delComplAchievements ;
static SqlStatementID insComplAchievements ;
static SqlStatementID delProgress ;
static SqlStatementID insProgress ;
if (!m_completedAchievements.empty())
{
// delete existing achievements in the loop
for (CompletedAchiev... | false | false | false | false | false | 0 |
handle_edit_unit_remove(struct connection *pc, int owner,
int tile, Unit_type_id utid, int count)
{
struct tile *ptile;
struct unit_type *punittype;
struct player *pplayer;
int i;
ptile = index_to_tile(tile);
if (!ptile) {
notify_conn(pc->self, NULL, E_BAD_COMMAND, ftc_edit... | false | false | false | false | true | 1 |
destroy_symmetry_element( SYMMETRY_ELEMENT *elem )
{
if( elem != NULL ){
if( elem->transform != NULL )
free( elem->transform ) ;
free( elem ) ;
}
} | false | false | false | false | false | 0 |
getCmdLine() const
{
fxStr s(getty);
for (u_int i = 1; argv[i] != NULL; i++) {
s.append(' ');
s.append(argv[i]);
}
return (s);
} | false | false | false | false | false | 0 |
subtract( const Meta::TrackPtr& B )
{
if( !m_collection )
return;
if( !B )
return;
QString str = B->uidUrl();
if( !m_collection->m_ids.contains( str ) )
{
// that seems to happen. e.g. for tracks from the file collection
warning() << "TrackSet::subtract called for a ... | false | false | false | false | false | 0 |
HasBreakpoint(int line) const
{
if (line == -1)
line = GetControl()->GetCurrentLine();
return LineHasMarker(BREAKPOINT_MARKER, line);
} | false | false | false | false | false | 0 |
ScanForMapProjection()
{
CeosRecord_t *record;
char szField[100];
int i;
/* -------------------------------------------------------------------- */
/* Find record, and try to determine if it has useful GCPs. */
/* -------------------------------------------------------------------- *... | false | false | false | false | false | 0 |
FS2NetD_GetMissionsList(SCP_vector<file_record> &m_list, bool do_send)
{
int buffer_size, buffer_offset;
bool my_packet = false;
char buffer[16384];
if (do_send) {
INIT_PACKET( PCKT_MISSIONS_RQST );
DONE_PACKET();
if ( FS2NetD_SendData(buffer, buffer_size) == -1 ) {
return -1;
}
} else if ( FS2NetD_Da... | false | false | false | false | true | 1 |
execute()
{
if(!initialized)
runtime_initialize();
ia->put_fsr(k);
cpu16->pc->skip();
//cpu16->pc->increment();
} | false | false | false | false | false | 0 |
kernel1(double d, double rs, double lambda)
{
double res;
double a = lambda - 1.;
if (lambda == 1.) {
res = 1. / (M_PI * (d * d + rs * rs));
}
else {
res = segno(a) * (a / M_PI) * (pow(rs, 2. * a)) *
(1 / pow(d * d + rs * rs, lambda));
}
/* res=1./(M_PI*(d*d+rs*rs)); */
return ... | false | false | false | false | false | 0 |
cb_position_changed (GtkWidget *spin, ObjectPrefState *state)
{
GogViewAllocation pos;
double value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)) / 100.0;
gog_object_get_manual_position (state->gobj, &pos);
if (spin == state->x_spin)
pos.x = value;
else if (spin == state->y_spin)
pos.y = value;
els... | false | false | false | false | false | 0 |
CalcBandEnergyMS(const Word32 *mdctSpectrumLeft,
const Word32 *mdctSpectrumRight,
const Word16 *bandOffset,
const Word16 numBands,
Word32 *bandEnergyMid,
Word32 *bandEnergyMidSum,
... | false | false | false | false | false | 0 |
proc_any_char(GtIO *obo_file, GtStr *capture, bool be_permissive,
GtError *err)
{
gt_error_check(err);
gt_assert(obo_file && capture);
if (!any_char(obo_file, be_permissive)) {
if (gt_io_peek(obo_file) == GT_END_OF_FILE) {
gt_error_set(err, "file \"%s\": line %lu: unexpected end... | false | false | false | false | false | 0 |
iscsi_sched_ev_context(struct iscsi_ev_context *ev_context,
struct iscsi_conn *conn, unsigned long tmo,
int event)
{
enum iscsi_err error;
log_debug(7, "sched conn context %p event %d, tmo %lu",
&ev_context->actor, event, tmo);
ev_context->conn = conn;
switch (event) {
case EV_CONN_RECV_PDU:
ac... | false | false | false | false | false | 0 |
client_check_source_auth (client_t *client, const char *mount)
{
ice_config_t *config = config_get_config();
char *pass = config->source_password;
char *user = "source";
int ret = -1;
mount_proxy *mountinfo = config_find_mount (config, mount);
do
{
if (mountinfo)
{
... | false | false | false | false | false | 0 |
digitv_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct dvb_usb_device *d;
int ret = dvb_usb_device_init(intf, &digitv_properties, THIS_MODULE, &d,
adapter_nr);
if (ret == 0) {
u8 b[4] = { 0 };
if (d != NULL) { /* do that only when the firmware is loaded */
b[0] = 1;
... | false | false | false | false | false | 0 |
timeClip(double t)
{
if (isnan(t) || isInf(t))
return NaN;
double at = fabs(t);
if (at > 8.64E15)
return NaN;
return copysign(floor(at), t);
} | false | false | false | false | false | 0 |
addModule(Module *pModule)
{
if (pModule) {
MSymbolTables[pModule->name()] = &pModule->getSymbolTable();
globalSymbols.addSymbol(pModule);
}
} | false | false | false | false | false | 0 |
isfat (uae_u8 *p)
{
int i, b;
if ((p[0x15] & 0xf0) != 0xf0)
return 0;
if (p[0x0b] != 0x00 || p[0x0c] != 0x02)
return 0;
b = 0;
for (i = 0; i < 8; i++) {
if (p[0x0d] & (1 << i))
b++;
}
if (b != 1)
return 0;
if (p[0x0f] != 0)
return 0;
if (p[0x0e] > 8 || p[0x0e] == 0)
return 0;
if (p[0x10] == 0 ... | false | false | false | false | false | 0 |
do_accept(EpmdVars *g,int listensock)
{
int msgsock;
struct EPMD_SOCKADDR_IN icli_addr; /* workaround for QNX bug - cannot */
int icli_addr_len; /* handle NULL pointers to accept. */
icli_addr_len = sizeof(icli_addr);
msgsock = accept(listensock,(struct sockaddr*) &icli_addr,
(u... | false | false | false | false | false | 0 |
gst_camerabin_color_balance_list_channels (GstColorBalance * cb)
{
if (cb && GST_CAMERABIN (cb)->src_vid_src) {
GstColorBalance *cbl = GST_COLOR_BALANCE (GST_CAMERABIN (cb)->src_vid_src);
return gst_color_balance_list_channels (cbl);
} else {
return NULL;
}
} | false | false | false | false | false | 0 |
polsub( a, na, b, nb, c )
double a[], b[], c[];
int na, nb;
{
int i, n;
if( na > nb )
n = na;
else
n = nb;
if( n > MAXPOL )
n = MAXPOL;
for( i=0; i<=n; i++ )
{
if( i > na )
c[i] = b[i];
else if( i > nb )
c[i] = -a[i];
else
c[i] = b[i] - a[i];
}
} | false | false | false | false | false | 0 |
aoechr_error(char *msg)
{
struct ErrMsg *em;
char *mp;
ulong flags, n;
n = strlen(msg);
spin_lock_irqsave(&emsgs_lock, flags);
em = emsgs + emsgs_tail_idx;
if ((em->flags & EMFL_VALID)) {
bail: spin_unlock_irqrestore(&emsgs_lock, flags);
return;
}
mp = kmemdup(msg, n, GFP_ATOMIC);
if (mp == NULL) {
p... | false | false | false | false | false | 0 |
renderTextOutlined(const std::string &text,
const SDL_Color &color, int outlineWidth) const
{
static const SDL_Color BLACK = {0, 0, 0, 255};
//NOTE: uses spaces to ensure space for outline
SDL_Surface *surface = renderText(" " + text + " ", color);
Outline outline(BLACK, outlineWidth);
... | false | false | false | false | false | 0 |
locked_read()
{
message m=locked_peek();
if (locked_has_message())
messages->queue.pop();
return m;
} | false | false | false | false | false | 0 |
output_file(FILE *fp, BUF_NODE ** OBUF, DME_TREE_NODE * OT, DME_TREE_NODE ** OTmap,int label){
if ( fp == NULL) {
printf(" error input file name \n");
return ;
}
if (label == 1)
print_fig_3(OT,OTmap);
fprintf(fp,"sourcenode 0 0\n");
fprintf(fp,"num node %d\n", num_node);
Out_put_files_coordinate(f... | false | false | false | false | false | 0 |
bus_sync_handler (GstBus * bus, GstMessage * message, gpointer data)
{
GstElement *pipeline = (GstElement *) data;
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_STATE_CHANGED:
/* we only care about pipeline state change messages */
if (GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (pipeline... | false | false | false | false | true | 1 |
HandleAddFlatModifierAuraProc(Unit* pVictim, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
{
SpellEntry const* spellInfo = triggeredByAura->GetSpellProto();
if (spellInfo->Id == 55166) // Tidal For... | false | false | false | false | false | 0 |
GetETAStrSFromSize(off_t s)
{
xstring &eta=GetETAStrFromSize(s);
if(eta.length())
eta.append(' ');
return eta;
} | false | false | false | false | false | 0 |
addRangeTableEntry(ParseState *pstate,
RangeVar *relation,
Alias *alias,
bool inh,
bool inFromCl)
{
RangeTblEntry *rte = makeNode(RangeTblEntry);
char *refname = alias ? alias->aliasname : relation->relname;
LOCKMODE lockmode;
Relation rel;
rte->rtekind = RTE_RELATION;
rte->alias =... | false | false | false | false | false | 0 |
hpfs_chk_sectors(struct super_block *s, secno start, int len, char *msg)
{
if (start + len < start || start < 0x12 ||
start + len > hpfs_sb(s)->sb_fs_size) {
hpfs_error(s, "sector(s) '%s' badly placed at %08x", msg, start);
return 1;
}
if (hpfs_sb(s)->sb_chk>=2) {
int i;
for (i = 0; i < len; i++)
... | false | false | false | false | false | 0 |
setLocale(KLocale *newLocale, CopyCatalogs copy)
{
PRIVATE_DATA;
if (copy == DoCopyCatalogs && d->locale)
locale()->copyCatalogsTo(newLocale);
delete d->locale;
d->locale = newLocale;
} | false | false | false | false | false | 0 |
CDB___db_prtree(dbp, flags)
DB *dbp;
u_int32_t flags;
{
PAGE *h;
db_pgno_t i, last;
int ret;
if (set_psize == PSIZE_BOUNDARY)
CDB___db_psize(dbp);
/* Find out the page number of the last page in the database. */
if ((ret = CDB_memp_fget(dbp->mpf, &last, DB_MPOOL_LAST, &h)) != 0)
return (ret);
if ((ret = ... | false | false | false | false | false | 0 |
vwarning (msg, args)
char *msg;
va_list args;
{
int i;
FILE_BUF *ip = NULL;
if (inhibit_warnings)
return;
if (warnings_are_errors)
errors++;
print_containing_files ();
for (i = indepth; i >= 0; i--)
if (instack[i].fname != NULL) {
ip = &instack[i];
break;
}
if (i... | false | false | false | false | false | 0 |
carl9170_rng_get(struct ar9170 *ar)
{
#define RW (CARL9170_MAX_CMD_PAYLOAD_LEN / sizeof(u32))
#define RB (CARL9170_MAX_CMD_PAYLOAD_LEN)
static const __le32 rng_load[RW] = {
[0 ... (RW - 1)] = cpu_to_le32(AR9170_RAND_REG_NUM)};
u32 buf[RW];
unsigned int i, off = 0, transfer, count;
int err;
BUILD_BUG_ON(RB >... | false | false | false | false | false | 0 |
do_poll(unsigned int nfds, struct poll_list *list,
struct poll_wqueues *wait, struct timespec *end_time)
{
poll_table* pt = &wait->pt;
ktime_t expire, *to = NULL;
int timed_out = 0, count = 0;
unsigned long slack = 0;
unsigned int busy_flag = net_busy_loop_on() ? POLL_BUSY_LOOP : 0;
unsigned long busy_end =... | false | false | false | false | false | 0 |
web_proxy_flush_html_file(int fd)
{
int ret;
ret = ffile_puts(fd, "\t</body>\r\n</html>");
if (ret < 0)
{
pr_red_info("ffile_puts");
return ret;
}
return fsync(fd);
} | false | false | false | false | false | 0 |
Clp_SetOptionChar(Clp_Parser *clp, int c, int type)
{
int i, long1pos, long1neg;
int old = Clp_OptionChar(clp, c);
Clp_Internal *cli = clp->internal;
if (type != Clp_NotOption && type != Clp_Short && type != Clp_Long
&& type != Clp_ShortNegated && type != Clp_LongNegated
&& type != Clp_LongImplicit &... | false | false | false | false | false | 0 |
dns_handle_remote() {
struct sockaddr *src_addr = malloc(sizeof(struct sockaddr));
socklen_t src_len = sizeof(struct sockaddr);
uint16_t query_id;
ssize_t len;
const char *question_hostname;
int r;
ns_msg msg;
len = recvfrom(remote_sock, global_buf, BUF_SIZE, 0, src_addr, &src_len);
if (len > 0) {
... | false | false | false | false | false | 0 |
_gtk_source_language_create_engine (GtkSourceLanguage *language)
{
GtkSourceContextEngine *ce = NULL;
GtkSourceContextData *ctx_data;
ctx_data = gtk_source_language_parse_file (language);
if (ctx_data != NULL)
{
ce = _gtk_source_context_engine_new (ctx_data);
_gtk_source_context_data_unref (ctx_data);
}
r... | false | false | false | false | false | 0 |
ExecUnbPosObj (
Expr stat )
{
Obj list; /* list, left operand */
Obj pos; /* position, left operand */
Int p; /* position, as a C integer */
/* evaluate the list (checking i... | false | false | false | false | false | 0 |
defaults() {
if (getenv("HOME") == NULL) {
fprintf(stderr, "missing HOME variable\n");
exit(1);
}
strncpy(config_file_name, (char *) getenv("HOME"), MAX_INPUT_LENGTH);
strncat(config_file_name, "/", MAX_INPUT_LENGTH-strlen(config_file_name));
strncat(config_file_name, RCFILE, MAX_INPUT_LENGTH-strlen(con... | false | false | false | false | false | 0 |
niu_open(struct net_device *dev)
{
struct niu *np = netdev_priv(dev);
int err;
netif_carrier_off(dev);
err = niu_alloc_channels(np);
if (err)
goto out_err;
err = niu_enable_interrupts(np, 0);
if (err)
goto out_free_channels;
err = niu_request_irq(np);
if (err)
goto out_free_channels;
niu_enable_nap... | false | false | false | false | false | 0 |
glade_placeholder_drag_highlight (_GladeDrag *dest, gint x, gint y)
{
GladePlaceholderPrivate *priv = GLADE_PLACEHOLDER (dest)->priv;
gboolean highlight = !(x < 0 || y < 0);
if (priv->drag_highlight == highlight)
return;
priv->drag_highlight = highlight;
gtk_widget_queue_draw (GTK_WIDGET (dest));
} | false | false | false | false | false | 0 |
_vala_caribou_key_model_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
CaribouKeyModel * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, CARIBOU_TYPE_KEY_MODEL, CaribouKeyModel);
switch (property_id) {
case CARIBOU_KEY_MODEL_ALIGN:
g_value_set_string (value, caribou_key... | false | false | false | false | false | 0 |
uri_init(Uri *u)
{
Uri *uri;
if (u == NULL)
uri = ALLOC(Uri);
else
uri = u;
uri->uri = NULL;
uri->scheme = NULL;
uri->authority = NULL;
uri->host = NULL;
uri->host_is_dn = 0;
uri->host_is_ip = 0;
uri->userinfo = NULL;
uri->port = 0;
uri->port_given = NULL;
uri->server = 0;
uri->path = NU... | false | false | false | false | false | 0 |
SetUnit( Unit *u, const Point &pos ) {
short conquer = 0;
short x = pos.x, y = pos.y;
if ( (x >= 0) && (y >= 0) ) {
if ( u ) {
u->SetPosition( x, y );
Transport *local = static_cast<Transport *>(GetUnit( pos ));
if ( local ) { // move into transport
if ( u->IsDummy() ) u->SetFl... | false | false | false | false | false | 0 |
get_val2(struct script_state *st,int num,struct linkdb_node **ref)
{
struct script_data dat;
dat.type = C_NAME;
dat.u.num = num;
dat.ref = ref;
get_val(st,&dat);
return (dat.type == C_INT)? INT2PTR(dat.u.num): (void*)dat.u.str;
} | false | false | false | false | false | 0 |
generate_v2_objc_image_info (void)
{
tree decl, array_type;
vec<constructor_elt, va_gc> *v = NULL;
int flags =
((flag_replace_objc_classes && imp_count ? 1 : 0)
| (flag_objc_gc ? 2 : 0));
flags |= 16;
array_type = build_sized_array_type (integer_type_node, 2);
decl = start_var_decl (array_type, "_OB... | false | false | false | false | false | 0 |
isl_ast_build_specialize(__isl_keep isl_ast_build *build,
__isl_take isl_set *set)
{
if (!build)
return isl_set_free(set);
return isl_set_preimage_multi_aff(set,
isl_multi_aff_copy(build->values));
} | false | false | false | false | false | 0 |
msgid_lookup_callback(Widget w,
XtPointer client_data,
XtPointer call_data)
{
if (global.busy || (global.mode != NewsModeGroup &&
global.mode != NewsModeThread))
return;
if (!msgid_lookup_dialogue)
msgid_lookup_dialogue =
popup_dialogue("msgidlookup", "Find article by Message-ID",
"... | false | false | false | false | false | 0 |
inherit_log_msg (void)
{
if (ACE_Base_Thread_Adapter::inherit_log_msg_hook_ != 0)
(*ACE_Base_Thread_Adapter::inherit_log_msg_hook_)(
this->thr_desc_,
this->log_msg_attributes_);
// Initialize the proper configuration context for the new thread
// Placed here since inherit_log_msg() gets... | false | false | false | false | false | 0 |
ShallowCopy(vtkInformation* from,
vtkInformation* to)
{
int length = this->Length(from);
for(int i = 0; i < length; ++i)
{
this->Set(to, this->Get(from, i), i);
}
} | false | false | false | false | false | 0 |
zpready(struct ata_device *dev)
{
u8 sense_key, *sense_buf;
unsigned int ret, asc, ascq, add_len;
struct zpodd *zpodd = dev->zpodd;
ret = atapi_eh_tur(dev, &sense_key);
if (!ret || sense_key != NOT_READY)
return false;
sense_buf = dev->link->ap->sector_buf;
ret = atapi_eh_request_sense(dev, sense_buf, sense... | false | false | false | false | false | 0 |
free_headents(struct headerentry **head)
{
struct headerentry *he;
PrivateTop *pt;
if(head && *head){
for(he = *head; he->name; he++)
if(he->bldr_private){
pt = (PrivateTop *)he->bldr_private;
free_privatetop(&pt);
}
fs_give((void **)head);
}
} | false | false | false | false | false | 0 |
checkSyntax(const UString& sourceURL, int startingLineNumber, const UChar* code, int codeLength)
{
JSLock lock;
int errLine;
UString errMsg;
RefPtr<ProgramNode> progNode = parser().parseProgram(sourceURL, startingLineNumber, code, codeLength, 0, &errLine, &errMsg);
if (!progNode)
return Com... | false | false | false | false | false | 0 |
remove_button_clicked_callback (GtkWidget *button,
GeditEncodingsDialog *dialog)
{
GtkTreeSelection *selection;
GSList *encodings;
GSList *tmp;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->displayed_treeview));
encodings = NULL;
gtk_tree_selection_selected_foreach (select... | false | false | false | false | false | 0 |
write_http_echo(turn_turnserver *server, ts_ur_super_session *ss)
{
if(server && ss && ss->client_session.s && !(ss->to_be_closed)) {
ioa_network_buffer_handle nbh_http = ioa_network_buffer_allocate(server->e);
size_t len_http = ioa_network_buffer_get_size(nbh_http);
u08bits *data = ioa_network_buffer_data(nbh_h... | false | false | false | false | false | 0 |
borg_save_scumfile(void)
{
static char svSavefile[1024];
static char svSavefile2[1024];
int i;
/* Create a scum file */
if (borg_save_death &&
(borg_skill[BI_CLEVEL] >= borg_dump_level ||
strstr(p_ptr->died_from, "starvation")))
{
memcpy(svSavefile, savefile, sizeof(savefile));
... | false | false | false | false | false | 0 |
iso_codes_parse (const GMarkupParser *parser,
const gchar *basename,
GHashTable *hash_table)
{
GMappedFile *mapped_file;
gchar *filename;
GError *error = NULL;
filename = g_build_filename (ISO_CODES_PREFIX, "share", "xml", "iso-codes",
basename, ... | false | false | false | false | false | 0 |
c_name (VALUE self)
{
RbPlaylist *pl = NULL;
Data_Get_Struct (self, RbPlaylist, pl);
return pl->name_value;
} | false | false | false | false | false | 0 |
js_ValueToInt32(JSContext *cx, jsval *vp)
{
jsval v;
jsdouble d;
v = *vp;
if (JSVAL_IS_INT(v))
return JSVAL_TO_INT(v);
d = js_ValueToNumber(cx, vp);
if (JSVAL_IS_NULL(*vp))
return 0;
if (JSVAL_IS_INT(*vp))
return JSVAL_TO_INT(*vp);
*vp = JSVAL_TRUE;
if (JSDO... | false | false | false | false | false | 0 |
SetValue(uint32_t index, Object* value) {
uint32_t cast_value = 0;
Heap* heap = GetHeap();
if (index < static_cast<uint32_t>(length())) {
if (value->IsSmi()) {
int int_value = Smi::cast(value)->value();
cast_value = static_cast<uint32_t>(int_value);
} else if (value->IsHeapNumber()) {
do... | false | false | false | false | false | 0 |
HasSuperclass(
DEFCLASS *c1,
DEFCLASS *c2)
{
register unsigned i;
for (i = 1 ; i < c1->allSuperclasses.classCount ; i++)
if (c1->allSuperclasses.classArray[i] == c2)
return(TRUE);
return(FALSE);
} | false | false | false | false | false | 0 |
refreshTimings()
{
v4l2_enum_dv_timings timings;
m_videoTimings->clear();
if (enum_dv_timings(timings, true)) {
do {
v4l2_bt_timings &bt = timings.timings.bt;
double tot_height = bt.height +
bt.vfrontporch + bt.vsync + bt.vbackporch +
bt.il_vfrontporch + bt.il_vsync + bt.il_vbackporch;
double tot_... | 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.