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 |
|---|---|---|---|---|---|---|
enter_mark_origin(object *p) {
if (mark_origin_max >= MARK_ORIGIN_MAX)
error("too many mark origins");
mark_origin[mark_origin_max++] = p;
} | false | false | false | false | false | 0 |
init(KAction *q_ptr)
{
q = q_ptr;
globalShortcutEnabled = false;
neverSetGlobalShortcut = true;
QObject::connect(q, SIGNAL(triggered(bool)), q, SLOT(slotTriggered()));
q->setProperty("isShortcutConfigurable", true);
} | false | false | false | false | false | 0 |
ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) {
struct pvt *pvt = (struct pvt *)this->private;
struct hostent *ho = &pvt->host;
char *body = NULL;
size_t bodylen;
int code;
char **p;
char paddr[MAXPADDRSIZE];
char text[256];
if (ho->h_name != NULL &&
af == ho->h_addrtype &&
len =... | false | false | false | false | false | 0 |
print_table (void)
{
size_t row;
for (row = 0; row < nrows; row++)
{
size_t col;
for (col = 0; col < ncolumns; col++)
{
char *cell = table[row][col];
/* Note the SOURCE_FIELD used to be displayed on it's own line
if (!posix_format && mbswidth (cell) > 20), ... | false | false | false | false | false | 0 |
L18()
{register object *base=vs_base;
register object *sup=base+VM18; VC18
vs_check;
{object V87;
object V88;
object V89;
object V90;
object V91;
object V92;
V87=(base[0]);
V88=(base[1]);
V89=(base[2]);
V90=(base[3]);
V91=(base[4]);
V92=(base[5]);
vs_top=sup;
goto TTL;
TTL:;
{object V93;
V93= ((V92))-... | false | false | false | false | false | 0 |
upoly_update_den(__isl_keep struct isl_upoly *up, isl_int *d)
{
int i;
struct isl_upoly_rec *rec;
if (isl_upoly_is_cst(up)) {
struct isl_upoly_cst *cst;
cst = isl_upoly_as_cst(up);
if (!cst)
return;
isl_int_lcm(*d, *d, cst->d);
return;
}
rec = isl_upoly_as_rec(up);
if (!rec)
return;
for (i = 0;... | false | false | false | false | false | 0 |
execute ()
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug () << "kpMacroCommand::execute()";
#endif
viewManager()->setQueueUpdates();
for (QLinkedList <kpCommand *>::const_iterator it = m_commandList.begin ();
it != m_commandList.end ();
++it)
{
#if DEBUG_KP_COMMAND_HISTORY
kDebug... | false | false | false | false | false | 0 |
cfnewspaper_globalEventListener(int *type, ...) {
va_list args;
int rv = 0;
int event_code;
va_start(args, type);
event_code = va_arg(args, int);
switch (event_code) {
}
va_end(args);
return rv;
} | false | false | false | false | false | 0 |
summary_string(char* buf, int len) {
char buf2[1024];
strcpy(buf, "");
if (nvidia.count) {
int mem = (int)(nvidia.prop.totalGlobalMem/MEGA);
snprintf(buf2, sizeof(buf2),
"[CUDA|%s|%d|%dMB|%d|%d]",
nvidia.prop.name, nvidia.count,
mem, nvidia.display_driver... | false | false | false | false | false | 0 |
drawDropVisualizer(QPainter *p, Q3ListViewItem *parent,
Q3ListViewItem *after)
{
QRect insertmarker;
if (!after && !parent)
insertmarker = QRect (0, 0, viewport()->width(), d->mDropVisualizerWidth/2);
else
{
int level = 0;
if (after)
{... | false | false | false | false | false | 0 |
set_locale_flag(gchar *locale)
{
if(locale == NULL)
return;
if(locale[0] == '\0') {
/* Set the flag to the default user's locale */
locale = gc_locale_get_user_default();
g_message("gc_locale_get_user_default = %s\n", locale);
}
/* Check wether or not the locale is available */
#ifdef WIN32
... | false | false | false | false | false | 0 |
init_string(const std::string &str)
{
std::vector<unicode_char> uc;
mail::iconvert::convert(str, unicode_default_chset(), uc);
init_unicode(uc.begin(), uc.end());
} | false | false | false | false | false | 0 |
bc_get_next_local(JVM_METHOD *meth, JVM_DATA_TYPE vtype)
{
if(!meth) {
BAD_ARG();
return -1;
}
if((vtype == jvm_Double) || (vtype == jvm_Long))
meth->cur_local_number+=2;
else
meth->cur_local_number++;
if(meth->cur_local_number > meth->max_locals)
meth->max_locals = meth->cur_local_numbe... | false | false | false | false | false | 0 |
init(void *item, void *link, int tsize, int nr_pages)
{
int pwr;
int pagesize;
int buffer_size;
memset(this, 0, sizeof(htable));
if (tsize < 31) {
tsize = 31;
}
tsize >>= 2;
for (pwr=0; tsize; pwr++) {
tsize >>= 1;
}
loffset = (char *)link - (char *)item;
mask = ~((~0) << p... | false | false | false | false | false | 0 |
pvalIfTimeSetCondition( pval *p, char *hour_range, char *dow_range, char *dom_range, char *mon_range ) /* time range format: 24-hour format begin-end|dow range|dom range|month range */
{
pval *hr = pvalCreateNode(PV_WORD);
pval *dow = pvalCreateNode(PV_WORD);
pval *dom = pvalCreateNode(PV_WORD);
pval *mon = pvalCr... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__com__Container_RemoveAll(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__com__IteratorPointer * i, * next;
for(i = ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *))this->_vTbl[__e... | false | false | false | false | false | 0 |
EndRadioButtonGroup()
{
if( mShuttleMode == eIsGettingFromDialog )
DoDataShuttle( mSettingName, mRadioValue );
mRadioValue.Init();// Clear it out...
mSettingName = wxT("");
mRadioCount = -1; // So we detect a problem.
} | false | false | false | false | false | 0 |
eb_initialize_library(void)
{
EB_Error_Code error_code;
eb_initialize_log();
LOG(("in: eb_initialize_library()"));
LOG(("aux: EB Library version %s", EB_VERSION_STRING));
eb_initialize_default_hookset();
#ifdef ENABLE_NLS
bindtextdomain(EB_TEXT_DOMAIN_NAME, EB_LOCALEDIR);
#endif
#ifdef ENABLE... | false | false | false | false | false | 0 |
cx2341x_ctrl_get_menu(const struct cx2341x_mpeg_params *p, u32 id)
{
static const char * const mpeg_stream_type_without_ts[] = {
"MPEG-2 Program Stream",
"",
"MPEG-1 System Stream",
"MPEG-2 DVD-compatible Stream",
"MPEG-1 VCD-compatible Stream",
"MPEG-2 SVCD-compatible Stream",
NULL
};
static const ch... | false | false | false | false | false | 0 |
gst_rnd_buffer_size_change_state (GstElement * element,
GstStateChange transition)
{
GstRndBufferSize *self = GST_RND_BUFFER_SIZE (element);
GstStateChangeReturn ret;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
self->offset = 0;... | false | false | false | false | false | 0 |
ebml_free(EbmlSyntax *syntax, void *data)
{
int i, j;
for (i=0; syntax[i].id; i++) {
void *data_off = (char *)data + syntax[i].data_offset;
switch (syntax[i].type) {
case EBML_STR:
case EBML_UTF8: av_freep(data_off); break;
case EBML_BIN: av_freep(... | false | false | false | false | false | 0 |
draw_view_line(struct view *view, unsigned int lineno)
{
struct line *line;
bool selected = (view->offset + lineno == view->lineno);
assert(view_is_displayed(view));
if (view->offset + lineno >= view->lines)
return FALSE;
line = &view->line[view->offset + lineno];
wmove(view->win, lineno, 0);
if (line->cle... | false | false | false | false | false | 0 |
read_cdata(const char *terminal, string *value_return)
{
string &s(*value_return);
int c;
int state = 0;
for (;;) {
c = get_char();
if (c == EOF) return false;
if (toupper(c) == terminal[state]) {
state++;
if (terminal[state] == '\0') {
// s.erase(s.length() - state);
// caused co... | false | false | false | false | false | 0 |
ini_config_get_stat(struct ini_cfgfile *file_ctx)
{
const struct stat *ret;
TRACE_FLOW_ENTRY();
if (file_ctx->stats_read) ret = &(file_ctx->file_stats);
else ret = NULL;
TRACE_FLOW_EXIT();
return ret;
} | false | false | false | false | false | 0 |
ins_compl_pum_key(c)
int c;
{
return pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP
|| c == K_PAGEDOWN || c == K_KPAGEDOWN || c == K_S_DOWN
|| c == K_UP || c == K_DOWN);
} | false | false | false | false | false | 0 |
get(const Jid &j, const QString &cid)
{
d->jid = j;
d->cid = cid;
d->data = client()->bobManager()->bobData(cid);
if (d->data.isNull()) {
d->iq = createIQ(doc(), "get", d->jid.full(), id());
QDomElement data = doc()->createElement("data");
data.setAttribute("xmlns", "urn:xmpp:bob");
data.setAttribute("cid"... | false | false | false | false | false | 0 |
_base_display_reply_info(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
u32 reply)
{
MPI2DefaultReply_t *mpi_reply;
u16 ioc_status;
u32 loginfo = 0;
mpi_reply = mpt3sas_base_get_reply_virt_addr(ioc, reply);
if (unlikely(!mpi_reply)) {
pr_err(MPT3SAS_FMT "mpi_reply not valid at %s:%d/%s()!\n",
ioc-... | false | false | false | false | false | 0 |
ReadExtraOverride(string const &File,bool const &/*Source*/)
{
if (File.empty() == true)
return true;
FILE *F = fopen(File.c_str(),"r");
if (F == 0)
return _error->Errno("fopen",_("Unable to open %s"),File.c_str());
char Line[1000];
unsigned long long Counter = 0;
while (fgets(Line,... | false | false | false | false | false | 0 |
sharedobject_getRemote(const fn_call& /*fn*/)
{
LOG_ONCE(log_unimpl(_("SharedObject.getRemote()")));
return as_value();
} | false | false | false | false | false | 0 |
getAsString() const {
std::string Result = "[";
for (unsigned i = 0, e = Values.size(); i != e; ++i) {
if (i) Result += ", ";
Result += Values[i]->getAsString();
}
return Result + "]";
} | false | false | false | false | false | 0 |
pilFitsHdrCount(PilFitsFile *fitsFile)
{
int status = 0;
int nHdu = 0;
if (fitsFile)
if (!ffthdu(fitsFile->fptr, &nHdu, &status))
return nHdu;
return 0;
} | false | false | false | false | false | 0 |
refine_to_equitable()
{
/* Start refinement from all cells -> push 'em all in the splitting queue */
for(Partition::Cell* cell = p.first_cell; cell; cell = cell->next)
p.splitting_queue_add(cell);
do_refine_to_equitable();
} | false | false | false | false | false | 0 |
gdb_cmd_reg_get(struct kgdb_state *ks)
{
unsigned long regnum;
char *ptr = &remcom_in_buffer[1];
kgdb_hex2long(&ptr, ®num);
if (regnum >= DBG_MAX_REG_NUM) {
error_packet(remcom_out_buffer, -EINVAL);
return;
}
gdb_get_regs_helper(ks);
gdb_hex_reg_helper(regnum, remcom_out_buffer);
} | false | false | false | false | false | 0 |
scrolled(void)
{
GET_SENDER();
//qDebug("scrolled: %d %d", WIDGET->horizontalScrollBar()->value(), WIDGET->verticalScrollBar()->value());
if (WIDGET->_noscroll)
{
//qDebug("no scroll!");
if (WIDGET->_scrollx != WIDGET->horizontalScrollBar()->value())
WIDGET->horizontalScrollBar()->setValue(WIDGET->_scrol... | false | false | false | false | false | 0 |
connect(const std::string& host, int port)throw(IOException)
{
_host = host;
_port = port;
connect();
} | false | false | false | false | false | 0 |
sp_get( int num)
{
int t = 1;
int j;
for (j = 1; j < MAX_SEQUENCES; j++)
{
check_frame_status(j, 1);
if (seq[j].frame[1] != 0)
{
if (t == num)
{
return(j);
}
t++;
}
}
return(0);
} | false | false | false | false | false | 0 |
ttfdumpf1_6bchar(FILE *bdat, BDFChar *bc,BDFFont *bdf) {
/* format 1 character dump. small metrics, byte aligned data */
int32 pos = ftell(bdat);
int r,c,val;
if ( bdf->sf->hasvmetrics )
ttfdumpbigmetrics(bdat,bc);
else
ttfdumpsmallmetrics(bdat,bc);
/* dump image */
for ( r=0; r<=bc->yma... | false | false | false | false | false | 0 |
gnutls_x509_crq_get_attribute_info (gnutls_x509_crq_t crq, int indx,
void *oid, size_t * sizeof_oid)
{
int result;
char name[ASN1_MAX_NAME_SIZE];
int len;
if (!crq)
{
gnutls_assert ();
return GNUTLS_E_INVALID_REQUEST;
}
snprintf (name, sizeof (name),
... | true | true | false | false | false | 1 |
bytes_to_read(struct bufferevent_openssl *bev)
{
struct evbuffer *input = bev->bev.bev.input;
struct event_watermark *wm = &bev->bev.bev.wm_read;
int result = READ_DEFAULT;
ev_ssize_t limit;
/* XXX 99% of this is generic code that nearly all bufferevents will
* want. */
if (bev->write_blocked_on_read) {
retu... | false | false | false | false | false | 0 |
split(PVector & tagged) {
PVector newtag;
Energy2 Q02 = 0.99*sqr(getParticleData(ParticleID::g)->constituentMass());
// Loop over all of the particles in the event.
for(PVector::const_iterator pit = tagged.begin(); pit!=tagged.end(); ++pit) {
// only considering gluons so add other particles to list of part... | false | false | false | false | false | 0 |
qla83xx_idc_unlock(scsi_qla_host_t *base_vha, uint16_t requester_id)
{
#if 0
uint16_t options = (requester_id << 15) | BIT_7;
#endif
uint16_t retry;
uint32_t data;
struct qla_hw_data *ha = base_vha->hw;
/* IDC-unlock implementation using driver-unlock/lock-id
* remote registers
*/
retry = 0;
retry_unlock:
i... | false | false | false | false | false | 0 |
abiword_storage_add_statement( librdf_storage* storage,
librdf_statement* statement )
{
if( abiword_storage_contains_statement( storage, statement ))
return 0;
return abiword_storage_context_add_statement(storage, NULL, statement);
} | false | false | false | false | false | 0 |
find_session_config (Seat *seat, const gchar *sessions_dir, const gchar *session_name)
{
gchar **dirs;
SessionConfig *session_config = NULL;
int i;
GError *error = NULL;
g_return_val_if_fail (sessions_dir != NULL, NULL);
g_return_val_if_fail (session_name != NULL, NULL);
dirs = g_strsplit ... | false | false | false | false | false | 0 |
onCmdInsertString(FXObject*,FXSelector,void* ptr){
if(isEditable()){
FXchar* string=(FXchar*)ptr;
FXint len=strlen(string);
FXint reppos=cursorpos;
FXint replen=0;
if(isPosSelected(cursorpos)){
reppos=selstartpos;
replen=selendpos-selstartpos;
}
replaceText(reppos,replen,stri... | false | false | false | false | false | 0 |
agent_send_unlocked(Agent *agent, int fd, int sockfd)
{
struct { reaction_t reaction; activity_t activity; } buf;
ssize_t id;
/* Check the arguments */
if (!agent || fd < 0 || sockfd < 0)
return set_errno(EINVAL);
/* Check agent */
if (!agent->ids || !agent->reactions || !agent->tempo || !agent->activity ||... | false | false | false | false | false | 0 |
put(std::ostream& os) const
{
bool notFirst = false;
for (LinearListType::const_iterator i = __linearList.begin();
i != __linearList.end(); ++i) {
if (notFirst) {
os << '*';
} else {
notFirst = true;
}
os << (*(*i));
}
for (FunctionListType::const_iterator i = __functionList.... | false | false | false | false | false | 0 |
PQgetResult(PGconn *conn)
{
PGresult *res;
if (!conn)
return NULL;
/* Parse any available data, if our state permits. */
parseInput(conn);
/* If not ready to return something, block until we are. */
while (conn->asyncStatus == PGASYNC_BUSY)
{
int flushResult;
/*
* If data remains unsent, send it... | false | false | false | false | false | 0 |
registerCleanup(CrashRecoveryContextCleanup *cleanup)
{
if (!cleanup)
return;
if (head)
head->prev = cleanup;
cleanup->next = head;
head = cleanup;
} | false | false | false | false | false | 0 |
_sasl_canon_user_lookup (sasl_conn_t *conn,
const char *user,
unsigned ulen,
unsigned flags,
sasl_out_params_t *oparams)
{
int result;
result = _sasl_canon_user (conn,
user,
ulen,
flags,
oparams);
if (result == SASL_OK) {
result = _sa... | false | false | false | false | false | 0 |
hdgsp_write_to_shiftreg(UINT32 address, UINT16 *shiftreg)
{
/* access to the 1bpp/2bpp area */
if (address >= 0x02000000 && address <= 0x020fffff)
{
address -= 0x02000000;
address >>= hdgsp_multisync;
address &= vram_mask;
address &= ~((512*8 >> hdgsp_multisync) - 1);
gsp_shiftreg_source = &hdgsp_... | false | false | false | false | false | 0 |
slot_open_browser()
{
if( m_path_selected.empty() ) return;
std::string url = path2url( m_path_selected );
CORE::core_set_command( "open_url_browser", url );
} | false | false | false | false | false | 0 |
print_vblock (ostream &o, string blockname, const vector<GeasBlock> &blocks)
{
o << blockname << ":\n";
for (uint i = 0; i < blocks.size(); i ++)
o << " " << blocks[i] << "\n";
o << "\n";
} | false | false | false | false | false | 0 |
GetValue(const std::string& rKey, bool& rVal)
{
std::string s;
if (GetValue(rKey, s)) {
size_t len = (size_t) s.length();
for (size_t i = 0; i < len; i++) {
s[i] = (char) tolower(s[i]);
}
rVal = (s == "1" || s == "true" || s == "yes" || s == "on" || s == "enable" || s == "enabled");
r... | false | false | false | false | false | 0 |
get_specialists(const struct player *pplayer)
{
int count = 0;
specialist_type_iterate(sp) {
count += pplayer->score.specialists[sp];
} specialist_type_iterate_end;
return count;
} | false | false | false | false | false | 0 |
minivm_record_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *tmp;
struct leave_vm_options leave_options;
int argc;
char *argv[2];
struct ast_flags flags = { 0 };
char *opts[OPT_ARG_ARRAY_SIZE];
memset(&leave_options, 0, sizeof(leave_options));
/* Answer channel if it's not already answ... | true | true | false | false | false | 1 |
archive_write_set_format_zip(struct archive *_a)
{
struct archive_write *a = (struct archive_write *)_a;
struct zip *zip;
archive_check_magic(_a, ARCHIVE_WRITE_MAGIC,
ARCHIVE_STATE_NEW, "archive_write_set_format_zip");
/* If another format was already registered, unregister it. */
if (a->format_free != NULL... | false | false | false | false | false | 0 |
team_fix_features(struct net_device *dev,
netdev_features_t features)
{
struct team_port *port;
struct team *team = netdev_priv(dev);
netdev_features_t mask;
mask = features;
features &= ~NETIF_F_ONE_FOR_ALL;
features |= NETIF_F_ALL_FOR_ALL;
rcu_read_lock();
list_for_each_entry_rcu(port, &team->port_l... | false | false | false | false | false | 0 |
cw1200_add_interface(struct ieee80211_hw *dev,
struct ieee80211_vif *vif)
{
int ret;
struct cw1200_common *priv = dev->priv;
/* __le32 auto_calibration_mode = __cpu_to_le32(1); */
vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER |
IEEE80211_VIF_SUPPORTS_UAPSD |
IEEE80211_VIF_SUPPORTS_CQM_RSSI;
... | false | true | false | false | false | 1 |
fun_toStringHelper(JSContext *cx, uint32 indent, uintN argc, jsval *vp)
{
jsval fval;
JSObject *obj;
JSFunction *fun;
JSString *str;
fval = JS_THIS(cx, vp);
if (JSVAL_IS_NULL(fval))
return JS_FALSE;
if (!VALUE_IS_FUNCTION(cx, fval)) {
/*
* If we don't have a functi... | false | false | false | false | false | 0 |
service_down(struct connman_ipconfig *ipconfig)
{
DBG("%s down", __connman_ipconfig_get_ifname(ipconfig));
} | false | false | false | false | false | 0 |
AddEmptyNotice(wxSizer *sizer)
{
wxFont font = GetFont();
font.SetStyle( wxFONTSTYLE_ITALIC );
wxStaticText *text = new wxStaticText(this, wxID_ANY,
_W("No XML map found."),
wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTRE | wxST_NO_AUTORESIZE);
text->SetFont(font);
sizer->Add( text, 0, wxEXPAND, 0);
} | false | false | false | false | false | 0 |
to_jint_value(union jvalue *value, enum vm_type vm_type)
{
switch (vm_type) {
case J_BYTE:
return value->b;
case J_CHAR:
return value->c;
case J_SHORT:
return value->s;
case J_INT:
return value->i;
case J_LONG:
case J_BOOLEAN:
case J_DOUBLE:
case J_FLOAT:
case J_REFERENCE: {
signal_new_exception(vm_... | false | false | false | false | false | 0 |
csv_header_destroy(csv_header_t* csv_header)
{
if (csv_header) {
if (csv_header->name) {
free(csv_header->name);
csv_header->name = NULL;
}
if (csv_header->description) {
free(csv_header->description);
csv_header->description = NULL;
}
... | false | false | false | false | false | 0 |
handleChangedProperties(GLEGlobalSource* source, GLEPropertyStore* props) {
// FIXME: inconsistency pcode first line = 1, source file first line = 0
vector<GLEProperty*> changed;
GLEPropertyStoreModel* model = props->getModel();
for (int i = 0; i < model->getNumberOfProperties(); i++) {
GLEProperty* prop = model-... | false | false | false | false | false | 0 |
prepare_page (StfDialogData *data)
{
switch (gtk_notebook_get_current_page (data->notebook)) {
case DPG_MAIN: stf_dialog_main_page_prepare (data); break;
case DPG_CSV: stf_dialog_csv_page_prepare (data); break;
case DPG_FIXED: stf_dialog_fixed_page_prepare (data); break;
case DPG_FORMAT: stf_dialog_format_pa... | false | false | false | false | false | 0 |
closest(struct strmap *n, const char *member)
{
size_t len = strlen(member);
const u8 *bytes = (const u8 *)member;
/* Anything with NULL value is a node. */
while (!n->v) {
u8 direction = 0;
if (n->u.n->byte_num < len) {
u8 c = bytes[n->u.n->byte_num];
direction = (c >> n->u.n->bit_num) & 1;
}
n = &... | false | false | false | false | false | 0 |
ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header)
{
int sample_rate, frame_size, mpeg25, padding;
int sample_rate_index, bitrate_index;
if (header & (1<<20)) {
s->lsf = (header & (1<<19)) ? 0 : 1;
mpeg25 = 0;
} else {
s->lsf = 1;
mpeg25 = 1;
}
s->la... | false | false | false | false | false | 0 |
action_current(action * a)
{
gint ret;
gpointer stat_data;
if (current_image == NULL || current_image->node == NULL)
return FALSE;
stat_data = stat_loaded_files(FALSE);
ret = action_on_filename(a, current_image->node->data);
process_system_retval(a, ret);
reload_changed_files(sta... | false | false | false | false | false | 0 |
check_can_nocow(struct inode *inode, loff_t pos,
size_t *write_bytes)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ordered_extent *ordered;
u64 lockstart, lockend;
u64 num_bytes;
int ret;
ret = btrfs_start_write_no_snapshoting(root);
if (!ret)
return -ENOSPC;
lockstart = round_down... | false | false | false | false | false | 0 |
init(Bounds *n, Bounds *clientarea, const char *title, const char *starturl)
{
ht_dialog::init(n, title, FS_KILLER | FS_TITLE | FS_MOVE | FS_RESIZE);
Bounds b = *clientarea, c;
/* name (input) */
c = b;
c.x = 1;
c.y = 1;
c.w -= 2;
c.h = 1;
List *hist = (List*)getAtomValue(HISTATOM_FILE);
name_input = new ... | false | false | false | false | false | 0 |
split(std::string in, char delimiter)
{
StringVector out;
size_t lastPos = 0;
size_t pos = in.find_first_of(delimiter);
while(pos != std::string::npos)
{
out.push_back(in.substr(lastPos, pos - lastPos));
lastPos = pos + 1;
pos = in.find_first_of(delimiter, lastPos);
}
... | false | false | false | false | false | 0 |
hash_for_each (hash_t h, hash_arg_f arg_f, void *arg)
{
int i;
struct hash_node *p;
int n = 0;
if (!h || !arg_f) {
errno = EINVAL;
return (-1);
}
lsd_mutex_lock (&h->mutex);
assert (h->magic == HASH_MAGIC);
for (i = 0; i < h->size; i++) {
for (p = h->table[i]; p ... | false | false | false | false | false | 0 |
dblayer_copy_dirand_contents(char* src_dir, char* dst_dir, int mode, Slapi_Task *task)
{
int return_value = 0;
int tmp_rval;
char filename1[MAXPATHLEN];
char filename2[MAXPATHLEN];
PRDir *dirhandle = NULL;
PRDirEntry *direntry = NULL;
PRFileInfo64 info;
dirhandle = PR_OpenDir(src_dir);
if (NULL != d... | true | true | false | false | false | 1 |
MOVSW32_XwYw(bxInstruction_c *i)
{
Bit16u temp16;
Bit32u esi = ESI;
Bit32u edi = EDI;
temp16 = read_virtual_word(i->seg(), esi);
write_virtual_word(BX_SEG_REG_ES, edi, temp16);
if (BX_CPU_THIS_PTR get_DF()) {
esi -= 2;
edi -= 2;
}
else {
esi += 2;
edi += 2;
}
// zero extension of... | false | false | false | false | false | 0 |
handle_sig_alarm(SIGNAL_ARGS)
{
int save_errno = errno;
if (deadlock_timeout_active)
{
deadlock_timeout_active = false;
CheckDeadLock();
}
if (statement_timeout_active)
(void) CheckStatementTimeout();
errno = save_errno;
} | false | false | false | false | false | 0 |
wl1271_acx_set_inconnection_sta(struct wl1271 *wl,
struct wl12xx_vif *wlvif, u8 *addr)
{
struct wl1271_acx_inconnection_sta *acx = NULL;
int ret;
wl1271_debug(DEBUG_ACX, "acx set inconnaction sta %pM", addr);
acx = kzalloc(sizeof(*acx), GFP_KERNEL);
if (!acx)
return -ENOMEM;
memcpy(acx->addr, addr, E... | false | false | false | false | false | 0 |
brw_texture_offset(struct gl_context *ctx, ir_constant *offset)
{
/* If the driver does not support GL_ARB_gpu_shader5, the offset
* must be constant.
*/
assert(offset != NULL || ctx->Extensions.ARB_gpu_shader5);
if (!offset) return 0; /* nonconstant offset; caller will handle it. */
signed char ... | false | false | false | false | true | 1 |
name_matches (Name &name,
MatchTemplateArgList *name_template_args) {
if (_name_template_args) {
if (!name_template_args ||
!_name_template_args->matches (*name_template_args))
return false;
}
return _name.matches (name.str ());
} | false | false | false | false | false | 0 |
MutableRepeatedMessage(
Message* message, const FieldDescriptor* field, int index) const {
USAGE_CHECK_ALL(MutableRepeatedMessage, REPEATED, MESSAGE);
if (field->is_extension()) {
return static_cast<Message*>(
MutableExtensionSet(message)->MutableRepeatedMessage(
field->number(), index));... | false | false | false | false | false | 0 |
lpfc_bsg_mbox_cmd(struct fc_bsg_job *job)
{
struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata;
struct lpfc_hba *phba = vport->phba;
struct dfc_mbox_req *mbox_req;
int rc = 0;
/* mix-and-match backward compatibility */
job->reply->reply_payload_rcv_len = 0;
if (job->request_len <
sizeof(s... | false | false | false | false | false | 0 |
xhci_check_usb2_port_capability(struct xhci_hcd *xhci, int port,
unsigned capability)
{
u32 port_offset, port_count;
int i;
for (i = 0; i < xhci->num_ext_caps; i++) {
if (xhci->ext_caps[i] & capability) {
/* port offsets starts at 1 */
port_offset = XHCI_EXT_PORT_OFF(xhci->ext_caps[i]) - 1;
port_... | false | false | false | false | false | 0 |
output_quoted_string(char *str, void (*cb)(const char *,void *),
void *data)
{
char ch;
char buf[2];
cb("\"", data);
if (!str) {
cb("\"", data);
return;
}
buf[1] = 0;
while ((ch = *str++)) {
switch (ch) {
case '\\':
... | true | true | false | false | false | 1 |
statemachine_set_state(statemachine_ctx *ctx, int state)
{
statemachine_definition *def;
assert(ctx != NULL);
assert(ctx->definition != NULL);
def = ctx->definition;
assert(state < def->num_states);
ctx->next_state = state;
if (ctx->current_state != ctx->next_state) {
if (def->exit_state_events[... | false | false | false | false | false | 0 |
reconfigure() {
m_filename = FbTk::StringUtil::expandFilename(Fluxbox::instance()->getKeysFilename());
m_reloader->setMainFile(m_filename);
m_reloader->checkReload();
} | false | false | false | false | false | 0 |
stream_out_bitmap (struct lto_simple_output_block *ob,
bitmap bits, bitmap ltrans_statics,
int ltrans_statics_bitcount)
{
int count = 0;
unsigned int index;
bitmap_iterator bi;
if (bits == all_module_statics)
{
streamer_write_hwi_stream (ob->main_stream, -1);
return;
}
EXECUTE_IF... | false | false | false | false | false | 0 |
cpio_replace_env(char *new_location)
{
char expanded[PATH_MAX + 1];
char *start, *end, *var;
while ((start = strstr(new_location, "${")) &&
(end = strchr(start + 2, '}'))) {
*start = *end = 0;
var = getenv(start + 2);
snprintf(expanded, sizeof expanded, "%s%s%s",
new_location, var ? var : "", end ... | false | false | false | false | false | 0 |
get_inode2 (unsigned int nr) {
struct minix2_inode *inode;
if (!nr || nr > get_ninodes())
return NULL;
total++;
inode = Inode2 + nr;
if (!inode_count[nr]) {
if (!inode_in_use (nr)) {
get_current_name();
printf (_("Inode %d marked unused, "
"but used for file '%s'\n"),
nr, current_name);
if ... | false | false | false | false | false | 0 |
b64_ctrl(BIO *b, int cmd, long num, void *ptr)
{
BIO_B64_CTX *ctx;
long ret=1;
int i;
ctx=(BIO_B64_CTX *)b->ptr;
switch (cmd)
{
case BIO_CTRL_RESET:
ctx->cont=1;
ctx->start=1;
ctx->encode=B64_NONE;
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
break;
case BIO_CTRL_EOF: /* More to read */
if (ctx->cont ... | false | false | false | false | false | 0 |
check_too_large_jobs() {
unsigned int i, j;
double m = gstate.max_available_ram();
for (i=0; i<gstate.projects.size(); i++) {
PROJECT* p = gstate.projects[i];
bool found = false;
for (j=0; j<gstate.results.size(); j++) {
RESULT* rp = gstate.results[j];
if (rp-... | false | false | false | false | false | 0 |
autohelperowl_attackpat373(int trans, int move, int color, int action)
{
int a, b, c;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(683, trans, move);
b = AFFINE_TRANSFORM(685, trans, move);
c = AFFINE_TRANSFORM(647, trans, move);
return is_proper_eye_space(a) && play_attack_defend_n(color, 0, 3, ... | false | false | false | false | false | 0 |
rtp_source_finalize (GObject * object)
{
RTPSource *src;
GstBuffer *buffer;
src = RTP_SOURCE_CAST (object);
while ((buffer = g_queue_pop_head (src->packets)))
gst_buffer_unref (buffer);
g_queue_free (src->packets);
gst_structure_free (src->sdes);
g_free (src->bye_reason);
gst_caps_replace (&src... | false | false | false | false | false | 0 |
soap_wsrm_reply_request_acks(struct soap *soap, const char *wsa_id, const char *wsa_action)
{ DBGFUN("soap_wsrm_reply_request_acks");
if (soap_wsrm_reply_num(soap, 1))
return soap->error;
if (soap->header->wsrm__Sequence)
{ if (!soap->header->wsrm__AckRequested && !(soap->header->wsrm__AckRequested = (struct... | false | false | false | false | false | 0 |
read_iso_basic (joiner *jr, int j, int i)
{
int tcol = jr->auto_keys->keycol;
double x;
int err = 0;
x = jr->r_dset->Z[tcol][i];
if (na(x)) {
err = E_MISSDATA;
} else {
int y = (int) floor(x / 10000);
int m = (int) floor((x - 10000*y) / 100);
int d = (int) (x - 10000*y - 100*m);
long ed =... | false | false | false | false | false | 0 |
cnt_streambody(struct sess *sp, struct worker *wrk, struct req *req)
{
int i;
struct stream_ctx sctx;
uint8_t obuf[sp->wrk->res_mode & RES_GUNZIP ?
cache_param->gzip_stack_buffer : 1];
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOT... | false | false | false | true | false | 1 |
dump_update_ssa (FILE *file)
{
unsigned i = 0;
bitmap_iterator bi;
if (!need_ssa_update_p (cfun))
return;
if (new_ssa_names && sbitmap_first_set_bit (new_ssa_names) >= 0)
{
sbitmap_iterator sbi;
fprintf (file, "\nSSA replacement table\n");
fprintf (file, "N_i -> { O_1 ... O_j } mean... | false | false | false | false | false | 0 |
vfs_delete(Vfs_handle *handle, char *key)
{
int st;
handle->error_msg = NULL;
handle->error_num = 0;
log_msg((LOG_TRACE_LEVEL, "vfs_delete(%s,%s,%s)",
handle->sd->store_name, CTX(handle), key == NULL ? "NULL" : key));
st = (handle->sw->delete)(handle, key);
return(st);
} | false | false | false | false | false | 0 |
ensure_toggleref_capacity (int capacity)
{
if (!GC_toggleref_array) {
GC_toggleref_array_capacity = 32;
GC_toggleref_array = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
if (!GC_toggleref_array)
return FALSE;
}
if (GC_toggleref_array_size +... | false | true | false | false | false | 1 |
clear_ssifile(SSIFILE *sfp)
{
int i;
if (sfp->filename != NULL) {
for (i = 0; i < sfp->nfiles; i++)
if (sfp->filename[i] != NULL) free(sfp->filename[i]);
free(sfp->filename);
}
if (sfp->fileformat != NULL) free(sfp->fileformat);
if (sfp->fileflags != NULL) free(sfp->fileflags);
if (sfp-... | false | false | false | false | false | 0 |
wait(int *status)
{
pid_t ret;
ret = real_wait(status);
if (ret == -1) {
return ret;
}
reap_common(ret);
return ret;
} | false | false | false | false | false | 0 |
cl_poll_sigpoll_overflow(void)
{
int fd;
int limit;
if (!SigQOverflow) {
return;
}
cl_log(LOG_WARNING, "System signal queue overflow.");
limit = cl_poll_get_sigqlimit();
if (limit > 0) {
cl_log(LOG_WARNING, "Increase '%s'. Current limit is %d"
" (see sysctl(8)).", MAXQNAME, limit);
}
SigQOverflow = FAL... | 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.