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 |
|---|---|---|---|---|---|---|
just_fill_spline (spline *s)
{
int i;
while (s->allocated_points < s->n_controls + 1)
grow_spline_points (s);
for (i = 0; i < s->n_controls; i++)
{
s->points [i].x = s->control_x [i];
s->points [i].y = s->control_y [i];
}
s->points [s->n_controls].x = s->control_x [0];
s->points ... | false | false | false | false | false | 0 |
z_ucs_cmp(z_ucs *s1, z_ucs *s2)
{
while ( (*s1 != 0) || (*s2 != 0) )
{
if (*s1 != *s2)
return *s1 - *s2;
s1++;
s2++;
}
return 0;
} | false | false | false | false | false | 0 |
patch_set_member_regex(PatchSet * ps, regex_t * reg)
{
struct list_head * next = ps->members.next;
while (next != &ps->members)
{
PatchSetMember * psm = list_entry(next, PatchSetMember, link);
if (regexec(&restrict_file, psm->file->filename, 0, NULL, 0) == 0)
return 1;
next = next->next;
}
... | false | false | false | false | false | 0 |
appendGroup( FALIST *groupTop, FA *fa )
{
/* fa$B$,M;9g>uBV$G$J$$$J$i(BFA$B$N%]%$%s%?$r%=!<%H$7$F%0%k!<%W%j%9%H$X(B
$BM;9g>uBV$J$i$=$N9=@.%j%9%H$H%0%k!<%W%j%9%H$r9g$o$;$F%=!<%H$9$k(B */
FALIST *preAtom = NULL;
FALIST *curAtom = groupTop;
FALIST *srcCurAtom = NULL;
long cmp;
if( fa... | false | false | false | false | false | 0 |
_discovery_pad_blocked_callback (GstPad *pad, GstPadProbeInfo *info,
gpointer user_data)
{
FsRtpSession *session = user_data;
GError *error = NULL;
GList *item = NULL;
CodecAssociation *ca = NULL;
if (fs_rtp_session_has_disposed_enter (session, NULL))
{
FS_RTP_SESSION_LOCK (session);
session->p... | false | false | false | false | false | 0 |
register_page_bootmem_info(void)
{
#ifdef CONFIG_NUMA
int i;
for_each_online_node(i)
register_page_bootmem_info_node(NODE_DATA(i));
#endif
} | false | false | false | false | false | 0 |
update()
{
if (!_coverage) {
setText(0, QString());
setText(1, QString());
setText(2, QString());
return;
}
_pSum = 100.0 * _coverage->inclusive();
// pSum/pSelf are percentages of inclusive cost of base
SubCost realSum = _base->inclusive()->subCost(_costType);
_sum = SubCost(realSum * _co... | false | false | false | false | false | 0 |
kbd_callback(const char *name, int name_len,
const char *instruction, int instruction_len,
int num_prompts,
const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts,
LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses,
... | false | false | false | false | false | 0 |
t_dns_name_getlabelsequence(void) {
int line;
int cnt;
int result;
char *p;
FILE *fp;
t_assert("dns_name_getlabelsequence", 1, T_REQUIRED, "%s", a37);
result = T_UNRESOLVED;
fp = fopen("dns_name_getlabelsequence_data", "r");
if (fp != NULL) {
line = 0;
while ((p = t_fgetbs(fp)) != NULL) {
++line... | false | false | false | false | false | 0 |
initial_basis(struct isl_tab *tab)
{
int n_eq;
struct isl_mat *eq;
struct isl_mat *Q;
tab->n_unbounded = 0;
tab->n_zero = n_eq = tab->n_var - tab->n_col + tab->n_dead;
if (tab->empty || n_eq == 0 || n_eq == tab->n_var)
return isl_mat_identity(tab->mat->ctx, 1 + tab->n_var);
eq = tab_equalities(tab);
eq = is... | false | false | false | false | false | 0 |
fldnames(fields)
struct fldname *fields;
{
register char *name;
if (fields == NULL)
return;
fldnames(fields->next);
name = fields->name;
fprintf(inclfile, " {%d, \"%s\"},\n", strlen(name), name);
} | false | false | false | false | false | 0 |
otp_verify_user (OtpContext *ctx, const char *passwd)
{
void *dbm;
int ret;
if (!ctx->challengep)
return -1;
ret = otp_verify_user_1 (ctx, passwd);
dbm = otp_db_open ();
if (dbm == NULL) {
free(ctx->user);
return -1;
}
otp_put (dbm, ctx);
free(ctx->user);
otp_db_close (dbm);
return re... | false | false | false | false | false | 0 |
override_config_tree_from_string(struct cmd_context *cmd,
const char *config_settings)
{
struct dm_config_tree *cft_new;
if (!(cft_new = dm_config_from_string(config_settings))) {
log_error("Failed to set overridden configuration entries.");
return 1;
}
cmd->cft = dm_config_insert_cascaded_tree(cft_n... | false | false | false | false | false | 0 |
SCR_TouchPics (void)
{
int i, j;
for (i=0 ; i<2 ; i++)
for (j=0 ; j<11 ; j++)
R_RegisterPic (sb_nums[i][j]);
if (strcmp(crosshair->string, "none"))
{
Com_sprintf (crosshair_pic, sizeof(crosshair_pic), "%s", crosshair->string);
Draw_GetPicSize (&crosshair_width, &crosshair_height, crosshair_pic);
if (... | false | false | false | false | false | 0 |
jobacct_storage_p_job_complete(void *db_conn,
struct job_record *job_ptr)
{
slurmdbd_msg_t msg;
dbd_job_comp_msg_t req;
if (!job_ptr->db_index
&& (!job_ptr->details || !job_ptr->details->submit_time)) {
error("jobacct_storage_p_job_complete: "
"Not inputing this job, it has no submit time.");
... | false | false | false | false | false | 0 |
readNumber(const char* &start,int &number)
{
string retVal="";
int len=0;
while(isdigit(*start))
{
retVal+=*start;
len++;
if (len>3) {Valid=false; return "";};
start++;
}
if (!len) {Valid=false; return "";};
number=atoi(retVal.c_str());
return retVal;
} | false | false | false | false | false | 0 |
tokenize_date(Octstr *date)
{
Octstr *date_token;
long j;
size_t i,
date_len;
unsigned char c;
if (!parse_date(date)) {
return NULL;
}
date_token = octstr_create("");
octstr_append_char(date_token, WBXML_OPAQUE);
i = 0;
j = 0;
date_len = octstr_len(date)... | false | false | false | false | false | 0 |
pager_release_page(Pager *pPager,Page *pPage)
{
int rc = UNQLITE_OK;
if( !(pPage->flags & PAGE_DIRTY)){
/* Invoke the unpin callback if available */
if( pPager->xPageUnpin && pPage->pUserData ){
pPager->xPageUnpin(pPage->pUserData);
}
pPage->pUserData = 0;
SyMemBackendPoolFree(pPager->pAllocator,pPage);
... | false | false | false | false | false | 0 |
hex2mem(const char *buf, uint8_t *mem, int count)
{
int i, j;
int c;
for (i = 0, j = 0; i < count; i++, j += 2) {
c = hex(buf[j]);
if (c < 0)
goto err;
mem[i] = c << 4;
c = hex(buf[j + 1]);
if (c < 0)
goto err;
mem[i] |= c;
}
return 0;
err:
return -1;
} | false | false | false | false | false | 0 |
vfs_file_start (NautilusFile *file,
GMountOperation *mount_op,
GCancellable *cancellable,
NautilusFileOperationCallback callback,
gpointer callback_data)
{
NautilusFileOperation *op;
GError *error;
GFile *location;
if (file->detail... | false | false | false | false | false | 0 |
output_dirs(){
int i,j;
static char format[20];
sprintf(format,"%%%ds",width);
for(i=0;i<g_size;i++){
for(j=0;j<g_size;j++){
printf(format,dir_string[(int)dirs[i][j]]);
}
printf("\n");
}
} | true | true | false | false | true | 1 |
mac_fw_hdrs_push(struct i1480 *i1480, struct fw_hdr *hdr,
const char *fw_name, const char *fw_tag)
{
struct device *dev = i1480->dev;
ssize_t result = 0;
struct fw_hdr *hdr_itr;
int verif_retry_count;
/* Now, header by header, push them to the hw */
for (hdr_itr = hdr; hdr_itr != NULL; hdr_itr = hdr_itr->... | false | false | false | false | false | 0 |
box_index (GfsBox * b, LocateArray * a)
{
FttVector p;
ftt_cell_pos (b->root, &p);
gint i = locate_linear_index (&p, a);
g_assert (i >= 0);
g_assert (!a->root[i]);
a->root[i] = g_slist_prepend (NULL, b);
FttDirection d;
for (d = 0; d < FTT_NEIGHBORS; d++)
if (GFS_IS_BOUNDARY (b->neighbor[d])) {
... | false | false | false | false | false | 0 |
CL_ParseFire (void)
{
vec3_t pos, dir;
int id, i;
int r;
int cnt;
int magnitude;
cl_sustain_t *s, *free_sustain;
// id = MSG_ReadShort (&net_message); // an id of -1 is an instant effect
id = 25;
if (id != -1) // sustains
{
// Com_Printf ("Sustain effect id %d\n", id);
free_sustain = NU... | false | false | false | false | false | 0 |
SyfEnv( Trace )
int Trace;
{
char *Variable;
char ReorderFunc;
Variable = mbkgetenv( "SYF_BDD_VAR_NODE" );
if ( Variable != (char *)0 )
{
SYF_BDD_VAR_NODE = atoi( Variable );
}
Variable = mbkgetenv( "SYF_BDD_MAX_NODE" );
if ( Variable != (char *)0 )
{
SYF_BDD_MAX_NODE = atoi( Variable );... | false | false | false | false | false | 0 |
signal_add_handler (int signo, gpointer handler, int flags)
{
#if !defined(__native_client__)
/*FIXME, move the code from mini to utils and do the right thing!*/
struct sigaction sa;
struct sigaction previous_sa;
int ret;
sa.sa_sigaction = (void (*)(int, siginfo_t *, void *))handler;
sigfillset (&sa.sa_mask);
... | false | false | false | false | false | 0 |
filter_gui_filter_remove(filter_t *f)
{
GtkTreeIter iter;
GtkTreeView *tv;
GtkTreeModel *model;
g_assert(f != NULL);
if (gui_filter_dialog() == NULL)
return;
tv = GTK_TREE_VIEW(gui_filter_dialog_lookup("treeview_filter_filters"));
model = gtk_tree_view_get_model(tv);
if (tree_find_... | false | false | false | false | false | 0 |
AHB_SWIFT_GetNextSubTag(const char **sptr, AHB_SWIFT_SUBTAG **tptr) {
const char *s;
int id=0;
int nextId=0;
const char *content=NULL;
AHB_SWIFT_SUBTAG *stg;
s=*sptr;
if (*s=='?') {
const char *t;
t=s;
t++;
if (*t==0x0a)
t++;
if (*t && isdigit(*t)) {
id=(*(t++)-'0')*10;
... | false | false | false | false | false | 0 |
process_tag(struct tag *tag, struct object_array *p, const char *name)
{
struct object *obj = &tag->object;
if (obj->flags & SEEN)
return;
obj->flags |= SEEN;
if (parse_tag(tag) < 0)
die("bad tag object %s", sha1_to_hex(obj->sha1));
if (tag->tagged)
add_object(tag->tagged, p, NULL, name);
} | false | false | false | false | false | 0 |
changeConnector() {
bool ok;
int senderIndex = sender()->property("index").toInt(&ok);
if (!ok) return;
ConnectorMetadata cmd;
if (!PEUtils::fillInMetadata(senderIndex, m_scrollFrame, cmd)) return;
emit connectorMetadataChanged(&cmd);
} | false | false | false | false | false | 0 |
flickcurl_get_current_request_wait(flickcurl *fc)
{
#ifdef OFFLINE
return 0;
#else
int wait_usec = 0;
struct timeval now;
struct timeval uwait;
/* If there was no previous request, return 0 */
if(!fc->last_request_time.tv_sec)
return 0;
gettimeofday(&now, NULL);
memcpy(&uwait, &fc->last_reque... | false | true | false | false | false | 1 |
gw_plugin_settings_quick_search_btn_show_click ( GtkButton *btn, GtkWidget *pane)
{
gint result = -1;
GtkCList *list_visible = NULL;
GtkCList *list_hidden = NULL;
gchar *text = NULL;
GtkWindow *settings = NULL;
gint row = -1;
GWSettingsExplorerField **fields = NULL;
GWSettingsExplorerField *field = NULL;
#ifd... | false | false | false | false | false | 0 |
tonga_get_svi2_vdd_voltage_table(
struct pp_hwmgr *hwmgr,
phm_ppt_v1_voltage_lookup_table *look_up_table,
pp_atomctrl_voltage_table *voltage_table)
{
uint8_t i = 0;
PP_ASSERT_WITH_CODE((0 != look_up_table->count),
"Voltage Lookup Table empty.", return -1;);
voltage_table->mask_low = 0;
voltage_table->pha... | false | false | false | false | false | 0 |
dibx000_i2c_gate_ctrl(struct dibx000_i2c_master *mst, u8 tx[4],
u8 addr, int onoff)
{
u16 val;
if (onoff)
val = addr << 8; // bit 7 = use master or not, if 0, the gate is open
else
val = 1 << 7;
if (mst->device_rev > DIB7000)
val <<= 1;
tx[0] = (((mst->base_reg + 1) >> 8) & 0xff);
tx[1] = ((mst->ba... | false | false | false | false | false | 0 |
select_display_font_cb(GtkWidget *w, PropertyUI *pui)
{
PangoFontMetrics *new_metrics;
PangoFontDescription *new_desc;
if(strcmp(gtk_font_button_get_font_name
(GTK_FONT_BUTTON(pui->font_button)),
def_font_name) != 0) {
if((new_metrics = gtk_hex_load_font
(gtk_font_button_get_font_name
(GTK_FONT_B... | false | false | false | false | false | 0 |
get_hier_name(mail::imap &imapAccount, Token t)
{
if (t == ATOM || t == STRING)
{
next_func= &mail::imapSTATUS::get_attr_list;
if (t.text != expectedHier)
error(imapAccount); // Sanity check
}
else
error(imapAccount);
} | false | false | false | false | false | 0 |
changed_line(u16 y, u16 start_x, u16 end_x)
{
if (y >= height) return;
if (start_x >= width) start_x = width - 1;
if (end_x >= width) end_x = width - 1;
if (dirty_startx[y] > start_x) dirty_startx[y] = start_x;
if (dirty_endx[y] < end_x) dirty_endx[y] = end_x;
} | false | false | false | false | false | 0 |
htmlAttrib() const
{
if (html_attrib_.empty())
html_attrib_ = "class='float " + defaultCSSClass() + "'";
return html_attrib_;
} | false | false | false | false | false | 0 |
linkon_pvc_dce(struct net_t *np, int32 biti, int32 bitj,
struct gref_t *grp, int32 pnum)
{
register struct dcevnt_t *dcep;
int32 nd_itpop;
struct itree_t *ref_itp;
struct dceauxlst_t *dclp;
ref_itp = __inst_ptr;
nd_itpop = FALSE;
if (grp != NULL) { __xmrpush_refgrp_to_targ(grp); nd_itpop = TRUE; }
/* allocate... | false | false | false | false | false | 0 |
GetMySafePlanetsSortedByDistanceToPlanet(int planet_id) {
vector<Planet*> safe_planets = GetMySafePlanets();
int key, i;
for(int j = 1; j < safe_planets.size(); j++) {
Planet* p = safe_planets[j];
int distance = pw->Distance(safe_planets[j]->PlanetID(), planet_id);
i = j-1;
while(i >= 0 && pw->Dis... | false | false | false | false | false | 0 |
tlan_mii_sync(u16 base_port)
{
int i;
u16 sio;
outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR);
sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO;
tlan_clear_bit(TLAN_NET_SIO_MTXEN, sio);
for (i = 0; i < 32; i++) {
tlan_clear_bit(TLAN_NET_SIO_MCLK, sio);
tlan_set_bit(TLAN_NET_SIO_MCLK, sio);
}
} | false | false | false | false | false | 0 |
getSlot()
{
int i ;
/* look for slot in the table */
/*
semP() ;
*/
for (i = 0 ; i < TABLE_SIZE ; i++)
{
if (table[i].used == UNUSED && table[i].term_stat == 1)
{
table[i].used = USED ;
break ;
}
} /*... | false | false | false | false | false | 0 |
sas_scsi_timed_out(struct scsi_cmnd *cmd)
{
scmd_dbg(cmd, "command %p timed out\n", cmd);
return BLK_EH_NOT_HANDLED;
} | false | false | false | false | false | 0 |
DoDeAllocHidden(void** ptr) {
Use(ptr); // use only hidden versions
void* p = *ptr;
VLOG(2) << "Deallocating hidden " << p;
UnHide(&p);
delete [] reinterpret_cast<char*>(p);
} | false | false | false | false | false | 0 |
f_ceil(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
float_T f;
rettv->v_type = VAR_FLOAT;
if (get_float_arg(argvars, &f) == OK)
rettv->vval.v_float = ceil(f);
else
rettv->vval.v_float = 0.0;
} | false | false | false | false | false | 0 |
useContextMenu(bool state)
{
QAbstractItemView *view = d->m_Parent->itemView();
if (state)
view->setContextMenuPolicy(Qt::CustomContextMenu);
else
view->setContextMenuPolicy(Qt::NoContextMenu);
} | false | false | false | false | false | 0 |
save_hist(FILE *f,B *b)
{
unsigned char buf[512];
int len;
if (b) {
P *p = pdup(b->bof, USTR "save_hist");
P *q = pdup(b->bof, USTR "save_hist");
if (b->eof->line>10)
pline(p,b->eof->line-10);
pset(q,p);
while (!piseof(p)) {
pnextl(q);
if (q->byte-p->byte<512) {
len = q->byte - p->byte;
br... | true | true | false | false | false | 1 |
init_all_voices(struct BSMT2000Chip *chip)
{
int i;
/* init the voices */
for (i = 0; i < chip->voices; i++)
init_voice(&chip->voice[i]);
/* init the compressed voice (runs at a fixed rate of ~8kHz?) */
init_voice(&chip->compressed);
chip->compressed.adjusted_rate = 0x02aa << 4;
} | false | false | false | false | false | 0 |
alloc_vrrp_vip(vector_t *strvec)
{
vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp);
if (vrrp->ifp == NULL) {
log_message(LOG_ERR, "Configuration error: VRRP definition must belong to an interface");
}
if (LIST_ISEMPTY(vrrp->vip))
vrrp->vip = alloc_list(free_ipaddress, dump_ipaddress);
alloc_ipaddress(vrrp->vip... | false | false | false | false | false | 0 |
startSession(unsigned long ulSlot, bool fRW)
{
CK_RV rv;
const unsigned long ulFlags(CKF_SERIAL_SESSION | (fRW ? CKF_RW_SESSION : 0));
if (m_ulSessionHandle != CK_INVALID_HANDLE)
{
rv = m_p11->C_CloseSession(m_ulSessionHandle);
if (rv != CKR_OK)
pk11error("C_CloseSession", rv);
}
... | false | false | false | false | false | 0 |
gfs_client_statfs_result_multiplexed(struct gfs_client_statfs_state *state,
gfarm_int32_t *bsizep,
gfarm_off_t *blocksp, gfarm_off_t *bfreep, gfarm_off_t *bavailp,
gfarm_off_t *filesp, gfarm_off_t *ffreep, gfarm_off_t *favailp)
{
gfarm_error_t e = state->error;
gfarm_event_free(state->writable);
gfarm_event_free... | false | false | false | false | false | 0 |
txt_option(struct export *e, int opt, char *arg)
{
switch (opt)
{
case 1: // color
D->color = 1;
break;
case 2: // gfx-chr=
D->gfx_chr = *arg ?: ' ';
break;
case 3: // fg=
D->def_fg = *arg - '0';
break;
case 4: // bg=
D->def_bg = *arg - '0';
break;
case 5: // lines=
... | false | false | false | false | true | 1 |
holtekff_init(struct hid_device *hid)
{
struct holtekff_device *holtekff;
struct hid_report *report;
struct hid_input *hidinput = list_entry(hid->inputs.next,
struct hid_input, list);
struct list_head *report_list =
&hid->report_enum[HID_OUTPUT_REPORT].report_list;
struct input_dev *dev = hidinput->input;... | false | false | false | false | false | 0 |
TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a)
{
static const char *status_map[] =
{
"Granted.",
"Granted with modifications.",
"Rejected.",
"Waiting.",
"Revocation warning.",
"Revoked."
};
static struct status_map_st failure_map[] =
{
{ TS_INFO_BAD_ALG,
"unrecognized or unsupported algo... | false | false | false | false | false | 0 |
open(QIODevice::OpenMode mode)
{
QString error;
if(!d->open(d->fileName, mode, error))
{
setErrorString(error);
return false;
}
return QIODevice::open(mode);
} | false | false | false | false | false | 0 |
pv_gdslayer_iscon(layer)
int layer;
{
int rds_layer;
char texte[8];
if (layer != -1)
for (rds_layer = 0; rds_layer < RDS_MAX_LAYER; rds_layer++) {
if (GET_GDS_CONNECTOR_LAYER(rds_layer) == layer)
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
report_msg_status(int reset, int received, int used,
int rejected, char *groupname)
{
int len;
char buf[160];
if (reset) {
pr_info("i18n messages from group %s reset to defaults\n",
groupname);
} else if (received) {
len = snprintf(buf, sizeof(buf),
" updated %d of %d i18n messages from group %s\... | true | true | false | false | false | 1 |
IPrcWrite(pfPrcHelper* prc) {
plLoadCloneMsg::IPrcWrite(prc);
prc->startTag("AvatarParams");
prc->writeParam("IsPlayer", fIsPlayer);
prc->writeParam("UserStr", fUserStr);
prc->endTag(true);
prc->writeSimpleTag("SpawnPoint");
fSpawnPoint->prcWrite(prc);
prc->closeTag();
if (getInit... | false | false | false | false | false | 0 |
gtextfield_getsize(GGadget *g, GRect *r ) {
GTextField *gt = (GTextField *) g;
_ggadget_getsize(g,r);
if ( gt->vsb!=NULL )
r->width = gt->vsb->g.r.x+gt->vsb->g.r.width-g->r.x;
if ( gt->hsb!=NULL )
r->height = gt->hsb->g.r.y+gt->hsb->g.r.height-g->r.y;
return( r );
} | false | false | false | false | false | 0 |
mdns_remote_added (DMAPMdnsBrowser * browser,
DMAPMdnsBrowserService * service, DACPShare * share)
{
DACPRemoteInfo *remote_info;
remote_info = g_new (DACPRemoteInfo, 1);
remote_info->host = g_strdup (service->host);
remote_info->port = service->port;
remote_info->connection = NULL;
remote_info->pair_txt = ... | false | false | false | false | false | 0 |
serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr)
{
struct uart_port *port = &up->port;
unsigned char ch;
int max_count = 256;
char flag;
do {
if (likely(lsr & UART_LSR_DR))
ch = serial_in(up, UART_RX);
else
/*
* Intel 82571 has a Serial Over Lan device that will
* set UART_LSR_B... | false | false | false | false | false | 0 |
TIFFRasterScanlineSize64(TIFF* tif)
{
static const char module[] = "TIFFRasterScanlineSize64";
TIFFDirectory *td = &tif->tif_dir;
uint64 scanline;
scanline = _TIFFMultiply64(tif, td->td_bitspersample, td->td_imagewidth, module);
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
scanline = _TIFFMultiply64... | false | false | false | false | false | 0 |
dec_save(int ig1 _is_unused, int ig2 _is_unused)
{
int i;
for (i = 0; i <= nx && i < NN; i++)
switch (n[i]) {
case 1: /* application cursor keys */
saved_appl_cursor = appl_cursor;
break;
case 3: /* 132-column mode */
saved_wide_mode = wide_mode;
break;
case 7: /* wraparound mode */
... | false | false | false | false | false | 0 |
CallBack_EstateTree_UnSelectRow(GtkCTree *EstateTree, GtkCTreeNode *Node) {
(void)EstateTree;
(void)Node;
// gchar *data;
GtkWidget *parent, *info, *Alignment, *Label;
// gint32 id;
// data = gtk_ctree_node_get_row_data(GTK_CTREE(EstateTree), Node);
// id = atoi(data);
parent = gtk_object_get_data(GTK_OBJECT(g... | false | false | false | false | false | 0 |
CheckLinks()
{
GDALProxyPoolCacheEntry* cur = firstEntry;
int i = 0;
while(cur)
{
CPLAssert(cur == firstEntry || cur->prev->next == cur);
CPLAssert(cur == lastEntry || cur->next->prev == cur);
i++;
CPLAssert(cur->next != NULL || cur == lastEntry);
cur = cur->next;
}
... | false | false | false | false | false | 0 |
d_template_args (struct d_info *di)
{
struct demangle_component *hold_last_name;
struct demangle_component *al;
struct demangle_component **pal;
/* Preserve the last name we saw--don't let the template arguments
clobber it, as that would give us the wrong name for a subsequent
constructor or destruct... | false | false | false | false | false | 0 |
fat_attach(struct inode *inode, loff_t i_pos)
{
struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
if (inode->i_ino != MSDOS_ROOT_INO) {
struct hlist_head *head = sbi->inode_hashtable
+ fat_hash(i_pos);
spin_lock(&sbi->inode_hash_lock);
MSDOS_I(inode)->i_pos = i_pos;
hlist_add_head(&MSDOS_I(inode)-... | false | false | false | false | false | 0 |
insertEndnoteContainer(fp_EndnoteContainer * pECon)
{
fl_DocSectionLayout * pDSL = getDocSecForEndnote(pECon);
fp_Container * pCon = pDSL->getFirstEndnoteContainer();
if(pCon == NULL)
{
pDSL->setFirstEndnoteContainer(pECon);
pDSL->setLastEndnoteContainer(pECon);
pECon->setNext(NULL);
pECon->setPrev(NULL);
... | false | false | false | false | false | 0 |
jbig2_decode_halftone_mmr(Jbig2Ctx *ctx,
const Jbig2GenericRegionParams *params,
const byte *data, size_t size,
Jbig2Image *image, size_t* consumed_bytes)
{
Jbig2MmrCtx mmr;
const int rowstride = image->stride;
byte *dst = image->data;
byte *ref = NULL;
int y;
int code = 0;
const uint32_t EOFB = 0x0010... | false | false | false | false | false | 0 |
e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int h)
{
E_OBJECT_CHECK(es);
E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
es->x = x;
es->y = y;
es->w = w;
es->h = h;
if (es->popup)
e_popup_move_resize(es->popup, es->x, es->y, es->w, es->h);
else
{
evas_object_move(es->o_event, ... | false | false | false | false | false | 0 |
RemoveObserver(unsigned long tag)
{
vtkObserver *elem;
vtkObserver *prev;
vtkObserver *next;
elem = this->Start;
prev = NULL;
while (elem)
{
if (elem->Tag == tag)
{
if (prev)
{
prev->Next = elem->Next;
next = prev->Next;
}
else
{
t... | false | false | false | false | false | 0 |
delBuffer (Buffer buff)
{
if (buff != NULL && --(buff->refCount) == 0)
{
#if 0
d_printf (1,"Freeing a %s buffer (%p)\n",
(buff->deletable ? "DELETABLE" : "NON-DELETABLE"), buff) ;
#endif
bufferCount-- ;
if (buff->deletable)
{
bufferByteCount -= (buff->memSize +... | false | false | false | false | false | 0 |
gitrp_hide(git_revpool *pool, git_commit *commit)
{
if (pool->walking)
return GIT_ERROR;
git_commit__mark_uninteresting(commit);
return gitrp_push(pool, commit);
} | false | false | false | false | false | 0 |
onUpdAnyFiles(FXObject *sender,FXSelector,void*){
if(app->reg().readStringEntry(group.text(),"FILE1",NULL))
sender->handle(this,FXSEL(SEL_COMMAND,FXWindow::ID_SHOW),NULL);
else
sender->handle(this,FXSEL(SEL_COMMAND,FXWindow::ID_HIDE),NULL);
return 1;
} | false | false | false | false | false | 0 |
unparse_uniqID
#ifdef KC_USE_PROTOTYPES
(uniqID kc_p, void (*kc_printer)(char*, uview), uview kc_current_view)
#else
(kc_p, kc_printer, kc_current_view) uniqID kc_p; void (*kc_printer)KC__P((char*, uview)); uview kc_current_view;
#endif
{
/*SUPPRESS 622*/
assert_uniqID(kc_p, "kc_p");
switch((int)kc_current_view) {
... | false | false | false | true | false | 1 |
ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, int *family)
{
int ret=ASN_OK;
struct ast_sockaddr addr;
const char *host=NULL;
ret = ast_getsockname(socket, &addr);
if(ret != 0)
return ASN_E_INVSOCKET;
host = ast_sockaddr_stringify_addr(&addr);
if(host && strlen(host) ... | false | true | false | false | false | 1 |
vivid_vbi_gen_set_time_of_day(u8 *packet)
{
struct tm tm;
u8 checksum, i;
time_to_tm(get_seconds(), 0, &tm);
packet[0] = calc_parity(0x07);
packet[1] = calc_parity(0x01);
packet[2] = calc_parity(0x40 | tm.tm_min);
packet[3] = calc_parity(0x40 | tm.tm_hour);
packet[4] = calc_parity(0x40 | tm.tm_mday);
if (tm.t... | false | false | false | false | false | 0 |
HEinfo(HE_CMD * cmd)
{
int i;
int all = NO;
int longout = NO;
int group = NO;
int label = NO;
for (i = 1; i < cmd->argc; i++)
if (cmd->argv[i][0] == '-')
switch (findOpt(cmd->argv[i] + 1))
{
case HE_HELP:
... | false | false | false | false | false | 0 |
calc_last_char() {
int i;
for (i = mNVisibleLines - 1; i >= 0 && mLineStarts[i] == -1; i--) ;
mLastChar = i < 0 ? 0 : line_end(mLineStarts[i], true);
} | false | false | false | false | false | 0 |
player_get_by_id( char *id )
{
Player *player;
list_reset( players );
while ( ( player = list_next( players ) ) ) {
if ( STRCMP( player->id, id ) )
return player;
}
return 0;
} | false | false | false | false | false | 0 |
tv_equal(tv1, tv2, ic)
typval_T *tv1;
typval_T *tv2;
int ic; /* ignore case */
{
char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
char_u *s1, *s2;
static int recursive = 0; /* cach recursive loops */
int r;
if (tv1->v_type != tv2->v_type)
return FALSE;
/* Catch lists and dict... | false | false | false | false | false | 0 |
handle_Q2_HKEY(struct ptype_action_args *parg)
{
struct Q2_data *rdata = parg->opaque;
g2_packet_t *source = parg->source;
char *hptr;
size_t len;
uint32_t hkey;
/*
* hashed keywords, the client already has done the "hash
* the search text" dance for us, we can add this directly
* to our list
*/
if(unli... | false | false | false | false | false | 0 |
_PR_CleanupFdCache(void)
{
PRFileDesc *fd, *next;
PRStackElem *pop;
for (fd = _pr_fd_cache.head; fd != NULL; fd = next)
{
next = fd->higher;
PR_DELETE(fd->secret);
PR_DELETE(fd);
}
_pr_fd_cache.head = NULL;
_pr_fd_cache.tail = NULL;
_pr_fd_cache.count = 0;
PR... | false | false | false | false | false | 0 |
HandleEvent(TEvent &Event) {
GView::HandleEvent(Event);
Top->HandleEvent(Event);
#ifdef CONFIG_MOUSE
if (Event.What & evMouse) {
int W, H;
ConQuerySize(&W, &H);
if (Event.What != evMouseDown || Event.Mouse.Y == H - 1) {
switch (Event.What) {
case evMouseDow... | false | false | false | false | false | 0 |
server_inode (xlator_t *this)
{
server_conf_t *conf = NULL;
server_connection_t *trav = NULL;
char key[GF_DUMP_MAX_BUF_LEN];
int i = 1;
int ret = -1;
GF_VALIDATE_OR_GOTO ("server", this, out);
conf = this... | false | false | false | false | false | 0 |
addPairIG(const CRotFrictionIGP &prms)
{
RotIGPCommand igpCmd(getGlobalRankAndComm());
igpCmd.appendIGP(prms);
igpCmd.append(prms.k);
igpCmd.append(prms.mu_s);
igpCmd.append(prms.mu_d);
igpCmd.append(prms.k_s);
igpCmd.append(prms.dt);
igpCmd.append(static_cast<int>(prms.scaling));
igpCmd.append(static... | false | false | false | false | false | 0 |
markAnythingOverdefined(Value *V) {
if (StructType *STy = dyn_cast<StructType>(V->getType()))
for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i)
markOverdefined(getStructValueState(V, i), V);
else
markOverdefined(V);
} | false | false | false | false | false | 0 |
H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts,
size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0)
{
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* return value */
FUNC_ENTER_API(H5Pset_cache, FAIL);
H5TRACE5("e", "iIszzd", plist_id, mdc_nelmts, rd... | false | false | false | false | false | 0 |
target_able(int m_idx)
{
int py = p_ptr->py;
int px = p_ptr->px;
monster_type *m_ptr;
/* No monster */
if (m_idx <= 0) return (FALSE);
/* Get monster */
m_ptr = &mon_list[m_idx];
/* Monster must be alive */
if (!m_ptr->r_idx) return (FALSE);
/* Monster must be visible */
if (!m_ptr->ml) return (FALSE);
... | false | false | false | false | false | 0 |
HandleNewEdge(const QSharedPointer<Edge> &edge)
{
_con_tab.AddEdge(edge);
edge->SetSink(_rpc.data());
QObject::connect(edge.data(), SIGNAL(StoppedSignal()),
this, SLOT(HandleEdgeClose()));
if(!edge->Outbound()) {
return;
}
_outstanding_con_attempts.remove(edge->GetRemoteAddres... | false | false | false | false | false | 0 |
flytec_delete(flytec_t *flytec)
{
if (flytec) {
snp_delete(flytec->snp);
if (flytec->trackv) {
track_t **track;
for (track = flytec->trackv; *track; ++track)
track_delete(*track);
free(flytec->trackv);
}
if (close(flytec->fd) == -1)
DIE("close", errno);
free(flytec->pilot_name);
free(fly... | false | false | false | false | false | 0 |
_my_gl_mode_cancel(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
fprintf(stderr, "drag\n");
if (!data) return;
int v = elm_radio_value_get(data);
Elm_Object_Item *glit = elm_genlist_decorated_item_get(obj);
if (glit) elm_genlist_item_decorate_mode_set(glit, mode_type[v], EINA_FALSE);
} | false | false | false | false | false | 0 |
snd_ice1712_capture_trigger(struct snd_pcm_substream *substream,
int cmd)
{
struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
int result = 0;
u8 tmp;
spin_lock(&ice->reg_lock);
tmp = snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL);
if (cmd == SNDRV_PCM_TRIGGER_START) {
tmp |= 1;
} else if (... | false | false | false | false | false | 0 |
move (IFExpression *ex) {
Instruction inst (ex->fenode, ex->opcode) ;
inst.setDest (operand (ex->ops[0])) ;
inst.setOperand (0, operand (ex->ops[1])) ;
issue (inst) ;
} | false | false | false | false | false | 0 |
vfs_stats_free ( VFSStats *p)
{
#ifdef GW_DEBUG_DATA_COMPONENT
static gint i = 0;
i++;
g_print ( "*** GW - %s (%d) :: %s() : %d calls\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, i);
#endif
if ( p != NULL )
{
vfs_stats_set_name ( p, NULL);
vfs_stats_set_dir ( p, NULL);
vfs_stats_set_label ( p, NULL);
v... | false | false | false | false | false | 0 |
read_msg_extend_cb(struct libusb_transfer *transfer)
{
struct read_msg_data *udata = transfer->user_data;
unsigned char *buf = transfer->buffer - MSG_READ_BUF_SIZE;
int handle_result = 0;
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
fp_err("extended msg read failed, code %d", transfer->status);
goto er... | false | false | false | false | false | 0 |
dmfe_start_xmit(struct sk_buff *skb,
struct DEVICE *dev)
{
struct dmfe_board_info *db = netdev_priv(dev);
void __iomem *ioaddr = db->ioaddr;
struct tx_desc *txptr;
unsigned long flags;
DMFE_DBUG(0, "dmfe_start_xmit", 0);
/* Too large packet check */
if (skb->len > MAX_PACKET_SIZE) {
pr_err("big packet ... | false | false | false | false | false | 0 |
main(int argc, char *argv[])
{
int n_index; /* index of node entry */
int nodeid; /* value of node entry */
int n_flags; /* extra node entry info */
/* Ensure that we are not root */
#ifndef LAM_ALLOW_RUN_AS_ROOT
if (getuid() == 0 || geteuid() == 0) {
show_help(NULL, "deny-root", NULL);
exit(EACCES)... | true | true | false | false | true | 1 |
set_dac_frequency(int which, int frequency)
{
struct dac_state *d = &dac[which];
int count = (d->bufin - d->bufout) & DAC_BUFFER_SIZE_MASK;
/* set the frequency of the associated DAC */
d->frequency = frequency;
d->step = (int)((double)frequency * (double)(1 << 24) / (double)Machine->sample_rate);
/* a... | false | false | false | false | false | 0 |
main(int argc, char **/*argv*/)
{
char *error;
const char *path;
if (argc != 1) {
fprintf(stderr,"no parameters\n");
printf(" Converts RNA or DNA Data to Pro\n");
exit(-1);
}
path = ":";
aprm.gb_main = GB_open(path,"r");
if (!aprm.gb_main){
fprintf(stderr,"ERR... | 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.