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 |
|---|---|---|---|---|---|---|
bcc(void)
{
if (!asap.cflag)
{
asap.nextpc = asap.ppc + ((INT32)(asap.op.d << 10) >> 8);
fetch_instruction();
asap.pc = asap.nextpc;
asap.nextpc = ~0;
/*UPDATEPC();*/
execute_instruction();
asap_icount--;
}
} | false | false | false | false | false | 0 |
minimize(HklSample *sample, double (* f) (const gsl_vector * x, void * params), void *params)
{
gsl_multimin_fminimizer_type const *T = gsl_multimin_fminimizer_nmsimplex;
gsl_multimin_fminimizer *s = NULL;
gsl_vector *ss, *x;
gsl_multimin_function minex_func;
size_t iter = 0;
int status;
double size = 0;
if (!... | false | false | false | false | false | 0 |
uregex_refreshUText(URegularExpression *regexp2,
UText *text,
UErrorCode *status) {
RegularExpression *regexp = (RegularExpression*)regexp2;
if (validateRE(regexp, status, FALSE) == FALSE) {
return;
}
regexp->fMatcher->refreshInputText... | false | false | false | false | false | 0 |
hex_document_remove_view(HexDocument *doc, GtkWidget *view)
{
if(g_list_index(doc->views, view) == -1)
return;
doc->views = g_list_remove(doc->views, view);
g_object_unref(view);
} | false | false | false | false | false | 0 |
tg3_coal_tx_init(struct tg3 *tp, struct ethtool_coalesce *ec)
{
int i = 0;
if (!tg3_flag(tp, ENABLE_TSS)) {
tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs);
tw32(HOSTCC_TXMAX_FRAMES, ec->tx_max_coalesced_frames);
tw32(HOSTCC_TXCOAL_MAXF_INT, ec->tx_max_coalesced_frames_irq);
} else {
tw32(HOSTCC_TXCOL_TICKS... | false | false | false | false | false | 0 |
NK6510_GetSMSnoValidate(gn_data *data, struct gn_statemachine *state)
{
unsigned char req[] = {FBUS_FRAME_HEADER, 0x02,
0x02, /* 0x01 for INBOX, 0x02 for others */
0x00, /* folder_id */
0x00, /* Location Hi */
0x02, /* Location Lo */
0x01, 0x00};
gn_error error;
dprintf("Getting S... | false | false | false | false | false | 0 |
reset_parameters_oss(audio_output_t *ao)
{
int ret;
ret = ioctl(ao->fn, SNDCTL_DSP_RESET, NULL);
if(ret < 0 && !AOQUIET) error("Can't reset audio!");
ret = set_format_oss(ao);
if (ret == -1) goto err;
ret = set_channels_oss(ao);
if (ret == -1) goto err;
ret = set_rate_oss(ao);
if (ret == -1) goto err;
/* Car... | false | false | false | false | false | 0 |
initPath( GenericFightUnit * unit )
{
GenericFightMap::initPath( unit );
for( int i = 0; i < _height; i++ ) {
for( int j = 0; j < _width; j++ ) {
switch( ( (FightCell*)_genericFightCells[i][j] )->getAccess() ) {
case AttalCommon::UNKNOWN_ACCESS:
( (FightCell*)_genericFightCells[i][j] )->setColor( Qt::gra... | false | false | false | false | false | 0 |
kiss_packet(int fdif, char *addr,
unsigned char *pkt, unsigned int pktlen)
{
struct sockaddr to;
int i;
if (pktlen < 2)
return;
display_kiss_packet("KISS", pkt, pktlen);
strncpy(to.sa_data, addr, sizeof(to.sa_data));
i = sendto(fdif, pkt, pktlen, 0, &to, sizeof(to));
if (i >= 0)
return;
if (errno == E... | false | false | false | false | false | 0 |
main(argc, argv)
int argc;
char *argv[];
{
char *old_path,*new_path;
#if defined(_WIN32)
WSADATA wsadata;
#endif
if ( argc < 3 ) {
fprintf(stderr,"Usage: %s old-path new-path\n",argv[0]);
exit(2);
}
old_path = ckpath(argv[1]);
new_path = ckpath(argv[2]);
#if defined(_WIN32)
if (WSAStartup (MA... | false | false | false | false | false | 0 |
eventOK ()
{
setAnswer ( AP_Dialog_MetaData::a_OK ) ;
// TODO: gather data
const char * txt = NULL ;
GRAB_ENTRY_TEXT(Title);
GRAB_ENTRY_TEXT(Subject);
GRAB_ENTRY_TEXT(Author);
GRAB_ENTRY_TEXT(Publisher);
GRAB_ENTRY_TEXT(CoAuthor);
GRAB_ENTRY_TEXT(Category);
GRAB_ENTRY_TEXT(Keywords);
GRAB_ENTRY_TEXT(La... | false | false | false | false | false | 0 |
test_interpreter_failed_debug (void)
{
CattleInterpreter *interpreter;
CattleConfiguration *configuration;
CattleProgram *program;
GError *error;
gboolean success;
interpreter = cattle_interpreter_new ();
configuration = cattle_interpreter_get_configuration (interpreter);
cattle_configuration_set_debug_is_ena... | false | false | false | false | false | 0 |
fsysdep_conn_write (qconn, zwrite, cwrite)
struct sconnection *qconn;
const char *zwrite;
size_t cwrite;
{
struct ssysdep_conn *q;
int czero;
q = (struct ssysdep_conn *) qconn->psysdep;
/* We want blocking writes here. */
if (! fsblock (q, TRUE))
return FALSE;
czero = 0;
while (cwr... | false | false | false | false | false | 0 |
nv04_nvsw_mthd_get_ref(struct nvkm_nvsw *nvsw, void *data, u32 size)
{
struct nv04_sw_chan *chan = nv04_sw_chan(nvsw->chan);
union {
struct nv04_nvsw_get_ref_v0 v0;
} *args = data;
int ret;
if (nvif_unpack(args->v0, 0, 0, false)) {
args->v0.ref = atomic_read(&chan->ref);
}
return ret;
} | false | false | false | false | false | 0 |
get_chisq (struct TREND1D_DATA *data, GMT_LONG n_data, GMT_LONG n_model)
{
GMT_LONG i, nu;
double chi = 0.0;
for (i = 0; i < n_data; i++) { /* Weight is already squared */
if (data[i].w == 1.0) {
chi += (data[i].r * data[i].r);
}
else {
chi += (data[i].r * data[i].r * data[i].w);
}
}
nu = n_data -... | false | false | false | false | false | 0 |
skip_subj_blob(char * subj, size_t * begin,
size_t length)
{
/* subj-blob = "[" *BLOBCHAR "]" *WSP */
size_t cur_token;
cur_token = * begin;
if (subj[cur_token] != '[')
return FALSE;
cur_token ++;
while (1) {
if (cur_token >= length)
return FALSE;
if (subj[cur_token] == '['... | false | false | false | false | false | 0 |
check_dpkglock()
{
int fd;
struct flock fl;
if (getuid()) {
/* not running root */
return 0;
}
fd = open_internal(DPKG_LOCKFILE, O_RDWR|O_CREAT|O_TRUNC, 0660);
if (fd == -1)
return 0;
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 1;
if (fcntl(fd, ... | false | false | false | false | false | 0 |
disarm_landmine(struct trap *ttmp) /* Helge Hafting */
{
int fails = try_disarm(ttmp, false);
if (fails < 2) return fails;
You("disarm %s land mine.", the_your[ttmp->madeby_u]);
cnv_trap_obj(LAND_MINE, 1, ttmp);
return 1;
} | false | false | false | false | false | 0 |
EditCut(GtkWidget *W,gpointer Unused)
{
GtkClipboard *ClipBoard;
GtkTextIter Start,End;
gchar *BufTxt;
MaskBufChg=TRUE; //Ensure BufferChanged wont act
gtk_text_buffer_get_start_iter(Buf,&Start); gtk_text_buffer_get_end_iter(Buf,&End);
BufTxt=gtk_... | false | false | false | false | false | 0 |
gamgi_engine_dlist_orbital_window (gamgi_window *window,
gamgi_dlist *dlist_start)
{
gamgi_dlist *dlist;
dlist = window->layer_end;
while (dlist != NULL)
{
dlist_start = gamgi_engine_dlist_orbital_layer (GAMGI_CAST_LAYER
dlist->data, dlist_start);
dlist = dlist->before;
}
return dlist_start;
} | false | false | false | false | false | 0 |
std_handler_end (assuan_context_t ctx, char *line)
{
return PROCESS_DONE (ctx, set_error (ctx, GPG_ERR_NOT_IMPLEMENTED, NULL));
} | false | false | false | false | false | 0 |
history_add(struct plugin_handle* plugin, struct plugin_user* from, const char* message, int flags)
{
size_t loglen = strlen(message) + strlen(from->nick) + 13;
struct chat_history_data* data = (struct chat_history_data*) plugin->ptr;
char* log = hub_malloc(loglen + 1);
snprintf(log, loglen, "%s <%s> %s\n", get_ti... | false | false | false | false | false | 0 |
beam_type_d_move(beam *b)
{
int shot_index, fire_wait;
vec3d temp, temp2, dir;
// LEAVE THIS HERE OTHERWISE MUZZLE GLOWS DRAW INCORRECTLY WHEN WARMING UP OR DOWN
// get the "originating point" of the beam for this frame. essentially bashes last_start
beam_get_global_turret_gun_info(b->objp, b->subsys, &b->last_s... | false | false | false | false | false | 0 |
imap_open_store_authenticate_p2( imap_store_t *ctx, struct imap_cmd *cmd ATTR_UNUSED, int response )
{
if (response == RESP_NO)
imap_open_store_bail( ctx );
else if (response == RESP_OK)
socket_start_tls( &ctx->conn, imap_open_store_tlsstarted2 );
} | false | false | false | false | false | 0 |
vidioc_g_parm(struct file *file, void *fh,
struct v4l2_streamparm *parm)
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
struct saa7146_vv *vv = dev->vv_data;
if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
parm->parm.capture.readbuffers = 1;
v4l2_video_std_frame_period(vv->standard... | false | false | false | false | false | 0 |
term_destination (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;
/* Write any data remaining in the buffer */
if (datacount > 0) {
if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount)
ERREXIT(ci... | false | false | false | false | false | 0 |
startObject(const char* k, ObjType t) {
if (k) {
printKey(k);
}
else {
printf("%s%-*.*s", open_, indent_, indent_, " ");
}
printf("%c\n", t == type_object ? '{' : '[');
indent_ += 2;
open_ = "";
} | false | false | false | false | false | 0 |
clear_partial_term(Ac_match_pos ac)
{
int i;
Term t, t1;
t = ac->c1->partial_term;
ac->c1->partial_term = NULL;
for (i = 0; i < ac->partial_term_size - 1; i++) {
t1 = ARG(t,1);
free_term(t);
t = t1;
}
ac->partial_term_size = 0;
} | false | false | false | false | false | 0 |
constraint_add( Operation *op, SlapReply *rs )
{
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
Attribute *a;
constraint *c = on->on_bi.bi_private, *cp;
BerVarray b = NULL;
int i;
struct berval rsv = BER_BVC("add breaks constraint");
int rc;
char *msg = NULL;
if (get_relax(op)) {
return SLAP_CB_CO... | false | false | false | false | false | 0 |
n_search(node *np, const byte *pkey)
{
const btree *bt = np->bt;
byte key1[HFS_MAX_KEYLEN], key2[HFS_MAX_KEYLEN];
int i, comp = -1;
bt->keyunpack(pkey, key2);
for (i = np->nd.ndNRecs; i--; )
{
const byte *rec;
rec = HFS_NODEREC(*np, i);
if (HFS_RECKEYLEN(rec) == 0)
continue; /* del... | false | false | false | true | false | 1 |
findNeighbourCandidates()
{
//Method finds bodies which are 'neighbour bodies', ie their bounding
// boxes are overlapping (this is a necessary but not sufficient
// condition for common innerBoundaries between bodies).
//Read bodies into an array.
int b_count = modelStatistics->nofBodies;
Body** b_array ... | false | false | false | false | false | 0 |
default_named_section_asm_out_destructor (rtx symbol, int priority)
{
const char *section = ".dtors";
char buf[16];
/* ??? This only works reliably with the GNU linker. */
if (priority != DEFAULT_INIT_PRIORITY)
{
sprintf (buf, ".dtors.%.5u",
/* Invert the numbering so the linker puts us in t... | false | false | false | false | false | 0 |
prnt_shorts(char *title, int init, int bound, int perline, short *array)
{
int i,
k;
mystrcpy(title);
padline();
k = 0;
for (i = init; i <= bound; i++)
{
itoc(array[i]);
*output_ptr++ = COMMA;
k++;
if (k == perline && i != bound)
{
*o... | false | false | false | false | false | 0 |
ExCleanupForState()
{
int i;
char *modid;
for(i = SIZE_LIST(_dxd_exContext->program->foreach_id) - 1; i >= 0; --i) {
modid = *FETCH_LIST(_dxd_exContext->program->foreach_id, i);
DXSetCacheEntryV(NULL, 0, modid, 0, 0, NULL);
DXFree(modid);
}
FREE_LIST(_dxd_exContext->program... | false | false | false | false | false | 0 |
io_stats_rename (call_frame_t *frame, xlator_t *this,
loc_t *oldloc, loc_t *newloc, dict_t *xdata)
{
START_FOP_LATENCY (frame);
STACK_WIND (frame, io_stats_rename_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->rename,
oldloc... | false | false | false | false | false | 0 |
VpnWriteFunction( VpnFigure )
vpnfig_list *VpnFigure;
{
vpnfunc_list *ScanFunc;
vpndecl_list *ScanDeclar;
chain_list *ScanChain;
for ( ScanFunc = VpnFigure->FUNCTION;
ScanFunc != (vpnfunc_list *)0;
ScanFunc = ScanFunc->NEXT )
{
fprintf( VpnFile, "FUNCTION\t%ld\t%ld\t%s\n",
... | false | false | false | false | false | 0 |
ck_session_new (const char *ssid,
const char *cookie)
{
GObject *object;
gboolean res;
object = g_object_new (CK_TYPE_SESSION,
"id", ssid,
"cookie", cookie,
NULL);
res = register... | false | false | false | false | false | 0 |
optz_append(struct option **optz, const struct option *opts)
{
int len1 = 0;
int len2 = 0;
int i;
const struct option *op;
struct option *t = *optz;
if (opts == NULL)
return (0);
for (op = *optz; op && op->name != NULL; op++)
len1++;
for (op = opts; op && op->name != NULL; op++)
len2++;
t = xrealloc(... | false | false | false | false | false | 0 |
mailimf_header_string_write(FILE * f, int * col,
const char * str, size_t length)
{
int state;
const char * p;
const char * word_begin;
int first;
state = STATE_BEGIN;
p = str;
word_begin = p;
first = 1;
while (length > 0) {
switch (state) {
case STATE_BEGIN:
switch (* p) {
... | false | false | false | false | false | 0 |
dca_subframe_footer (dca_state_t * state)
{
int aux_data_count = 0, i;
int lfe_samples;
/*
* Unpack optional information
*/
/* Time code stamp */
if (state->timestamp) bitstream_get (state, 32);
/* Auxiliary data byte count */
if (state->aux_data) aux_data_count = bitstream_get ... | false | false | false | false | false | 0 |
set_file(const std::string filename)
{
if (!m_body.set_file(filename)) {
return false;
}
add_header(Message::ContentLength, m_body.size());
return true;
} | false | false | false | false | false | 0 |
mp_unmap_irq(int irq)
{
struct irq_data *irq_data = irq_get_irq_data(irq);
struct mp_chip_data *data;
if (!irq_data || !irq_data->domain)
return;
data = irq_data->chip_data;
if (!data || data->isa_irq)
return;
mutex_lock(&ioapic_mutex);
if (--data->count == 0)
irq_domain_free_irqs(irq, 1);
mutex_unlock... | false | false | false | false | false | 0 |
GraphCheckFlags(ajint flags)
{
ajFmtPrint("flag = %d\n",flags);
if(flags & AJGRAPH_X_BOTTOM)
ajFmtPrint("AJGRAPH_X_BOTTOM \n");
if(flags & AJGRAPH_Y_LEFT)
ajFmtPrint("AJGRAPH_Y_LEFT \n");
if(flags & AJGRAPH_X_TOP)
ajFmtPrint("AJGRAPH_X_TOP \n");
if(flags & AJGRAPH_Y_RIGHT)
ajFmtPrint(" AJGRAP... | false | false | false | false | false | 0 |
cleanfld(int n1, int n2) /* clean out fields n1 .. n2 inclusive */
{ /* nvals remain intact */
Cell *p;
int i;
for (i = n1; i <= n2; i++) {
p = fldtab[i];
if (freeable(p))
xfree(p->sval);
p->sval = "";
p->tval = FLD | STR | DONTFREE;
}
} | false | false | false | false | false | 0 |
ddf1_cvt_spare_record(struct lib_context *lc, struct dev_info *di,
struct ddf1 *ddf1, int idx)
{
uint16_t x, i;
struct ddf1_spare_header *sh = SR(ddf1, idx);
if (BYTE_ORDER == ddf1->disk_format)
return 1;
CVT32(sh->signature);
CVT32(sh->crc);
CVT32(sh->timestamp);
CVT16(sh->max_spares);
x = sh->num_... | false | false | false | false | false | 0 |
atcommand_whop(const int fd, struct map_session_data* sd, AtCommandType command, const char* message)
{
struct map_session_data *pl_sd;
int i;
for (i = 0; i < fd_max; i++) {
if (session[i] && (pl_sd = (struct map_session_data *)session[i]->session_data) && pl_sd->state.auth) {
if (!(battle_config.hide_GM_sessi... | false | false | false | false | false | 0 |
insert( double pos, const QColor &color )
{
// Lookups need to be very fast, insertions are not so important.
// Anyway, a balanced tree is what we need here. TODO ...
if ( pos < 0.0 || pos > 1.0 )
return;
int index;
if ( _stops.size() == 0 )
{
index = 0;
_stops.resize(... | false | false | false | false | false | 0 |
visitUnreachableInst(UnreachableInst &I) {
// This isn't undefined behavior, it's merely suspicious.
Assert1(&I == I.getParent()->begin() ||
prior(BasicBlock::iterator(&I))->mayHaveSideEffects(),
"Unusual: unreachable immediately preceded by instruction without "
"side effects", &I);
} | false | false | false | false | false | 0 |
gwy_graph_area_get_cursor(GwyGraphArea *area,
gdouble *x_cursor, gdouble *y_cursor)
{
if (area->mouse_present) {
*x_cursor = area->actual_cursor.x;
*y_cursor = area->actual_cursor.y;
}
else {
*x_cursor = 0;
*y_cursor = 0;
}
} | false | false | false | false | false | 0 |
pv_get_intstrval(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res, int ival, str *sval)
{
if(res==NULL)
return -1;
res->rs = *sval;
res->ri = ival;
res->flags = PV_VAL_STR|PV_VAL_INT|PV_TYPE_INT;
return 0;
} | false | false | false | false | false | 0 |
neqs(int *a, int b)
{ /* Unequal signs. Assuming -1, 0, 1 only. */
if (*a * b < 0)
return true;
if (!*a)
*a = b;
return false;
} | false | false | false | false | false | 0 |
constant_on_domain(
__isl_take isl_basic_set *bset, int cst)
{
isl_space *dim;
isl_qpolynomial *qp;
if (!bset)
return NULL;
bset = isl_basic_set_params(bset);
dim = isl_basic_set_get_space(bset);
if (cst < 0)
qp = isl_qpolynomial_infty_on_domain(dim);
else if (cst == 0)
qp = isl_qpolynomial_zero_on_doma... | false | false | false | false | false | 0 |
defaultIndex() const
{
if (m_DefaultIndex != -1)
return m_DefaultIndex;
const QStringList &uuids = m_FormItem->valueReferences()->values(Form::FormItemValues::Value_Uuid);
return uuids.lastIndexOf(m_FormItem->valueReferences()->defaultValue().toString());
} | false | false | false | false | false | 0 |
json_scanner_destroy (JsonScanner *scanner)
{
g_return_if_fail (scanner != NULL);
g_datalist_clear (&scanner->qdata);
g_hash_table_foreach (scanner->symbol_table,
json_scanner_destroy_symbol_table_entry,
NULL);
g_hash_table_destroy (scanner->symbol_table);
json_scanner_free_valu... | false | false | false | false | false | 0 |
prepareEmission(Function *func)
{
CodeEmitter::prepareEmission(func);
if (targ->hasSWSched)
calculateSchedDataNVC0(targ, func);
} | false | false | false | false | false | 0 |
blk_account_io_done(struct request *req)
{
/*
* Account IO completion. flush_rq isn't accounted as a
* normal IO on queueing nor completion. Accounting the
* containing request is enough.
*/
if (blk_do_io_stat(req) && !(req->cmd_flags & REQ_FLUSH_SEQ)) {
unsigned long duration = jiffies - req->start_time;... | false | false | false | false | false | 0 |
isClntSupported(SPtr<TDUID> duid, SPtr<TIPv6Addr> clntAddr, int iface)
{
SPtr<TSrvCfgIface> ptrIface;
firstIface();
while((ptrIface=getIface())&&(ptrIface->getID()!=iface)) ;
/** @todo: reject-client and accept-only does not work in stateless mode */
if (this->stateless())
return true;
int cl... | false | false | false | false | false | 0 |
_gda_thread_meta_check_columns (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection *cnc,
GdaMetaStore *store, GdaMetaContext *context, GError **error,
const GValue *table_catalog, const GValue *table_schema,
const GValue *table_name, const GValue *constraint_name)
{
main_thread_detailed_core (sub_thread... | false | false | false | false | false | 0 |
theora_decode_packetin(theora_state *_td,ogg_packet *_op){
th_api_wrapper *api;
ogg_int64_t gp;
int ret;
if(!_td||!_td->i||!_td->i->codec_setup)return OC_FAULT;
api=(th_api_wrapper *)_td->i->codec_setup;
ret=th_decode_packetin(api->decode,_op,&gp);
if(ret<0)return OC_BADPACKET;
_td->gran... | false | false | false | false | false | 0 |
shrink_compilation_unit(struct compilation_unit *cu)
{
struct basic_block *bb, *tmp_bb;
list_for_each_entry_safe(bb, tmp_bb, &cu->bb_list, bb_list_node)
shrink_basic_block(bb);
free_var_infos(cu->var_infos);
cu->var_infos = NULL;
free(cu->bb_df_array);
cu->bb_df_array = NULL;
free(cu->doms);
cu->doms = NU... | false | false | false | false | false | 0 |
bgav_transport_packet_dump(transport_packet_t * p)
{
bgav_dprintf( "Transport packet:\n");
bgav_dprintf( " Payload start: %d\n", p->payload_start);
bgav_dprintf( " PID: 0x%04x\n", p->pid);
bgav_dprintf( " Adaption field: %s\n",
(p->has_adaption_field ? "Yes" : "No"));
bg... | false | false | false | false | false | 0 |
primary_list_to_string(GSList *primary_list)
{
GString *services;
GSList *l;
services = g_string_new(NULL);
for (l = primary_list; l; l = l->next) {
struct gatt_primary *primary = l->data;
char service[64];
memset(service, 0, sizeof(service));
snprintf(service, sizeof(service), "%04X#%04X#%s ",
prim... | false | false | false | false | false | 0 |
getenv (name)
const char *name;
{
SHELL_VAR *var;
if (name == 0 || *name == '\0')
return ((char *)NULL);
var = find_tempenv_variable ((char *)name);
if (var)
{
FREE (last_tempenv_value);
last_tempenv_value = value_cell (var) ? savestring (value_cell (var)) : (char *)NULL;
retur... | false | false | false | false | false | 0 |
gtk_tree_model_new_from_options (GtkOptions *options)
{
GtkListStore *ls;
guint i;
GtkTreeIter iter;
ls = gtk_list_store_new (GTK_OPTIONS_N_COLUMNS, G_TYPE_INT,
G_TYPE_STRING);
for (i = 0; options[i].name; i++) {
gtk_list_store_append (ls, &iter);
gtk_list_store_set (ls, &iter,
GTK_OPTIONS_OPTION_COL... | false | false | false | false | false | 0 |
AesEcbEncrypt(const mpz_class & plaintext,
uint32_t plaintext_len_in_bits,
mpz_class * ciphertext) {
if (ctx == NULL) {
return false;
}
uint32_t plaintext_len_in_bytes = (plaintext_len_in_bits + 7) / 8;
uint32_t ciphertext_len_in_bytes = plaintext_len_in_bytes;
uns... | false | false | false | false | false | 0 |
save_user_format(struct rev_info *rev, const char *cp, int is_tformat)
{
free(user_format);
user_format = xstrdup(cp);
if (is_tformat)
rev->use_terminator = 1;
rev->commit_format = CMIT_FMT_USERFORMAT;
} | false | false | false | false | false | 0 |
_dxfSolveSymmetric2x2Eqn(double a, double b, double d, double e, double f, double *x, double *y)
{
int retval = 0;
static double eps = 1e-13;
if (fabs(b) < eps)
{
*x = (fabs(a) < eps) ? 0. : e / a;
*y = (fabs(d) < eps) ? 0. : f / d;
retval = 2;
}
else
{
double
theta =... | false | false | false | false | false | 0 |
sbc_synthesize_four(struct sbc_decoder_state *state,
struct sbc_frame *frame, int ch, int blk)
{
int i, k, idx;
int32_t *v = state->V[ch];
int *offset = state->offset[ch];
for (i = 0; i < 8; i++) {
/* Shifting */
offset[i]--;
if (offset[i] < 0) {
offset[i] = 79;
memcpy(v + 80, v, 9 * sizeof(*v));
... | false | false | false | false | false | 0 |
WRK_BgThread(pthread_t *thr, const char *name, bgthread_t *func, void *priv)
{
struct bgthread *bt;
ALLOC_OBJ(bt, BGTHREAD_MAGIC);
AN(bt);
bt->name = name;
bt->func = func;
bt->priv = priv;
AZ(pthread_create(thr, NULL, wrk_bgthread, bt));
} | false | false | false | true | false | 1 |
cgetservbyport(u_int16_t port, const char *proto) { /*%< Host byte order. */
struct valuelist **list = &servicelist;
struct valuelist *lp = *list;
static struct servent serv;
port = ntohs(port);
for (; lp != NULL; lp = lp->next) {
if (port != (u_int16_t)lp->port) /*%< Host byte order. */
continue;
if (strc... | false | false | false | false | false | 0 |
purge(long n, long ll, double *r, double *q, double *ra,
double *qa, double *wrk, double *eta, double *oldeta, long step,
double *rnmp, double tol) {
double t, tq, tr, reps1, rnm = *rnmp;
long k, iteration, flag, i;
if (step < ll+2) return;
k = svd_idamax(step - (ll+1), &eta[ll], 1) + l... | false | false | false | false | false | 0 |
setup_object(struct kmem_cache *s, struct page *page,
void *object)
{
setup_object_debug(s, page, object);
if (unlikely(s->ctor)) {
kasan_unpoison_object_data(s, object);
s->ctor(object);
kasan_poison_object_data(s, object);
}
} | false | false | false | false | false | 0 |
rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION)
return;
if (rtlpriv->mac80211.link_state < MAC80211_LINKED)
return;
/* check if... | false | false | false | false | false | 0 |
isns_process_dd_deregistration(isns_server_t *srv, isns_simple_t *call, isns_simple_t **result)
{
isns_simple_t *reply = NULL;
isns_attr_list_t *keys = &call->is_message_attrs;
isns_attr_list_t *attrs = &call->is_operating_attrs;
isns_db_t *db = srv->is_db;
isns_dd_t *dd = NULL, *temp_dd = NULL;
isns_attr_t *attr... | false | false | false | false | false | 0 |
strTrimRight(char * target, const char * trimChars)
{
unsigned int trimCount = 0;
char * s = target;
char * lastNonTrim = NULL;
while(*s)
{
if(strContainsChar(trimChars, *s))
{
trimCount++;
}
else
{
lastNonTrim = s;
trimCoun... | false | false | false | false | false | 0 |
start(ExecutionMode executionMode, const QUrl &url)
{
mExecutionMode = executionMode;
mUrl = url;
mUrl.setScheme("http");
mNetworkReply = mNetworkAccessManager->get(QNetworkRequest(mUrl));
connect(mNetworkReply, SIGNAL(finished()), this, SLOT(downloadFinished()));
return true;
} | false | false | false | false | false | 0 |
set_or_free (gchar **target,
gchar *source)
{
if (target != NULL)
*target = source;
else
g_free (source);
} | false | false | false | false | false | 0 |
attribute_value_equal (const_tree attr1, const_tree attr2)
{
if (TREE_VALUE (attr1) == TREE_VALUE (attr2))
return true;
if (TREE_VALUE (attr1) != NULL_TREE
&& TREE_CODE (TREE_VALUE (attr1)) == TREE_LIST
&& TREE_VALUE (attr2) != NULL
&& TREE_CODE (TREE_VALUE (attr2)) == TREE_LIST)
return (... | false | false | false | false | false | 0 |
cchasm_refresh (void)
{
int pc = 0;
int done = 0;
int opcode, data;
int currentx = 0, currenty = 0;
int scalex = 0, scaley = 0;
int color = 0;
int total_length = 1; /* length of all lines drawn in a frame */
int move = 0;
vector_clear_list();
while (!done)
{
... | false | false | false | false | false | 0 |
sniff_del_item(void)
{
int i;
struct sniff_info *si;
sniff_list_db(0);
i = menu_choose_unr("item nr. to delete", 0,
list_count(&l_sniff_db) - 1, -1);
if (i >= 0) {
list_lock(&l_sniff_db);
si = list_remove_at(&l_sniff_db, i);
sniff_info_wait_for_release(si);
free_sniff_info(si);
list_unlock(&l_sn... | false | false | false | false | false | 0 |
lock_stats(DB_ENV *dbenvp)
{
DB_LOCK_STAT *sp;
int ret;
if (stats_internal != NULL) {
CDB___lock_dump_region(dbenvp, stats_internal, stdout);
return (0);
}
if ((ret = CDB_lock_stat(dbenvp, &sp, NULL)) != 0) {
dbenvp->err(dbenvp, ret, NULL);
return (1);
}
dl("Last allocated locker ID.\n", (u_long)sp->s... | false | false | false | false | false | 0 |
hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages,
struct page *page)
{
struct hugetlb_cgroup *h_cg;
if (hugetlb_cgroup_disabled())
return;
lockdep_assert_held(&hugetlb_lock);
h_cg = hugetlb_cgroup_from_page(page);
if (unlikely(!h_cg))
return;
set_hugetlb_cgroup(page, NULL);
page_counter_un... | false | false | false | false | false | 0 |
init_db_details(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value_for_details)
{
m_table_name = found_set.m_table_name;
//std::cout << "Notebook_Data::init_db_details: table_name=" << m_table_name << ", primary_key_value_for_details=" << primary_key_value_for_details.to_string() << std::endl;
... | false | false | false | false | false | 0 |
check_unreachable_object(struct object *obj)
{
/*
* Missing unreachable object? Ignore it. It's not like
* we miss it (since it can't be reached), nor do we want
* to complain about it being unreachable (since it does
* not exist).
*/
if (!obj->parsed)
return;
/*
* Unreachable object that exists? Show... | false | false | false | false | false | 0 |
cb_convert_to_value (GnmCellIter const *iter, G_GNUC_UNUSED gpointer user)
{
GnmCell *cell = iter->cell;
if (!cell || !gnm_cell_has_expr (cell))
return NULL;
gnm_cell_eval (cell);
if (gnm_expr_top_is_array_elem (cell->base.texpr, NULL, NULL))
return NULL;
gnm_cell_convert_expr_to_value (cell);
return NULL;... | false | false | false | false | false | 0 |
capture_is_dangerous(int move, const board_t * board) {
int piece, capture;
ASSERT(move_is_ok(move));
ASSERT(board!=NULL);
ASSERT(MOVE_IS_TACTICAL(move,board));
piece = MOVE_PIECE_FROM(move,board);
if (PIECE_IS_PAWN(piece)) {
if (PAWN_RANK(MOVE_TO(move),board->turn) >= Rank6
|| pawn... | false | false | false | false | false | 0 |
suexec_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
void *reported;
apr_pool_userdata_get(&reported, SUEXEC_POST_CONFIG_USERDATA,
s->process->pool);
if ((reported == NULL) && ap_unixd_config.suexec_enabled) {
... | false | false | false | false | false | 0 |
AscFindSignature(PortAddr iop_base)
{
ushort sig_word;
ASC_DBG(1, "AscGetChipSignatureByte(0x%x) 0x%x\n",
iop_base, AscGetChipSignatureByte(iop_base));
if (AscGetChipSignatureByte(iop_base) == (uchar)ASC_1000_ID1B) {
ASC_DBG(1, "AscGetChipSignatureWord(0x%x) 0x%x\n",
iop_base, AscGetChipSignatureWord(iop_b... | false | false | false | false | false | 0 |
nukeproc(Proc *proc)
{
*(proc->next ? &proc->next->prev : &proctail) = proc->prev;
*(proc->prev ? &proc->prev->next : &proclist) = proc->next;
if (proc->prog)
prog_free(proc->prog);
FREE(proc->pre);
conStringfree(proc->cmd);
if (proc->suf) FREE(proc->suf);
Stringfree(proc->buffer);
FRE... | false | false | false | false | false | 0 |
catchar (buffer, ch)
string_type *buffer;
int ch;
{
if (buffer->write_idx == buffer->size)
{
buffer->size *= 2;
buffer->ptr = (char *) realloc (buffer->ptr, buffer->size);
}
buffer->ptr[buffer->write_idx++] = ch;
} | false | false | false | false | false | 0 |
coverage_toggled (GtkCheckMenuItem *item, gpointer data)
{
sat_map_obj_t *obj = NULL;
GtkSatMap *satmap = GTK_SAT_MAP(data);
guint32 covcol;
/* get satellite object */
obj = SAT_MAP_OBJ(g_object_get_data (G_OBJECT (item), "obj"));
if (obj == NULL) {
sat_log_log (SAT... | false | false | false | false | false | 0 |
fasta_diff_ambig_strcmp(const gchar *s1,
const gchar *s2){
register gchar c1, c2;
while(*s1 && *s2){
c1 = toupper(*s1);
c2 = toupper(*s2);
if((c1 != 'N') && (c1 != 'X') && (c2 != 'N') && (c2 != 'X')){
if(*s1 != *s2)
return *... | false | false | false | false | false | 0 |
check_diff_overflow(fixed v0, fixed v1)
{
if (v0 < v1) {
if (v1 - v0 < 0)
return true;
} else {
if (v0 - v1 < 0)
return true;
}
return false;
} | false | false | false | false | false | 0 |
is_writing(xylist_t* ls) {
return (ls->table && ls->table->fid) ? TRUE : FALSE;
} | false | false | false | false | false | 0 |
get_extfs_file(ventry *ve, struct archfile *fil,
const char *tmpfile)
{
int res;
struct archparams *ap = (struct archparams *) ve->mnt->avfs->data;
struct extfsdata *info = (struct extfsdata *) ap->data;
struct extfsnode *enod = (struct extfsnode *) fil->nod->data;
const ch... | false | false | false | false | false | 0 |
ixgbe_write_qde(struct ixgbe_adapter *adapter, u32 vf,
u32 qde)
{
struct ixgbe_hw *hw = &adapter->hw;
struct ixgbe_ring_feature *vmdq = &adapter->ring_feature[RING_F_VMDQ];
u32 q_per_pool = __ALIGN_MASK(1, ~vmdq->mask);
int i;
for (i = vf * q_per_pool; i < ((vf + 1) * q_per_pool); i++) {
u32 reg;
/* f... | false | false | false | false | false | 0 |
unix_mktime(value t)
{
struct tm tm;
time_t clock;
value res;
value tmval = Val_unit, clkval = Val_unit;
Begin_roots2(tmval, clkval);
tm.tm_sec = Int_val(Field(t, 0));
tm.tm_min = Int_val(Field(t, 1));
tm.tm_hour = Int_val(Field(t, 2));
tm.tm_mday = Int_val(Field(t, 3));
tm.tm_mon = Int_v... | false | false | false | false | false | 0 |
eltorito_exec ( struct image *image ) {
struct ramdisk ramdisk;
struct int13_drive int13_drive;
unsigned int load_segment = image->priv.ul;
unsigned int load_offset = ( load_segment ? 0 : 0x7c00 );
int rc;
memset ( &ramdisk, 0, sizeof ( ramdisk ) );
init_ramdisk ( &ramdisk, image->data, image->len, ISO9660_BLKS... | false | false | false | false | false | 0 |
sp_color_preview_destroy (GtkObject *object)
{
SPColorPreview *image;
image = SP_COLOR_PREVIEW (object);
if (((GtkObjectClass *) (parent_class))->destroy)
(* ((GtkObjectClass *) (parent_class))->destroy) (object);
} | false | false | false | false | false | 0 |
xmlXIncludeGetNthChild(xmlNodePtr cur, int no) {
int i;
if (cur == NULL)
return(cur);
cur = cur->children;
for (i = 0;i <= no;cur = cur->next) {
if (cur == NULL)
return(cur);
if ((cur->type == XML_ELEMENT_NODE) ||
(cur->type == XML_DOCUMENT_NODE) ||
... | 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.