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 |
|---|---|---|---|---|---|---|
rd_wireassign(int32 qcattyp)
{
struct st_t *stp;
struct expr_t *lhsndp, *rhsndp;
/* allocate at top (wastes storage on error) to get line no. right */
stp = __alloc_stmt(S_QCONTA);
/* collect lhs to = */
__get_vtok();
if (!__col_lval())
{
bad_qassgn:
__vskipto_any(SEMI);
return(NULL);
}
__bld_xtree(0... | false | false | false | false | false | 0 |
tech_common_render()
{
char buf[256];
int y, z, font_height;
// render description in its box
gr_set_color_fast(&Color_text_normal);
techroom_render_desc(Tech_desc_coords[gr_screen.res][SHIP_X_COORD], Tech_desc_coords[gr_screen.res][SHIP_Y_COORD], Tech_desc_coords[gr_screen.res][SHIP_H_COORD]);
font_height = gr... | false | false | false | false | false | 0 |
BuildIncrement(bool returns_original_input,
CountOperation* expr) {
// The input to the count operation is on top of the expression stack.
TypeInfo info = oracle()->IncrementType(expr);
Representation rep = ToRepresentation(info);
if (rep.IsTagged()) {
rep = Repre... | false | false | false | false | false | 0 |
mv_u3d_process_ep_req(struct mv_u3d *u3d, int index,
struct mv_u3d_req *curr_req)
{
struct mv_u3d_trb *curr_trb;
dma_addr_t cur_deq_lo;
struct mv_u3d_ep_context *curr_ep_context;
int trb_complete, actual, remaining_length = 0;
int direction, ep_num;
int retval = 0;
u32 tmp, status, length;
curr_ep_context = &... | false | false | false | false | false | 0 |
json_node_from_call (RestProxyCall *call, GError** error)
{
JsonNode *root;
JsonObject *object = NULL;
char *error_message = NULL;
JsonParser *parser = NULL;
g_return_val_if_fail (call, NULL);
if (!SOUP_STATUS_IS_SUCCESSFUL (rest_proxy_call_get_status_code (call))) {
g_set_error (error, SW_SERVICE_ERR... | false | false | false | false | false | 0 |
v4lconvert_uyvy_to_yuv420(const unsigned char *src, unsigned char *dest,
int width, int height, int stride, int yvu)
{
int i, j;
const unsigned char *src1;
unsigned char *udest, *vdest;
/* copy the Y values */
src1 = src;
for (i = 0; i < height; i++) {
for (j = 0; j + 1 < width; j += 2) {
*dest++ = src1[1... | false | false | false | false | false | 0 |
FslInitHeader(FSLIO *fslio, short t,
size_t x, size_t y, size_t z, size_t v,
float vx, float vy, float vz, float tr,
size_t dim,
const char* units)
{
/* NB: This function does not set the file type or write mode*/
if (fslio==NULL) FSLIOE... | false | false | false | false | false | 0 |
setCurrentMap(const char * szName)
{
UT_uint32 kLimit = m_vecNames.getItemCount();
UT_uint32 k;
for (k=0; k<kLimit; k++)
if (g_ascii_strcasecmp(szName,reinterpret_cast<const char *>(m_vecNames.getNthItem(k))) == 0)
{
m_indexCurrentEventMap = k;
return true;
}
return false;
} | false | false | false | false | false | 0 |
orte_sensor_base_sample(int fd, short args, void *cbdata)
{
orte_sensor_active_module_t *i_module;
int i;
if (!mods_active) {
return;
}
/* see if we were ordered to stop */
if (!orte_sensor_base.active) {
return;
}
opal_output_verbose(5, orte_sensor_base_framework.... | false | false | false | false | false | 0 |
LFA_Copy ( LFA_FileRef sourceFile, LFA_FileRef destFile, XMP_Int64 length,
XMP_AbortProc abortProc /* = 0 */, void * abortArg /* = 0 */ )
{
enum { kBufferLen = 64*1024 };
XMP_Uns8 buffer [kBufferLen];
const bool checkAbort = (abortProc != 0);
while ( length > 0 ) {
if ( checkAbort && abortPro... | false | false | false | false | false | 0 |
unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func)
{
unz64_s* s;
int err;
unz_file_info64 cur_file_info_saved;
unz_file_info64_internal cur_file_info_internal_saved;
ZPOS64_T num_file_saved;
ZPOS64_T pos_in_central_dir_saved;
char current_filename[UN... | false | false | false | false | false | 0 |
interpolate_none_get_value_array (GstTimedValueControlSource * self,
GstClockTime timestamp, GstClockTime interval, guint n_values,
gdouble * values)
{
gboolean ret = FALSE;
guint i;
GstClockTime ts = timestamp;
GstClockTime next_ts = 0;
gdouble val;
GSequenceIter *iter1 = NULL, *iter2 = NULL;
g_... | false | false | false | false | false | 0 |
closeDocument()
{
int index = m_documents->currentIndex();
if (!saveDocument(index)) {
return;
}
m_documents->removeDocument(index);
m_tabs->removeTab(index);
if (m_documents->count() == 0) {
newDocument();
}
} | false | false | false | false | false | 0 |
ladish_studio_find_room_by_uuid(const uuid_t room_uuid_ptr)
{
struct list_head * node_ptr;
ladish_room_handle room;
uuid_t room_uuid;
list_for_each(node_ptr, &g_studio.rooms)
{
room = ladish_room_from_list_node(node_ptr);
ladish_room_get_uuid(room, room_uuid);
if (uuid_compare(room_uuid, room_uui... | false | false | false | false | false | 0 |
which_set_flags ()
{
char *temp;
int i, string_index;
temp = (char *)xmalloc (1 + NUM_SHELL_FLAGS + read_from_stdin + want_pending_command);
for (i = string_index = 0; shell_flags[i].name; i++)
if (*(shell_flags[i].value))
temp[string_index++] = shell_flags[i].name;
if (want_pending_command)
t... | false | false | false | false | false | 0 |
lutil_sasl_defaults(
LDAP *ld,
char *mech,
char *realm,
char *authcid,
char *passwd,
char *authzid )
{
lutilSASLdefaults *defaults;
defaults = ber_memalloc( sizeof( lutilSASLdefaults ) );
if( defaults == NULL ) return NULL;
defaults->mech = mech ? ber_strdup(mech) : NULL;
defaults->realm = realm ? ber_st... | false | false | false | false | false | 0 |
smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
{
struct smsdvb_client_t *client = (struct smsdvb_client_t *) context;
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) (((u8 *) cb->p)
+ cb->offset);
void *p = phdr + 1;
struct dvb_frontend *fe = &client->frontend;
struct dtv_frontend_properties *c... | false | false | false | false | false | 0 |
PyLong_AsUnsignedLongLong(PyObject *vv)
{
PyLongObject *v;
unsigned PY_LONG_LONG bytes;
int res;
if (vv == NULL) {
PyErr_BadInternalCall();
return (unsigned PY_LONG_LONG)-1;
}
if (!PyLong_Check(vv)) {
PyErr_SetString(PyExc_TypeError, "an integer is required");
re... | false | false | false | false | false | 0 |
properties() const
{
static Map<String, String> keyMap;
if(keyMap.isEmpty()) {
int numKeys = sizeof(keyTranslation) / sizeof(keyTranslation[0]);
for(int i = 0; i < numKeys; i++) {
keyMap[keyTranslation[i][0]] = keyTranslation[i][1];
}
}
PropertyMap props;
MP4::ItemListMap::ConstIterator it ... | false | false | false | false | false | 0 |
CMD_Break(F_CMD_ARGS)
{
int rc;
if (cond_rc == NULL)
{
return;
}
rc = GetIntegerArguments(action, &action, &cond_rc->break_levels, 1);
if (rc != 1 || cond_rc->break_levels <= 0)
{
cond_rc->break_levels = -1;
}
cond_rc->rc = COND_RC_BREAK;
return;
} | false | false | false | false | false | 0 |
get_base_constructor (tree base, HOST_WIDE_INT *bit_offset,
tree (*valueize)(tree))
{
HOST_WIDE_INT bit_offset2, size, max_size;
if (TREE_CODE (base) == MEM_REF)
{
if (!integer_zerop (TREE_OPERAND (base, 1)))
{
if (!host_integerp (TREE_OPERAND (base, 1), 0))
return NULL_TREE;
*bit_offs... | false | false | false | false | true | 1 |
main(int argc, char ** argv) {
#endif
int c;
int ind;
int daemon = 0;
int interactive = 0;
const char * log_name = NULL;
const char * url = "TCP:";
Protocol * proto = NULL;
TCFBroadcastGroup * bcg = NULL;
ini_mdep();
ini_trace();
ini_events_queue();
ini_asyncreq();
#if ... | false | false | false | false | false | 0 |
utf8_to_utf16_string(const char *in)
{
size_t n;
uint16 *out;
n = 1 + utf8_to_utf16(in, NULL, 0);
HALLOC_ARRAY(out, n);
utf8_to_utf16(in, out, n);
return out;
} | false | false | false | false | false | 0 |
SplitMBBAt(MachineBasicBlock &CurMBB,
MachineBasicBlock::iterator BBI1) {
if (!TII->isLegalToSplitMBBAt(CurMBB, BBI1))
return 0;
MachineFunction &MF = *CurMBB.getParent();
// Create the fall-through block.
MachineFunction::iterator MBBI = &CurMBB;
MachineBasic... | false | false | false | false | false | 0 |
Map_TriggerConnected(Crossfire_Map *map, PyObject *args) {
objectlink *ol = NULL;
int connected;
int state;
Crossfire_Object *cause = NULL;
oblinkpt *olp;
if (!PyArg_ParseTuple(args, "ii|O!", &connected, &state, &Crossfire_ObjectType, &cause))
return NULL;
MAPEXISTCHECK(map);
... | false | false | false | false | false | 0 |
ib_nl_set_path_rec_attrs(struct sk_buff *skb,
struct ib_sa_query *query)
{
struct ib_sa_path_rec *sa_rec = query->mad_buf->context[1];
struct ib_sa_mad *mad = query->mad_buf->mad;
ib_sa_comp_mask comp_mask = mad->sa_hdr.comp_mask;
u16 val16;
u64 val64;
struct rdma_ls_resolve_header *header;
query->mad_... | false | true | false | false | false | 1 |
bFormat( void )
{
wxString osCmd, os1;
// Set the command name
osCmd = wxT(".OP");
// Set sweep parameters
osCmd << wxT(' ') << m_osStart;
if( m_osStop != m_osStart )
{
osCmd << wxT(' ') << m_osStop;
switch( m_eScale )
{
case eSCALE_LIN : osCmd << wxT(" BY"); break;
case eSCALE... | false | false | false | false | false | 0 |
iwl_mvm_rx_bt_coex_notif(struct iwl_mvm *mvm,
struct iwl_rx_cmd_buffer *rxb)
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_bt_coex_profile_notif *notif = (void *)pkt->data;
if (!fw_has_api(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_API_BT_COEX_SPLIT)) {
iwl_mvm_rx_bt_coex_notif_old(mvm, rxb);
ret... | false | true | false | false | false | 1 |
acc_compare_handles(handle h1, handle h2)
{
int32 rv;
struct h_t *hp1, *hp2;
acc_error_flag = FALSE;
hp1 = (struct h_t *) h1;
hp2 = (struct h_t *) h2;
if (!validate_acc_handle("acc_compare_handles(first)", hp1))
return(FALSE);
if (!validate_acc_handle("acc_compare_handles(second)", hp2))
return(FALSE);... | false | false | false | false | false | 0 |
notice_resolution_seen (int res, bool lace)
{
if (res > frame_res)
frame_res = res;
if (res > 0)
can_use_lores = 0;
if (!frame_res_lace && lace)
frame_res_lace = lace;
} | false | false | false | false | false | 0 |
__copy_insn(struct address_space *mapping, struct file *filp,
void *insn, int nbytes, loff_t offset)
{
struct page *page;
/*
* Ensure that the page that has the original instruction is populated
* and in page-cache. If ->readpage == NULL it must be shmem_mapping(),
* see uprobe_register().
*/
if (mapping-... | false | false | false | false | false | 0 |
_ml_Sock_listen (ml_state_t *msp, ml_val_t arg)
{
int sock = REC_SELINT(arg, 0);
int backlog = REC_SELINT(arg, 1);
int sts;
sts = listen (sock, backlog);
CHK_RETURN_UNIT(msp, sts);
} | false | false | false | false | false | 0 |
get_bg1_tile_info(int tile_index)
{
UINT16 tilenum = gcpinbal_tilemapram[0x800 + tile_index*2];
UINT16 attr = gcpinbal_tilemapram[0x801 + tile_index*2];
SET_TILE_INFO(
1,
(tilenum & 0xfff) + 0x2000 + bg1_gfxset,
(attr & 0x1f) + 0x30,
TILE_FLIPYX( (attr & 0x300) >> 8))
} | false | false | false | false | false | 0 |
SelectFPExt(const Instruction *I) {
// Make sure we have VFP and that we're extending float to double.
if (!Subtarget->hasVFP2()) return false;
Value *V = I->getOperand(0);
if (!I->getType()->isDoubleTy() ||
!V->getType()->isFloatTy()) return false;
unsigned Op = getRegForValue(V);
if (Op == 0) retu... | false | false | false | false | false | 0 |
isSuppressed(const std::string &errorId, const std::string &file, unsigned int line)
{
if (_suppressions.find(errorId) == _suppressions.end())
return false;
// Check are all errors of this type filtered out
if (_suppressions[errorId].find("") != _suppressions[errorId].end())
return true;
... | false | false | false | false | false | 0 |
InitElementInfo (Word16 nChannels, ELEMENT_INFO* elInfo)
{
Word16 error;
error = 0;
switch(nChannels) {
case 1:
initElement(elInfo, ID_SCE);
break;
case 2:
initElement(elInfo, ID_CPE);
break;
default:
error=4;
}
return error;
} | false | false | false | false | false | 0 |
folder_summary_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
switch (property_id) {
case PROP_FOLDER:
folder_summary_set_folder (
CAMEL_FOLDER_SUMMARY (object),
CAMEL_FOLDER... | false | false | false | false | false | 0 |
tb_editor_btn_remove_clicked_cb(GtkWidget *button, TBEditorWidget *tbw)
{
GtkTreeModel *model_used;
GtkTreeSelection *selection_used;
GtkTreeIter iter_used, iter_new;
gchar *action_name;
selection_used = gtk_tree_view_get_selection(tbw->tree_used);
if (gtk_tree_selection_get_selected(selection_used, &model_used,... | false | false | false | false | false | 0 |
flush_log_output (void)
{
if (log_file)
fflush (log_file);
} | false | false | false | false | false | 0 |
formatfloat(PyObject *v, int flags, int prec, int type)
{
char *p;
PyObject *result;
double x;
x = PyFloat_AsDouble(v);
if (x == -1.0 && PyErr_Occurred()) {
PyErr_Format(PyExc_TypeError, "float argument required, "
"not %.200s", Py_TYPE(v)->tp_name);
return NULL... | false | false | false | false | false | 0 |
GeoRepresentation(int prec, bool swaplatlong) const {
prec = max(0, min(9, prec) + 5);
ostringstream os;
os << fixed << setprecision(prec);
real a = swaplatlong ? _long : _lat;
real b = swaplatlong ? _lat : _long;
if (!Math::isnan(a))
os << a;
else
os << "nan";
os << " ";
... | false | false | false | false | false | 0 |
ai_big_maybe_enter_strafe_mode(object *pl_objp, int weapon_objnum, int consider_target_only)
{
ai_info *aip;
ship_info *sip;
object *weapon_objp, *parent_objp;
aip = &Ai_info[Ships[pl_objp->instance].ai_index];
Assert(aip->mode != AIM_STRAFE); // can't happen
// if Pl_objp has no target, then we can't enter ... | false | false | false | false | false | 0 |
block_delegations(struct knfsd_fh *fh)
{
u32 hash;
struct bloom_pair *bd = &blocked_delegations;
hash = jhash(&fh->fh_base, fh->fh_size, 0);
spin_lock(&blocked_delegations_lock);
__set_bit(hash&255, bd->set[bd->new]);
__set_bit((hash>>8)&255, bd->set[bd->new]);
__set_bit((hash>>16)&255, bd->set[bd->new]);
if ... | false | false | false | false | false | 0 |
fspd_init( fsParseData *fspd )
{
fspd->list = NULL;
fspd->book = NULL;
fspd->recurrence = g_new0(Recurrence, 1);
fspd->recurrence_list = NULL;
fspd->uift = UIFREQ_NONE;
fspd->interval
= fspd->offset
= fspd->day
= fspd->occurrence
= 0;
fspd->weekend_adj = WEE... | false | false | false | false | false | 0 |
gdata_calendar_event_get_primary_time (GDataCalendarEvent *self, gint64 *start_time, gint64 *end_time, GDataGDWhen **when)
{
GDataGDWhen *primary_when;
g_return_val_if_fail (GDATA_IS_CALENDAR_EVENT (self), FALSE);
if (self->priv->times == NULL || self->priv->times->next != NULL)
return FALSE;
primary_when = GD... | false | false | false | false | false | 0 |
mxc4005_chip_init(struct mxc4005_data *data)
{
int ret;
unsigned int reg;
ret = regmap_read(data->regmap, MXC4005_REG_DEVICE_ID, ®);
if (ret < 0) {
dev_err(data->dev, "failed to read chip id\n");
return ret;
}
dev_dbg(data->dev, "MXC4005 chip id %02x\n", reg);
return 0;
} | false | false | false | false | false | 0 |
RemoveDeadSamples() {
for (int i = 0; i < kSamplerWindowSize; i++) {
Object* function = sampler_window_[i];
if (function != NULL && !HeapObject::cast(function)->IsMarked()) {
sampler_window_[i] = NULL;
}
}
} | false | false | false | false | false | 0 |
bar_pane_exif_entry_changed(GtkEntry *text_entry, gpointer data)
{
ExifEntry *ee = data;
gchar *text;
if (!ee->ped->fd) return;
text = text_widget_text_pull(ee->value_widget);
metadata_write_string(ee->ped->fd, ee->key, text);
g_free(text);
} | false | false | false | false | false | 0 |
my_output_message (j_common_ptr cinfo)
{
char buffer[JMSG_LENGTH_MAX];
/* Create the message */
(*cinfo->err->format_message) (cinfo, buffer);
CErrorLog::Log(buffer);
} | false | false | false | false | false | 0 |
vt1708_build_pcms(struct hda_codec *codec)
{
struct via_spec *spec = codec->spec;
int i, err;
err = snd_hda_gen_build_pcms(codec);
if (err < 0 || codec->core.vendor_id != 0x11061708)
return err;
/* We got noisy outputs on the right channel on VT1708 when
* 24bit samples are used. Until any workaround is fou... | false | false | false | false | false | 0 |
compileCode(machine_6502 *machine, const char *code){
BOOL codeOk;
AsmLine *asmlist;
reset(machine);
machine->defaultCodePC = machine->regPC = PROG_START;
asmlist = parseAssembly(machine, &codeOk, code);
if(codeOk){
/* First pass: Find the addresses for the labels */
if (!apply(asmlist, indexLabel... | false | false | false | false | false | 0 |
__aft_clone ( CMPIArray * array, CMPIStatus * rc )
{
CMPIStatus tmp;
struct native_array * a = (struct native_array *) array;
struct native_array * new = __new_empty_array ( a->size, a->type, &tmp );
int i = a->size;
while ( i-- && tmp.rc == CMPI_RC_OK ) {
new->data[i].state = a->data[i].state;... | false | false | false | false | false | 0 |
modeline_parser_shutdown ()
{
if (vim_languages != NULL)
g_hash_table_unref (vim_languages);
if (emacs_languages != NULL)
g_hash_table_unref (emacs_languages);
if (kate_languages != NULL)
g_hash_table_unref (kate_languages);
vim_languages = NULL;
emacs_languages = NULL;
kate_languages = NULL;
g_free (m... | false | false | false | false | false | 0 |
update_all (GVfsUDisks2VolumeMonitor *monitor,
gboolean emit_changes,
gboolean coldplug)
{
GList *added_drives, *removed_drives;
GList *added_volumes, *removed_volumes;
GList *added_mounts, *removed_mounts;
added_drives = NULL;
removed_drives = NULL;
... | false | false | false | false | false | 0 |
parse_params_element(xmlDocPtr doc, xmlNodePtr node,
XMLRPCDocument *xrdoc, List *params)
{
Octstr *name;
size_t i;
int n = 0;
/*
* check if the element is allowed at this level
* within <params> we only have one or more <param>
*/
if (node->name == N... | false | false | false | false | false | 0 |
handle_job_begin (CS *c, Msg *_m)
{
JobBeginMsg *m = dynamic_cast<JobBeginMsg *>(_m);
if ( !m )
return false;
if (jobs.find(m->job_id) == jobs.end()) {
trace() << "handle_job_begin: no valid job id " << m->job_id << endl;
return false;
}
Job *job = jobs[m->job_id];
if (job->server != c)
{
... | false | false | false | false | false | 0 |
rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
enum nl80211_channel_type ch_type)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u8 tmp_bw = rtlphy->current_chan_bw;
if (rtlphy->set_bwmode_inprogress)
return;
rtlphy->... | false | false | false | false | false | 0 |
linear_search_fdes (struct object *ob, const fde *this_fde, void *pc)
{
const struct dwarf_cie *last_cie = 0;
int encoding = ob->s.b.encoding;
_Unwind_Ptr base = base_from_object (ob->s.b.encoding, ob);
for (; ! last_fde (ob, this_fde); this_fde = next_fde (this_fde))
{
const struct dwarf_cie *this_c... | false | false | false | false | false | 0 |
eb_is_text_stopped(EB_Book *book)
{
int is_stopped = 0;
eb_lock(book);
LOG(("in: eb_is_text_stopped(book=%d)", (int)book->code));
if (book->subbook_current != NULL) {
if (book->text_context.code == EB_TEXT_HEADING
|| book->text_context.code == EB_TEXT_MAIN_TEXT
|| book->text_context.code ==... | false | false | false | false | false | 0 |
update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
{
struct mlme_priv *pmlmepriv;
struct mlme_ext_priv *pmlmeext;
if (!padapter)
return;
pmlmepriv = &(padapter->mlmepriv);
pmlmeext = &(padapter->mlmeextpriv);
if (!pmlmeext->bstart_bss)
return;
spin_lock_bh(&pmlmepriv->bcn_update_lock);
s... | false | false | false | false | false | 0 |
ps_pad(FILE *file, const struct inst *inst, int show_name)
{
enum pad_type type = layers_to_pad_type(inst->u.pad.layers);
pad_type_seen[type] = 1;
ps_filled_box(file, inst->base, inst->u.pad.other, hatch(type));
if (show_name && !inst->u.pad.hole)
ps_pad_name(file, inst);
} | false | false | false | false | false | 0 |
CornerXYSimple(float scale, float lineWidth)
{
CSetOfObjectsPtr ret = CSetOfObjects::Create();
{
CSimpleLinePtr lin = CSimpleLine::Create();
lin->setLineWidth(lineWidth);
lin->setColor(1,0,0);
lin->setLineCoords(0,0,0, scale,0,0);
ret->insert(lin);
}
{
CSimpleLinePtr lin = CSimpleLine::Create();
lin-... | false | false | false | false | false | 0 |
i_lock_unlock (iLock* lock)
{
g_return_val_if_fail(lock != NULL, FALSE);
if (lock->fd == -1)
{
return FALSE;
}
close(lock->fd);
lock->fd = -1;
g_unlink(lock->path);
return TRUE;
} | false | false | false | false | false | 0 |
ladder_enable_device(struct cpuidle_driver *drv,
struct cpuidle_device *dev)
{
int i;
struct ladder_device *ldev = &per_cpu(ladder_devices, dev->cpu);
struct ladder_device_state *lstate;
struct cpuidle_state *state;
ldev->last_state_idx = CPUIDLE_DRIVER_STATE_START;
for (i = CPUIDLE_DRIVER_STATE_START; i < ... | false | false | false | false | false | 0 |
enqueue_external_timestamp(struct timestamp_event_queue *queue,
struct ptp_clock_event *src)
{
struct ptp_extts_event *dst;
unsigned long flags;
s64 seconds;
u32 remainder;
seconds = div_u64_rem(src->timestamp, 1000000000, &remainder);
spin_lock_irqsave(&queue->lock, flags);
dst = &queue->buf[queue... | false | false | false | false | false | 0 |
xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
u16 wIndex, __le32 __iomem *addr, u32 port_status)
{
/* Don't allow the USB core to disable SuperSpeed ports. */
if (hcd->speed >= HCD_USB3) {
xhci_dbg(xhci, "Ignoring request to disable "
"SuperSpeed port.\n");
return;
}
/* Write 1 to disable... | false | false | false | false | false | 0 |
foldlevelIndent(flp)
fline_T *flp;
{
char_u *s;
buf_T *buf;
linenr_T lnum = flp->lnum + flp->off;
buf = flp->wp->w_buffer;
s = skipwhite(ml_get_buf(buf, lnum, FALSE));
/* empty line or lines starting with a character in 'foldignore': level
* depends on surrounding lines */
if (*s ... | false | false | false | false | false | 0 |
test(char *URL)
{
int res = 0;
CURL *curl[NUM_HANDLES];
int running;
CURLM *m = NULL;
int i;
char target_url[256];
int handles_added = 0;
for(i=0; i < NUM_HANDLES; i++)
curl[i] = NULL;
start_test_timing();
global_init(CURL_GLOBAL_ALL);
multi_init(m);
/* get NUM_HANDLES easy handles */
... | true | true | false | false | false | 1 |
getFoldedValue(UNewTrie *trie, UChar32 start, int32_t offset) {
uint32_t foldedValue, value;
UChar32 limit=0;
UBool inBlockZero;
foldedValue=0;
limit=start+0x400;
while(start<limit) {
value=utrie_get32(trie, start, &inBlockZero);
if(inBlockZero) {
start+=UTRIE_DATA_... | false | false | false | false | false | 0 |
XvpnPlacement( VpnPlace, X, Y )
vpnplace_list *VpnPlace;
long X;
long Y;
{
vpntrans_list *Trans;
vpnplace_list *Place;
vpnarc *ArcTrans;
vpnarc *ArcPlace;
chain_list *ScanChain1;
chain_list *ScanChain2;
if ( XVPN_COORD_OBJECT( VpnPlace ) == (xvpnobj_list *)0... | false | false | false | false | false | 0 |
se200pci_WM8766_set_volume(struct snd_ice1712 *ice, int ch,
unsigned int vol1, unsigned int vol2)
{
switch (ch) {
case 0:
se200pci_WM8766_write(ice, 0x000, vol1);
se200pci_WM8766_write(ice, 0x001, vol2 | 0x100);
break;
case 1:
se200pci_WM8766_write(ice, 0x004, vol1);
se200pci_WM8766_write(ice, 0x005, ... | false | false | false | false | false | 0 |
PasswordPrompt(const Barry::BadPassword &bp,
std::string &password_result)
{
// ping the parent and wait for finish
wxCommandEvent event(MET_PROMPT_PASSWORD, wxID_ANY);
event.SetEventObject(m_dlg);
event.SetInt(bp.remaining_tries());
m_dlg->AddPendingEvent(event);
m_dlg->WaitForEvent();
password_result = m... | false | false | false | false | false | 0 |
w_guess_lp_quant(jxr_image_t image, int ch,
unsigned tx, unsigned ty, unsigned mx, unsigned my)
{
if (image->lp_frame_uniform)
return image->lp_quant_ch[ch][0];
unsigned idx = _jxr_select_lp_index(image, tx, ty, mx, my);
struct jxr_tile_qp*cur = GET_TILE_QUANT(... | false | false | false | false | false | 0 |
AppendRScalar(struct Rlist **start,void *item, char type)
{ char *scalar = item;
if (type != CF_SCALAR)
{
FatalError("Cannot append non-scalars to lists");
}
return AppendRlist(start,scalar,type);
} | false | false | false | false | false | 0 |
dumpPassStructure(unsigned Offset) override {
dbgs().indent(Offset*2) << "ModulePass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
ModulePass *MP = getContainedPass(Index);
MP->dumpPassStructure(Offset + 1);
std::map<Pass *, FunctionPassManagerImpl *>::const_... | false | false | false | false | false | 0 |
empress_signal_update(struct work_struct *work)
{
struct saa7134_dev* dev =
container_of(work, struct saa7134_dev, empress_workqueue);
if (dev->nosignal) {
pr_debug("no video signal\n");
} else {
pr_debug("video signal acquired\n");
}
} | false | false | false | false | false | 0 |
be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain)
{
struct be_mcc_wrb *wrb;
struct be_cmd_req_set_qos *req;
int status;
spin_lock_bh(&adapter->mcc_lock);
wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}
req = embedded_payload(wrb);
be_wrb_cmd_hdr_prepare(&req->hdr, C... | false | false | false | false | false | 0 |
linebuf_append(LINEBUF_REC *rec, const char *data, int len)
{
if (rec->len+len > rec->alloc) {
rec->alloc = nearest_power(rec->len+len);;
rec->str = g_realloc(rec->str, rec->alloc);
}
memcpy(rec->str + rec->len, data, len);
rec->len += len;
} | false | true | false | false | false | 1 |
store_multi_arg(type, multi_arg, ar)
const int type;
const char **multi_arg;
void ***ar;
{ /* {{{ */
register int ptr_len, item_len;
register int size_plus, size;
register int k, ret;
switch (type) {
default:
return CFG_ERROR_INTERNAL;
break;
case CFG_INT:
ptr_len = sizeof(int *);
item_... | false | false | false | false | true | 1 |
copy_pix(struct vivid_dev *dev, int win_y, int win_x,
u16 *cap, const u16 *osd)
{
u16 out;
int left = dev->overlay_out_left;
int top = dev->overlay_out_top;
int fb_x = win_x + left;
int fb_y = win_y + top;
int i;
out = *cap;
*cap = *osd;
if (dev->bitmap_out) {
const u8 *p = dev->bitmap_out;
unsigned st... | false | false | false | false | false | 0 |
_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
{
Relation rel = scan->indexRelation;
HashScanOpaque so = (HashScanOpaque) scan->opaque;
ItemPointer current;
Buffer buf;
Page page;
HashPageOpaque opaque;
OffsetNumber maxoff;
OffsetNumber offnum;
BlockNumber blkno;
IndexTuple itup;
current ... | false | false | false | true | false | 1 |
_findMetaData(const UChar* currency, UErrorCode& ec) {
if (currency == 0 || *currency == 0) {
if (U_SUCCESS(ec)) {
ec = U_ILLEGAL_ARGUMENT_ERROR;
}
return LAST_RESORT_DATA;
}
// Get CurrencyMeta resource out of root locale file. [This may
// move out of the root lo... | false | false | false | false | false | 0 |
_e_sys_cb_logout_abort(void *data __UNUSED__, E_Dialog *dia)
{
if (_e_sys_logout_timer)
{
ecore_timer_del(_e_sys_logout_timer);
_e_sys_logout_timer = NULL;
}
_e_sys_logout_begin_time = 0.0;
e_object_del(E_OBJECT(dia));
_e_sys_logout_confirm_dialog = NULL;
_e_sys_action_current =... | false | false | false | false | false | 0 |
drm_modeset_unlock_crtc(struct drm_crtc *crtc)
{
struct drm_modeset_acquire_ctx *ctx = crtc->acquire_ctx;
if (WARN_ON(!ctx))
return;
crtc->acquire_ctx = NULL;
drm_modeset_drop_locks(ctx);
drm_modeset_acquire_fini(ctx);
kfree(ctx);
} | false | false | false | false | false | 0 |
VertexCache_reset ( const void* vertices, u32 vertexCount,
const void* indices, u32 primitiveCount,
E_VERTEX_TYPE vType,
scene::E_PRIMITIVE_TYPE pType,
E_INDEX_TYPE iType)
{
VertexCache.vertices = vertices;
VertexCache.vertexCount = vertexCount;
VertexCache.indic... | false | false | false | false | false | 0 |
set_merged (FttCell * cell)
{
GfsSolidVector * solid = GFS_STATE (cell)->solid;
if (!gfs_cell_is_small (cell))
solid->merged = NULL;
else {
FttCellNeighbors neighbor;
gdouble abest = 0.;
FttDirection i;
ftt_cell_neighbors (cell, &neighbor);
for (i = 0; i < FTT_NEIGHBORS && abest < 1.; i+... | false | false | false | false | false | 0 |
ges_base_xml_formatter_add_track (GESBaseXmlFormatter * self,
GESTrackType track_type, GstCaps * caps, const gchar * id,
GstStructure * properties, const gchar * metadatas, GError ** error)
{
GESTrack *track;
GESBaseXmlFormatterPrivate *priv = _GET_PRIV (self);
if (priv->check_only) {
if (caps)
... | false | false | false | false | false | 0 |
initHash(UErrorCode& status) {
if ( U_FAILURE(status) ) {
return NULL;
}
Hashtable* hTable;
if ( (hTable = new Hashtable(TRUE, status)) == NULL ) {
status = U_MEMORY_ALLOCATION_ERROR;
return NULL;
}
hTable->setValueCompartor(ValueComparator);
return hTable;
} | false | false | false | false | false | 0 |
StringToCompressionType(const char *option)
{
CompressionType
compression_type = UndefinedCompression;
if (LocaleCompare("None",option) == 0)
compression_type=NoCompression;
else if (LocaleCompare("BZip",option) == 0)
compression_type=BZipCompression;
else if (LocaleCompare("BZip2",option) == 0)
... | false | false | false | false | false | 0 |
_gth_script_task_exec_next_file (GthScriptTask *self)
{
self->priv->current = self->priv->current->next;
self->priv->n_current++;
if (self->priv->current == NULL)
gth_task_completed (GTH_TASK (self), NULL);
else
_gth_script_task_exec (self);
} | false | false | false | false | false | 0 |
_data_new()
{
xml_node_struct* d = _data();
if (d) return d;
return xml_node(_root).append_child(node_pcdata).internal_object();
} | false | false | false | false | false | 0 |
ReconstructPixa1(L_PTRA *papix,
L_PTRA *pabox)
{
l_int32 i, imax, nactual;
BOX *box;
PIX *pix;
PIXA *pixat;
ptraGetMaxIndex(papix, &imax);
ptraGetActualCount(papix, &nactual);
fprintf(stderr, "Before removal: imax = %4d, actual = %4d\n",
imax, nactual);
pixa... | false | false | false | false | false | 0 |
mock_refers_to_object_from_col( const QofInstance* inst, const QofInstance* ref )
{
g_assert( inst );
g_assert( ref );
g_assert( g_list_find( refers_test_struct_from_col.list, inst ) );
g_assert( refers_test_struct_from_col.ref == ref );
refers_test_struct_from_col.call_count++;
refers_test_stru... | false | false | false | false | false | 0 |
gst_avi_mux_finalize (GObject * object)
{
GstAviMux *mux = GST_AVI_MUX (object);
GSList *node;
/* completely free each sinkpad */
node = mux->sinkpads;
while (node) {
GstAviPad *avipad = (GstAviPad *) node->data;
node = node->next;
gst_avi_mux_pad_reset (avipad, TRUE);
g_free (avipad);
}
... | false | false | false | false | false | 0 |
ooHandleFastStartChannels(OOH323CallData *pCall)
{
int i = 0, remoteMediaControlPort = 0, dir = 0;
char remoteMediaControlIP[2 + 8 * 4 + 7];
DListNode *pNode = NULL;
H245OpenLogicalChannel *olc = NULL;
ooH323EpCapability *epCap = NULL;
H245H2250LogicalChannelParameters *h2250lcp = NULL;
/* If fas... | true | true | false | false | false | 1 |
stop()
{
d->activatedCount--;
if ( d->activatedCount <= 0 ) {
d->activatedCount = 0;
if ( d->anim ) {
d->anim->pause();
d->anim->restart();
}
}
} | false | false | false | false | false | 0 |
ab306_cout (Port *p, int val)
{
u_long base = p->base;
while ((ab306_inb (p, base + 1) & 0x80)); /* wait for dir flag */
ab306_outb (p, base, val);
ab306_outb (p, base + 1, 0xe0);
while ((ab306_inb (p, base + 1) & 0x80) == 0); /* wait for ack */
ab306_outb (p, base + 1, 0x60);
} | false | false | false | false | false | 0 |
vfio_group_get_external_user(struct file *filep)
{
struct vfio_group *group = filep->private_data;
if (filep->f_op != &vfio_group_fops)
return ERR_PTR(-EINVAL);
if (!atomic_inc_not_zero(&group->container_users))
return ERR_PTR(-EINVAL);
if (!group->container->iommu_driver ||
!vfio_group_viable(group)) {
... | false | false | false | false | false | 0 |
gen_passwd_idx()
{
srv_ip_port.passwd.seed = (rand() >> 1) % __HIME_PASSWD_N_;
Server_IP_port tsrv_ip_port = srv_ip_port;
to_hime_endian_4(&srv_ip_port.passwd.seed);
XChangeProperty(dpy, prop_win , addr_atom, XA_STRING, 8,
PropModeReplace, (unsigned char *)&tsrv_ip_port, sizeof(srv_ip_port));
XSync(GD... | false | false | false | false | false | 0 |
xb_init_comms(void)
{
struct xenstore_domain_interface *intf = xen_store_interface;
if (intf->req_prod != intf->req_cons)
pr_err("request ring is not quiescent (%08x:%08x)!\n",
intf->req_cons, intf->req_prod);
if (intf->rsp_prod != intf->rsp_cons) {
pr_warn("response ring is not quiescent (%08x:%08x):... | 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.