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 |
|---|---|---|---|---|---|---|
runOnMachineBasicBlock(MachineBasicBlock &MBB) {
bool Changed = false;
for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I)
if (I->getDesc().hasDelaySlot()) {
MachineBasicBlock::iterator D = MBB.end();
MachineBasicBlock::iterator J = I;
if (!DisableDelaySlotFiller)
... | false | false | false | false | false | 0 |
checkStartCondition() const
{
QString condition = d->df->desktopGroup().readEntry("X-KDE-autostart-condition");
if (condition.isEmpty())
return true;
const QStringList list = condition.split(QLatin1Char(':'));
if (list.count() < 4) {
return true;
}
if (list[0].isEmpty() || list... | false | false | false | false | false | 0 |
brasero_session_cfg_finalize (GObject *object)
{
BraseroPluginManager *manager;
BraseroSessionCfgPrivate *priv;
GSList *tracks;
priv = BRASERO_SESSION_CFG_PRIVATE (object);
tracks = brasero_burn_session_get_tracks (BRASERO_BURN_SESSION (object));
for (; tracks; tracks = tracks->next) {
BraseroTrack *track;
... | false | false | false | false | false | 0 |
draw_3d_bar( gdImagePtr im,
int x1,
int x2,
int y0,
int yhigh,
int xdepth,
int ydepth,
int clr,
int clrshd )
{
#define SET_3D_BAR( gdp, x1, x2, y1, y2, xoff, yoff ) \
gdp[0].x = x1, gdp[0].y = y1, \
gdp[1].x = x1+(xoff), gdp[1].y =... | false | false | false | false | false | 0 |
ves_icall_System_IO_MonoIO_GetFileSystemEntries (MonoString *path,
MonoString *path_with_pattern,
gint attrs, gint mask,
gint32 *error)
{
MonoDomain *domain = mono_domain_get ();
MonoArray *result;
int i;
GPtrArray *names;
*error = ERROR_SUCCESS;
MONO_PREPARE_BLOCKING;
names = get_filesys... | false | false | false | false | false | 0 |
printModel()
{
ExprMap<Expr> m;
d_vc->getConcreteModel(m);
cout << "Current scope level is " << d_vc->scopeLevel() << "." << endl;
ExprMap<Expr>::iterator it = m.begin(), end = m.end();
if(it == end)
cout << " Did not find concrete model for any vars" << endl;
else {
cout << "%Satisfiable Variable... | false | false | false | false | false | 0 |
job_stdout_soft_requested_queues_finished(job_handler_t* handler, lList **alpp)
{
DENTER(TOP_LAYER, "job_stdout_soft_requested_queues_finished");
putchar('\n');
DEXIT;
return 0;
} | false | false | false | false | false | 0 |
skip_padding (void)
{
while ((vfr->PC % 4) > 0)
if (get_byte () != 0)
verify_fail ("found nonzero padding byte");
} | false | false | false | false | false | 0 |
xmlFileOpenMethod (const char* afilename) {
const char* buf;
try {
Request& r=pa_thread_request();
char* s=pa_strdup(afilename+9 /*strlen("parser://")*/);
const char* method_cstr=lsplit(&s, '/');
const String* method=new String(method_cstr);
String::Body param_body("/");
if(s)
param_body.append_know... | false | false | false | false | false | 0 |
RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
// get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
// get the input and outpu... | false | false | false | false | false | 0 |
FCEUI_CheatSearchGetCount(void)
{
uint32 x,c=0;
if(CheatComp)
{
for(x=0x0000;x<0x10000;x++)
if(!(CheatComp[x]&CHEATC_NOSHOW) && CheatRPtrs[x>>10])
c++;
}
return c;
} | false | false | false | false | false | 0 |
look_at_object(s48_value obj) {
if (gather_predicate(obj))
add_stob(obj);
return TRUE;
} | false | false | false | false | false | 0 |
select_matching_profile (GstLocationsCombo *combo)
{
GstLocationsComboPrivate *priv;
GtkTreeIter iter;
gchar *current;
gchar *profile;
gboolean valid;
priv = combo->_priv;
valid = gtk_tree_model_get_iter_first (priv->model, &iter);
current = gst_network_locations_get_current (GST_NETWORK_LOCATIONS (com... | false | false | false | false | false | 0 |
updateSbgNHoursGaps(int sbg, int d)
{
int hours=0, gaps=0, nfirstgaps=0;
int h;
for(h=0; h<gt.rules.nHoursPerDay; h++){
if(sbgTimetable(d,h)>=0)
break;
else if(!breakDayHour(d,h) && !subgroupNotAvailableDayHour(sbg,d,h))
nfirstgaps++;
}
int ng=0;
for(; h<gt.rules.nHoursPerDay; h++){
if(sbgTimetable(d... | false | false | false | false | false | 0 |
brasero_metadata_install_plugins_completed (BraseroMetadataGstDownload *download)
{
GSList *iter;
GSList *next;
for (iter = download->objects; iter; iter = next) {
next = iter->next;
brasero_metadata_completed (BRASERO_METADATA (iter->data));
}
} | false | false | false | false | false | 0 |
tcp_transport_write(void *data, const char *buf, apr_size_t size) {
apr_socket_t *socket = data;
apr_status_t status = APR_SUCCESS;
apr_size_t total = size;
apr_size_t count = 0;
apr_size_t len;
if (!socket) {
return APR_ENOSOCKET;
}
while (total != count) {
len = total - count;
if ((status... | false | false | false | false | false | 0 |
dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
isc_result_t result;
dns_acl_t *acl;
/*
* Work around silly limitation of isc_mem_get().
*/
if (n == 0)
n = 1;
acl = isc_mem_get(mctx, sizeof(*acl));
if (acl == NULL)
return (ISC_R_NOMEMORY);
acl->mctx = NULL;
isc_mem_attach(mctx, &acl->mct... | false | false | false | false | false | 0 |
__mark_down_children (int32_t *pending[], int child_count,
unsigned char *child_up, afr_transaction_type type)
{
int i = 0;
int j = 0;
for (i = 0; i < child_count; i++) {
j = afr_index_for_transaction_type (type);
if (!child_up[i])
... | false | false | false | false | false | 0 |
ldbm_back_rmdb( Slapi_PBlock *pb )
{
struct ldbminfo *li = NULL;
/* char *directory = NULL;*/
int return_value = -1;
Slapi_Backend *be;
slapi_pblock_get( pb, SLAPI_BACKEND, &be );
if (be->be_state != BE_STATE_STOPPED)
{
LDAPDebug( LDAP_DEBUG_TRACE,
"ldbm_back_cleanup: warning - backend is in a wr... | false | false | false | false | false | 0 |
nfs3_log_link_call (uint32_t xid, struct nfs3_fh *fh, char *name,
struct nfs3_fh *tgt)
{
char dfhstr[1024];
char tfhstr[1024];
if (THIS->ctx->log.loglevel < GF_LOG_DEBUG)
return;
nfs3_fh_to_str (fh, dfhstr);
nfs3_fh_to_str (tgt, tfhstr);
gf_log (GF_N... | true | true | false | false | false | 1 |
line6_toneport_disconnect(struct usb_line6 *line6)
{
struct usb_line6_toneport *toneport =
(struct usb_line6_toneport *)line6;
del_timer_sync(&toneport->timer);
if (toneport_has_led(toneport))
toneport_remove_leds(toneport);
} | false | false | false | false | false | 0 |
OGRCouchDBWriteFeature( OGRFeature* poFeature,
OGRwkbGeometryType eGeomType,
int bGeoJSONDocument,
int nCoordPrecision )
{
CPLAssert( NULL != poFeature );
json_object* poObj = jso... | false | false | false | false | false | 0 |
main(int argc, char* argv[])
{
print_stack_on_segfault();
RCP<const Basic> x = rcp(new Symbol("x"));
RCP<const Basic> y = rcp(new Symbol("y"));
RCP<const Basic> z = rcp(new Symbol("z"));
RCP<const Basic> w = rcp(new Symbol("w"));
RCP<const Basic> i15 = rcp(new Integer(15));
RCP<const Basic>... | false | false | false | false | false | 0 |
ompi_coll_tuned_reduce_scatter_intra_do_forced(void *sbuf, void* rbuf,
int *rcounts,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
... | false | false | false | false | false | 0 |
new_csubmatrix (header *hd, header *rows, header *cols,
char *name)
{ if (nosubmref) return built_csmatrix(hd,rows,cols);
return hnew_submatrix(hd,rows,cols,name,s_csubmatrix);
} | false | false | false | false | false | 0 |
vdp_reload_counter(int scanline)
{
/* generate an int if they're enabled */
if ((segac2_vdp_regs[0] & 0x10) && !(iochip_reg[7] & 0x10))
if (scanline != 0 || segac2_vdp_regs[10] == 0)
{
scanline_int = 1;
update_interrupts();
timer_set(cpu_getscanlinetime(scanline + 1), 0, vdp_int4_off);
}
/... | false | false | false | false | false | 0 |
locate_helpfile(const string& helpname) {
// search for 'helpname' in various helpfile locations
#define PATHS 2
static string path[PATHS] = { "oldhelp/", "genhelp/" };
struct stat st;
for (size_t p = 0; p<PATHS; p++) {
string fullname = path[p]+helpname;
if (stat(fullname.c_str(), &st... | false | false | false | false | false | 0 |
eaptype_type2name(unsigned int type, char *buffer, size_t buflen)
{
DICT_VALUE *dval;
if (type > PW_EAP_MAX_TYPES) {
/*
* Prefer the dictionary name over a number,
* if it exists.
*/
dval = dict_valbyattr(PW_EAP_TYPE, type);
if (dval) {
snprintf(buffer, buflen, "%s", dval->name);
}
snprintf(bu... | false | false | false | false | false | 0 |
modem_loc_enable_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
{
Modem *modem = user_data;
GError *error = NULL;
modem->loc_enabling = FALSE;
if (!dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) {
g_warning ("%s: failed to enable modem location services: (%d) %s",
__f... | false | false | false | false | false | 0 |
load( QDataStream &ds)
{
if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions;
if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs;
ds >> (*(parsedOptionList));
ds >> (*(parsedArgList));
if (parsedOptionList->count() == 0)
{
delete parsedOptionList; parsedOptionList = 0;... | false | false | false | false | false | 0 |
gda_mysql_provider_get_default_dbms_type (GdaServerProvider *provider,
GdaConnection *cnc,
GType type)
{
if (cnc) {
g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL);
g_return_val_if_fail (gda_connection_get_provider (cnc) == provider, NULL);
}
if (type == G_TYPE_INT64)
re... | false | false | false | false | false | 0 |
proc_watchdog_thresh(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
int err, old, new;
get_online_cpus();
mutex_lock(&watchdog_proc_mutex);
if (watchdog_suspended) {
/* no parameter changes allowed while watchdog is suspended */
err = -EAGAIN;
goto out;
}
old =... | false | false | false | false | false | 0 |
dht_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int op_ret, int op_errno, fd_t *fd)
{
dht_local_t *local = NULL;
call_frame_t *prev = NULL;
int ret = 0;
local = frame->local;
prev = cookie;
local->op_errno = op_errno;
if... | false | false | false | false | false | 0 |
ecc_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey,
int (*cmp)(void *, gcry_mpi_t), void *opaquev)
{
gpg_err_code_t err;
ECC_public_key pk;
(void)algo;
(void)cmp;
(void)opaquev;
if (!data[0] || !data[1] || !hash || !pkey[0] || !pkey[1] || !pkey[2]
|| !pkey[3] || !p... | false | false | false | false | false | 0 |
get_local_directory (GtkWindow *parent, const gchar *uri)
{
const gchar *err_msg = NULL;
gchar *local = NULL;
if (uri != NULL)
{
local = anjuta_util_get_local_path_from_uri (uri);
if (local == NULL)
{
/* Only local directory are supported */
err_msg = _("Program directory '%s' is not local");
}
}
... | false | false | false | false | false | 0 |
featFindOutFormatC(const char* format, ajint* iformat)
{
ajint i = 0;
/*ajDebug("featFindOutFormatC '%s'\n", format);*/
if(!*format)
return ajFalse;
ajStrAssignC(&featoutFormatTmp, format);
ajStrFmtLower(&featoutFormatTmp);
for(i=0; featOutFormat[i].Name; i++)
{
/*ajDebug("test %d '%s' ... | false | false | false | false | false | 0 |
slotLoadImages()
{
if (d->m_doc )
d->m_doc->docLoader()->setAutoloadImages( !d->m_doc->docLoader()->autoloadImages() );
ConstFrameIt it = d->m_frames.constBegin();
const ConstFrameIt end = d->m_frames.constEnd();
for (; it != end; ++it ) {
if ( KHTMLPart* p = qobject_cast<KHTMLPart*>((*... | false | false | false | false | false | 0 |
fl_set_input_editkeymap( const FL_EditKeymap * keymap )
{
/* If keymap is Null force default */
if ( ! keymap )
{
set_default_keymap( 1 );
return;
}
set_default_keymap( 0 );
SetKey( del_prev_char );
SetKey( del_next_char );
SetKey( del_prev_word );
SetKey( del_next... | false | false | false | false | false | 0 |
addCanonicalItems() {
UnicodeString conflictingPattern;
UErrorCode status = U_ZERO_ERROR;
for (int32_t i=0; i<UDATPG_FIELD_COUNT; i++) {
addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status);
}
} | false | false | false | false | false | 0 |
parse_blength(int argc, char **argv, int *option, int *opt_all, int *bad_arg) {
/* argc: Number of arguments for this option. */
/* argv: Arguments for this option. */
/* option: Clear flag to set. */
/* opt_all */
/* bad_arg: Set to true if an error is detected. */
/* Parse -blength specification. */
if (argc... | false | false | false | false | false | 0 |
retro_console_init(int width, int height) /* returns the console GtkDrawingArea */
{
struct cairo_read_func_closure cl;
int i;
rc_console_width = width;
rc_console_height = height;
/* create drawing area */
rc_drawing_area = gtk_drawing_area_new();
gtk_widget_set_size_request(rc_drawing_a... | false | false | false | false | false | 0 |
carl9170_usb_submit_cmd_urb(struct ar9170 *ar)
{
struct urb *urb;
int err;
if (atomic_inc_return(&ar->tx_cmd_urbs) != 1) {
atomic_dec(&ar->tx_cmd_urbs);
return 0;
}
urb = usb_get_from_anchor(&ar->tx_cmd);
if (!urb) {
atomic_dec(&ar->tx_cmd_urbs);
return 0;
}
usb_anchor_urb(urb, &ar->tx_anch);
err = ... | false | false | false | false | false | 0 |
Player_QuestWasCompleted(Crossfire_Player *whoptr, PyObject *args) {
char *code;
int completed;
sstring quest_code;
EXISTCHECK(whoptr);
if (!PyArg_ParseTuple(args, "s", &code))
return NULL;
quest_code = cf_add_string(code);
completed = cf_quest_was_completed(whoptr->obj, quest_code... | false | false | false | false | false | 0 |
online_notify (gboolean online, gpointer user_data)
{
SwServiceSina *sina = SW_SERVICE_SINA (user_data);
SwServiceSinaPrivate *priv = GET_PRIVATE (sina);
if (online) {
sw_keyfob_oauth ((OAuthProxy *)priv->proxy, got_tokens_cb, sina);
} else {
g_free (priv->user_id);
priv->user_id = NULL;
g_fre... | false | false | false | false | false | 0 |
node_last_key(struct tree_node_*node)
{
while (node->leaf_flag == false)
node = node->child[node->count-1];
return node->leaf[node->count-1].key;
} | false | false | false | false | false | 0 |
network_available() {
int retval;
SET_LOCALE sl;
RPC rpc(this);
retval = rpc.do_rpc("<network_available/>\n");
return retval;
} | false | false | false | false | false | 0 |
unpack_colocation_set(xmlNode * set, int score, pe_working_set_t * data_set)
{
xmlNode *xml_rsc = NULL;
resource_t *with = NULL;
resource_t *resource = NULL;
const char *set_id = ID(set);
const char *role = crm_element_value(set, "role");
const char *sequential = crm_element_value(set, "sequenti... | false | false | false | false | false | 0 |
fc_lport_enter_fdmi(struct fc_lport *lport)
{
struct fc_rport_priv *rdata;
FC_LPORT_DBG(lport, "Entered FDMI state from %s state\n",
fc_lport_state(lport));
fc_lport_state_enter(lport, LPORT_ST_FDMI);
mutex_lock(&lport->disc.disc_mutex);
rdata = lport->tt.rport_create(lport, FC_FID_MGMT_SERV);
mutex_unl... | false | false | false | false | false | 0 |
test_ot_tag_script_degenerate (void)
{
hb_script_t t1, t2;
g_assert_cmphex (HB_TAG_CHAR4 ("DFLT"), ==, HB_OT_TAG_DEFAULT_SCRIPT);
/* HIRAGANA and KATAKANA both map to 'kana' */
test_simple_tags ("kana", HB_SCRIPT_KATAKANA);
hb_ot_tags_from_script (HB_SCRIPT_HIRAGANA, &t1, &t2);
g_assert_cmphex (t1, ==, HB... | false | false | false | false | false | 0 |
getPriority(String shaderLanguage)
{
std::map<String,int>::iterator it = mLanguagePriorities.find(shaderLanguage);
if (it == mLanguagePriorities.end())
return -1;
else
return (*it).second;
} | false | false | false | false | false | 0 |
putcomponent(unsigned char *buf, int x, int bpc, int value)
{
switch (bpc)
{
case 1: buf[x >> 3] |= value << (7 - (x & 7)); break;
case 2: buf[x >> 2] |= value << ((3 - (x & 3)) << 1); break;
case 4: buf[x >> 1] |= value << ((1 - (x & 1)) << 2); break;
case 8: buf[x] = value; break;
case 16: buf[x<<1] = value>>8... | false | false | false | false | false | 0 |
createArgs( KLaunchRequest *request, const KService::Ptr service ,
const QStringList &urls)
{
const QStringList params = KRun::processDesktopExec(*service, urls);
for(QStringList::ConstIterator it = params.begin();
it != params.end(); ++it)
{
request->arg_list.append(*it);
}
... | false | false | false | false | false | 0 |
create_sbcast_cred(slurm_cred_ctx_t ctx,
uint32_t job_id, char *nodes,
time_t expiration)
{
Buf buffer;
int rc;
sbcast_cred_t *sbcast_cred;
time_t now = time(NULL);
xassert(ctx);
if (_slurm_crypto_init() < 0)
return NULL;
sbcast_cred = xmalloc(sizeof(struct sbcast_cred));
sbcast_cred->ctime ... | false | false | false | false | false | 0 |
hdup_checkheader(pheader_t head)
{
/* check to see if the header is correctly formed
* if not, raise error and quit!
*/
int s = -1;
if ( strncmp ( head->prot_name, PROT_NAME, 4 ) != 0 ) {
WARN("%s", "Protocol: name mismatch");
return 1;
}
if ( strncmp ( head->prot_ver, PROT_VER, 2 ) != 0 ) {
WARN("%s",... | false | false | false | false | false | 0 |
httpDisconnect(HttpConn *conn)
{
if (conn->sock) {
mprDisconnectSocket(conn->sock);
}
conn->connError = 1;
conn->error = 1;
conn->keepAliveCount = -1;
if (conn->rx) {
conn->rx->eof = 1;
}
} | false | false | false | false | false | 0 |
BD_DecReplace(GF_BifsDecoder * codec, GF_BitStream *bs)
{
u8 type;
type = gf_bs_read_int(bs, 2);
switch (type) {
case 0:
return BD_DecNodeReplace(codec, bs);
case 1:
return BD_DecFieldReplace(codec, bs);
case 2:
return BD_DecIndexValueReplace(codec, bs);
case 3:
return BD_DecRouteReplace(codec, bs);
}
... | false | false | false | false | false | 0 |
customFocusPoint() const
{
return d_func()->focusControl ?
d_func()->focusControl->customFocusPoint() :
QPointF(0.5,0.5);
} | false | false | false | false | false | 0 |
fetch_result_int32(MYSQL_BIND *param,
MYSQL_FIELD *field __attribute__((unused)),
uchar **row)
{
my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG);
uint32 data= (uint32) sint4korr(*row);
longstore(param->buffer, data);
*param->error= para... | false | false | false | false | false | 0 |
on_text_editor_scintilla_focus_in (GtkWidget* scintilla, GdkEvent *event,
TextEditor *te)
{
GList *node;
node = te->views;
while (node)
{
if (aneditor_get_widget (GPOINTER_TO_INT (node->data)) == scintilla)
{
DEBUG_PRINT ("%s", "Switching editor view ...");
te->editor_id = GPOINTER_TO_INT (no... | false | false | false | false | false | 0 |
NsStartJobsShutdown(void)
{
Tcl_HashSearch search;
Tcl_HashEntry *hPtr;
hPtr = Tcl_FirstHashEntry(&tp.queues, &search);
while (hPtr != NULL) {
Ns_MutexLock(&tp.queuelock);
tp.req = THREADPOOL_REQ_STOP;
Ns_CondBroadcast(&tp.cond);
Ns_MutexUnlock(&tp.queuelock);
hPtr = Tcl_NextHashEntry(... | false | false | false | false | false | 0 |
calc_wider_mode (void)
{
int c;
struct mode_data *m;
struct mode_data **sortbuf;
unsigned int max_n_modes = 0;
unsigned int i, j;
for (c = 0; c < MAX_MODE_CLASS; c++)
max_n_modes = MAX (max_n_modes, n_modes[c]);
/* Allocate max_n_modes + 1 entries to leave room for the extra null
pointer assign... | false | false | false | false | false | 0 |
com_finish(status, cmd)
wait_status_t status;
char *cmd;
{
#ifdef MSDOS_PROCS
if (status < 0)
s_mess("[%s: not executed %d]", cmd, status);
else if (status > 0)
s_mess("[%s: exited with %d]", cmd, status);
else
s_mess("[%s: completed successfully]", cmd);
#else /* !MSDOS_PROCS */
if (WIFSIGNALED(status))
s_... | false | false | false | false | false | 0 |
validateVersionSubRange(const xmlChar *subRange, const xmlChar *codeName, const xmlChar *dotVersion)
{
bool valid = false;
int posDelimiter = xmlUTF8Strloc(subRange, (const xmlChar *) "-");
if (posDelimiter != -1)
{
xmlChar * pre = xmlUTF8Strsub(subRange, 0, posDelimiter);
xmlChar * post... | false | false | false | false | false | 0 |
_screen(void)
{
int mode = 0;
if (L9GameType == L9_V3 && strlen(FirstLine) == 0)
{
if (*codeptr++)
codeptr++;
return;
}
detect_gfx_mode();
l9textmode = *codeptr++;
if (l9textmode)
{
if (L9GameType==L9_V4)
mode = 2;
else if (picturedata)
mode = 1;
}
os_graphics(mode);
... | false | false | false | false | false | 0 |
file_lister(char *title, char *path, size_t pathlen, char *file, size_t filelen, int newmail, int flags)
{
PICO pbf;
int rv;
void (*redraw)(void) = ps_global->redrawer;
standard_picobuf_setup(&pbf);
push_titlebar_state();
if(!newmail)
pbf.newmail = NULL;
/* BUG: what about help comm... | false | false | false | false | false | 0 |
make_restrictinfo(Expr *clause,
bool is_pushed_down,
bool outerjoin_delayed,
bool pseudoconstant,
Relids required_relids,
Relids nullable_relids)
{
/*
* If it's an OR clause, build a modified copy with RestrictInfos inserted
* above each subclause of the top-level AND/OR structure.
... | false | false | false | false | false | 0 |
gst_ape_demux_identify_tag (GstTagDemux * demux, GstBuffer * buffer,
gboolean start_tag, guint * tag_size)
{
GstMapInfo map;
gst_buffer_map (buffer, &map, GST_MAP_READ);
if (memcmp (map.data, "APETAGEX", 8) != 0) {
GST_DEBUG_OBJECT (demux, "No APETAGEX marker at %s - not an APE file",
(start_tag... | false | false | false | false | false | 0 |
mono_gc_get_vtable_bits (MonoClass *klass)
{
guint res = 0;
/* FIXME move this to the bridge code */
if (sgen_need_bridge_processing ()) {
switch (sgen_bridge_class_kind (klass)) {
case GC_BRIDGE_TRANSPARENT_BRIDGE_CLASS:
case GC_BRIDGE_OPAQUE_BRIDGE_CLASS:
res = SGEN_GC_BIT_BRIDGE_OBJECT;
break;
case ... | false | false | false | false | false | 0 |
tx_tasklet(unsigned long d)
{
struct b43legacy_pioqueue *queue = (struct b43legacy_pioqueue *)d;
struct b43legacy_wldev *dev = queue->dev;
unsigned long flags;
struct b43legacy_pio_txpacket *packet, *tmp_packet;
int err;
u16 txctl;
spin_lock_irqsave(&dev->wl->irq_lock, flags);
if (queue->tx_frozen)
goto out_... | false | false | false | false | false | 0 |
print_relay_agent(const struct dhcpv4_option *opt, int elem_size, void (*print)(const char *fmt, ...))
{
const uint8_t *ptr = opt->data;
const uint8_t *endptr = ptr + opt->len;
const uint8_t *endptr1;
int type, len;
while (ptr < endptr) {
if (ptr != opt->data)
print(" ");
type = *ptr++;
len = *ptr++;
/... | false | false | false | false | false | 0 |
ob_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags,
fd_t *fd, dict_t *xdata)
{
fd_t *old_fd = NULL;
int ret = -1;
int op_errno = 0;
call_stub_t *stub = NULL;
old_fd = fd_lookup (fd->inode, 0);
if (old_fd) {
/* open-behind only when this is the first FD */
stub ... | false | false | false | false | false | 0 |
procmime_get_mime_type(const gchar *filename)
{
const gchar *p;
gchar *ext = NULL;
gchar *base;
#ifndef G_OS_WIN32
static GHashTable *mime_type_table = NULL;
MimeType *mime_type;
if (!mime_type_table) {
mime_type_table = procmime_get_mime_type_table();
if (!mime_type_table) return NULL;
}
#endif
if (filen... | false | false | false | false | false | 0 |
setDates(const QDate &aStartDate, const QDate &aEndDate) {
Q_ASSERT(aStartDate.isValid() && aEndDate.isValid() && aStartDate<=aEndDate);
mStartDate = aStartDate;
mEndDate = aEndDate;
if (!mCurDate.isValid()) mCurDate = mStartDate;
// if mCurDate is out of range, set it to mstartDate
else if (m... | false | false | false | false | false | 0 |
dieAndReappear()
{
if (nuggets > 0) {
// Enemy died and could not drop nugget. Gold is LOST - no score.
nuggets = 0; // Set lost-flag in runnerGotGold().
levelPlayer->runnerGotGold (spriteId, gridI, gridJ, false, true);
}
if (rules->reappearAtTop()) {
// Traditional or Sc... | false | false | false | false | false | 0 |
__old_semctl (int semid, int semnum, int cmd, ...)
{
union semun arg;
va_list ap;
va_start (ap, cmd);
/* Get the argument. */
arg = va_arg (ap, union semun);
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
&arg);
} | false | false | false | false | false | 0 |
processValue(const Module &M, const DbgValueInst *DVI) {
auto *N = dyn_cast<MDNode>(DVI->getVariable());
if (!N)
return;
InitializeTypeMap(M);
auto *DV = dyn_cast<DILocalVariable>(N);
if (!DV)
return;
if (!NodesSeen.insert(DV).second)
return;
processScope(DV->getScope());
processType(DV->g... | false | false | false | false | false | 0 |
options (const char *intro, ...)
{
va_list ap;
va_start (ap, intro);
m_intro = intro;
for (const char *cur = va_arg(ap, char *); cur; cur = va_arg(ap, char *)) {
if (find_option (cur) &&
strcmp(cur, "<SEPARATOR>")) {
error ("Option \"%s\" is multiply defined", cur);
... | false | false | false | false | false | 0 |
addULEB128(uint64_t Value) {
DEBUG(dbgs() << "Adding ULEB128 " << Value << " to hash.\n");
do {
uint8_t Byte = Value & 0x7f;
Value >>= 7;
if (Value != 0)
Byte |= 0x80; // Mark this byte to show that more bytes will follow.
Hash.update(Byte);
} while (Value != 0);
} | false | false | false | false | false | 0 |
Preset(int WindowLen, int SlideDist, float *WindowShape)
{ int i;
if(SlideDist>WindowLen) return -1;
Len=WindowLen; Dist=SlideDist;
if(ReallocArray(&Buff,Len)) return -1;
for(i=0; i<Len; i++) Buff[i].re=Buff[i].im=0.0;
Ptr=0;
if(!ExternWindow) free(Window);
Window=WindowShape; ExternWindow=1;
return 0; ... | false | false | false | false | false | 0 |
recvData(int count, char * data)
{
if (!mpClientSocket->hasPendingDatagrams())
{
return -1;
}
return mpClientSocket->readDatagram(data, count);
} | false | false | false | false | false | 0 |
axpbytNxN(HPtNCoord a, TransformN *x,
HPtNCoord b, TransformN *y, TransformN *res)
{
int i, j;
int dim = x->idim;
for (i = 1; i < dim; i++) {
for (j = 1; j < dim; j++) {
res->a[i*dim+j] = a * x->a[i*dim+j] + b * y->a[j*dim+i];
}
}
} | false | false | false | false | false | 0 |
toNativeKey(Qt::Key key)
{
#ifdef Q_WS_X11
if(key >= Qt::Key_Space && key <= Qt::Key_AsciiTilde)//Ascii
return key;
int i = 1;
while(KeyTbl[i])
{
if(KeyTbl[i] == key)
return KeyTbl[i - 1];
i += 2;
}
#endif
#ifdef Q_WS_WIN
for(int i = 0; i < 255; ++i)
{
if(KeyTbl[i] == key)
return i;
... | false | false | false | false | false | 0 |
transition2_render( cairo_t *cr,
cairo_surface_t *image_from,
cairo_surface_t *image_to,
gdouble progress,
gint direction )
{
gint width, height;
width = cairo_image_surface_get_width( image_from );
height = cairo_image_surface_get_height( image_from );
cairo_... | false | false | false | false | false | 0 |
esas2r_release(struct Scsi_Host *sh)
{
esas2r_log_dev(ESAS2R_LOG_INFO, &(sh->shost_gendev),
"esas2r_release() called");
esas2r_cleanup(sh);
if (sh->irq)
free_irq(sh->irq, NULL);
scsi_unregister(sh);
return 0;
} | false | false | false | false | false | 0 |
clutter_color_get_static (ClutterStaticColor color)
{
g_return_val_if_fail (color >= CLUTTER_COLOR_WHITE &&
color <= CLUTTER_COLOR_TRANSPARENT, NULL);
return &static_colors[color];
} | false | false | false | false | false | 0 |
recalc(QPointF p)
{
// http://www.flong.com/texts/code/shapers_bez/
// http://www.lemoda.net/maths/bezier-length/index.html,
// arbitrary but reasonable t-values for interior control points
double t0 = 0.3;
double t1 = 0.7;
if (m_drag_cp0) {
double x = (p.x() - m_endpoint0.x() * B0(t0) - m_cp1.x() * B2(t0) - ... | false | false | false | false | false | 0 |
componentvaluestringdecode(char *is, float *val0, float *val1,
float *val2, char *place) {
int ni;
char f0[10], f1[10], f2[10], f3[10];
ni=sscanf(is, "%s %s %s %s", f0, f1, f2, f3);
switch(ni) {
case 0: fprintf(stderr, "Invalid component value\n"); return 1;
case 1: *place=' '; *val0=psdec(f0); ... | false | false | false | false | false | 0 |
getString() const {
if (m_value == FbTk::Container::LEFT)
return string("Left");
if (m_value == FbTk::Container::RIGHT)
return string("Right");
return string("Relative");
} | false | false | false | false | false | 0 |
price (GDate *settlement, GDate *maturity, gnm_float rate, gnm_float yield,
gnm_float redemption, GoCouponConvention const *conv)
{
gnm_float a, d, e, sum, den, basem1, exponent, first_term, last_term;
int n;
a = go_coupdaybs (settlement, maturity, conv);
d = go_coupdaysnc (settlement, maturity, conv)... | false | false | false | false | false | 0 |
cmd_update_ref(int argc, const char **argv, const char *prefix)
{
const char *refname, *oldval, *msg=NULL;
unsigned char sha1[20], oldsha1[20];
int delete = 0, no_deref = 0;
struct option options[] = {
OPT_STRING( 'm', NULL, &msg, "reason", "reason of the update"),
OPT_BOOLEAN('d', NULL, &delete, "deletes the r... | false | false | false | false | false | 0 |
dmacontroller_cleanup(struct b43legacy_dmaring *ring)
{
if (ring->tx) {
b43legacy_dmacontroller_tx_reset(ring->dev, ring->mmio_base,
ring->type);
b43legacy_dma_write(ring, B43legacy_DMA32_TXRING, 0);
} else {
b43legacy_dmacontroller_rx_reset(ring->dev, ring->mmio_base,
ring->type);
b43legacy_dma... | false | false | false | false | false | 0 |
cancelJob(const GMJob& job) {
if (generator_state != DataStaging::RUNNING) {
logger.msg(Arc::WARNING, "DTRGenerator is not running!");
}
event_lock.lock();
jobs_cancelled.push_back(job.get_id());
event_lock.unlock();
} | false | false | false | false | false | 0 |
Java_org_eclipse_cdt_utils_spawner_Spawner_exec2
(JNIEnv *env, jobject jobj, jobjectArray jcmd, jobjectArray jenv, jstring jdir, jintArray jchannels,
jstring jslaveName, jint masterFD, jboolean console)
{
jint *channels = (*env)->GetIntArrayElements(env, jchannels, 0);
const char *dirpath = (*env)->Ge... | false | false | false | false | false | 0 |
process_photolist_result (const gchar *xml_result, gpointer user_data)
{
GFlickrData *data = (GFlickrData *) user_data;
GList *photolist = NULL;
xmlDocPtr doc;
xmlNodePtr node;
doc = xmlReadMemory (xml_result, xmlStrlen ((xmlChar*) xml_result), NULL,
NULL, XML_PARSE_RECOVER | XML_PARSE... | false | false | false | false | false | 0 |
notifylist_away(IRC_SERVER_REC *server, const char *nick,
const char *username, const char *host,
const char *realname, const char *awaymsg)
{
g_return_if_fail(nick != NULL);
if (awaymsg != NULL) {
printformat(server, nick, MSGLEVEL_CLIENTNOTICE,
IRCTXT_NOTIFY_AWAY, nick, username, host, realn... | false | false | false | false | false | 0 |
awt_create_loadsave_colored_window(AW_root *aw_root, AW_CL cl_csd) {
static AW_window **aw_loadsave = 0;
if (!aw_loadsave) {
// init data
aw_root->awar_string(AWT_COLOR_LOADSAVE_NAME, "", AW_ROOT_DEFAULT);
aw_loadsave = (AW_window**)GB_calloc(AWT_QUERY_ITEM_TYPES, sizeof(*aw_loadsave)); ... | false | false | false | false | false | 0 |
gmallocn3(int a, int b, int c, bool checkoverflow) {
int n = a * b;
if (b <= 0 || a < 0 || a >= INT_MAX / b) {
fprintf(stderr, "Bogus memory allocation size\n");
if (checkoverflow) return NULL;
else exit(1);
}
return gmallocn(n, c, checkoverflow);
} | false | false | false | false | false | 0 |
count_objects(DIR *d, char *path, int len, int verbose,
unsigned long *loose,
off_t *loose_size,
unsigned long *packed_loose,
unsigned long *garbage)
{
struct dirent *ent;
while ((ent = readdir(d)) != NULL) {
char hex[41];
unsigned char sha1[20];
const char *cp;
int bad = 0;
if (is_dot_... | true | true | false | false | false | 1 |
n_update_playlists(xmmsv_t *val, void *pt)
{
GMedialib *gml = (GMedialib *)pt;
struct pl_params *p;
char const *xerr;
if (xmmsv_get_error(val, &xerr)) {
gml_set_statusbar_text(gml, (gchar *) xerr);
} else {
xmmsv_list_iter_t *it;
if (gml->playlists.ls != NULL)
gtk_list_store_clear(gml->playl... | false | false | false | false | false | 0 |
set_plotfit_line (char *title, char *formula,
FitType f, const double *b,
double x0, double pd)
{
char xc = (na(x0)) ? 'X' : 't';
/* first compose the key string for the fitted line */
if (f == PLOT_FIT_OLS) {
sprintf(title, "Y = %#.3g %c %#.3g%c", b[0],
(b[1] > 0)? '+' : '-', fabs(b... | true | true | false | false | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.