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 |
|---|---|---|---|---|---|---|
thread_interrupt (DebuggerTlsData *tls, MonoThreadInfo *info, MonoJitInfo *ji)
{
gpointer ip;
MonoNativeThreadId tid;
g_assert (info);
ip = MONO_CONTEXT_GET_IP (&mono_thread_info_get_suspend_state (info)->ctx);
tid = mono_thread_info_get_tid (info);
// FIXME: Races when the thread leaves managed code before hi... | false | false | false | false | false | 0 |
anjuta_window_present_widget (AnjutaShell *shell, GtkWidget *widget,
GError **error)
{
AnjutaWindow *win;
GdlDockItem *dock_item;
GtkWidget *parent;
g_return_if_fail (ANJUTA_IS_WINDOW (shell));
g_return_if_fail (GTK_IS_WIDGET (widget));
win = ANJUTA_WINDOW (shell);
g_return_if_fail (win->widgets != N... | false | false | false | false | false | 0 |
GetTempDirectory(std::wstring& path) {
#ifdef DETECTED_OS_WINDOWS
DWORD result = ::GetTempPathW(0, L"");
if(result == 0) return false;
std::vector<WCHAR> tempPath(result + 1);
result = ::GetTempPathW(static_cast<DWORD>(tempPath.size()), &tempPath[0]);
if((result == 0) || (result >= tempP... | false | false | false | false | false | 0 |
is_hilight (char *from, char *text, session *sess, server *serv)
{
if (alert_match_word (from, prefs.hex_irc_no_hilight))
return 0;
text = strip_color (text, -1, STRIP_ALL);
if (alert_match_text (text, serv->nick) ||
alert_match_text (text, prefs.hex_irc_extra_hilight) ||
alert_match_word (from, prefs.hex_... | false | false | false | false | false | 0 |
touchpad_check_second_peak(struct ad714x_chip *ad714x, int idx)
{
struct ad714x_touchpad_plat *hw = &ad714x->hw->touchpad[idx];
struct ad714x_touchpad_drv *sw = &ad714x->sw->touchpad[idx];
int i;
for (i = hw->x_start_stage; i < sw->x_highest_stage; i++) {
if ((ad714x->sensor_val[i] - ad714x->sensor_val[i + 1])
... | false | false | false | false | false | 0 |
netsnmp_container_get_ssll(void)
{
/*
* allocate memory
*/
sl_container *sl = SNMP_MALLOC_TYPEDEF(sl_container);
if (NULL==sl) {
snmp_log(LOG_ERR, "couldn't allocate memory\n");
return NULL;
}
netsnmp_init_container((netsnmp_container *)sl, NULL, _ssll_free,
... | false | false | false | false | false | 0 |
wil_tx_desc_offload_setup(struct vring_tx_desc *d,
struct sk_buff *skb){
int protocol;
if (skb->ip_summed != CHECKSUM_PARTIAL)
return 0;
d->dma.b11 = ETH_HLEN; /* MAC header length */
switch (skb->protocol) {
case cpu_to_be16(ETH_P_IP):
protocol = ip_hdr(skb)->protocol;
d->dma.b11 |= BIT(DMA_CFG_... | false | false | false | false | false | 0 |
vpe_s_selection(struct file *file, void *fh,
struct v4l2_selection *s)
{
struct vpe_ctx *ctx = file2ctx(file);
struct vpe_q_data *q_data;
struct v4l2_selection sel = *s;
int ret;
ret = __vpe_try_selection(ctx, &sel);
if (ret)
return ret;
q_data = get_q_data(ctx, sel.type);
if (!q_data)
return -EINVAL;
... | false | false | false | false | false | 0 |
main (int argc, char **argv)
{
progname = "genconstants";
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
/* Initializing the MD reader has the side effect of loading up
the constants table that we wish to scan. */
puts ("/* Generated automatically by the progra... | false | false | false | false | false | 0 |
ib_find_qp_qpn ( struct ib_device *ibdev,
unsigned long qpn ) {
struct ib_queue_pair *qp;
list_for_each_entry ( qp, &ibdev->qps, list ) {
if ( ( qpn == qp->qpn ) || ( qpn == qp->ext_qpn ) )
return qp;
}
return NULL;
} | false | false | false | false | false | 0 |
gnc_amount_edit_set_amount (GNCAmountEdit *gae, gnc_numeric amount)
{
const char * amount_string;
g_return_if_fail(gae != NULL);
g_return_if_fail(GNC_IS_AMOUNT_EDIT(gae));
g_return_if_fail(!gnc_numeric_check (amount));
/* Update the display. */
amount_string = xaccPrintAmount (amount, gae->pri... | false | false | false | false | false | 0 |
handle_cli_ooh323_show_users(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct ooh323_user *prev = NULL, *user = NULL;
char formats[FORMAT_STRING_SIZE];
#define FORMAT1 "%-15.15s %-15.15s %-15.15s %-s\n"
switch (cmd) {
case CLI_INIT:
e->command = "ooh323 show users";
e->usage =
"Usage... | false | false | false | false | false | 0 |
rest_params_add (RestParams *params, RestParam *param)
{
GHashTable *hash = (GHashTable *)params;
g_return_if_fail (params);
g_return_if_fail (param);
g_hash_table_insert (hash, (gpointer)rest_param_get_name (param), param);
} | false | false | false | false | false | 0 |
buildin_killmonster(struct script_state *st)
{
char *mapname,*event;
int m,allflag=0;
mapname=conv_str(st,& (st->stack->stack_data[st->start+2]));
event=conv_str(st,& (st->stack->stack_data[st->start+3]));
if((m = script_mapname2mapid(st,mapname)) < 0)
return 0;
if(strcmp(event,"All")==0)
allflag = 1;
map... | false | false | false | false | false | 0 |
vs6624_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
{
struct vs6624 *sensor = to_vs6624(sd);
struct v4l2_captureparm *cp = &parms->parm.capture;
struct v4l2_fract *tpf = &cp->timeperframe;
if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (cp->extendedmode != 0)
return -EINVA... | false | false | false | false | false | 0 |
ofb64_encrypt(unsigned char *s, int c)
{
struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1];
int index;
index = stp->str_index;
while (c-- > 0) {
if (index == sizeof(DES_cblock)) {
DES_cblock b;
DES_ecb_encrypt(&stp->str_feed,&b, &stp->str_sched, 1);
memcpy(stp->str_feed, b, sizeof(DES_cblock));
in... | false | false | false | false | false | 0 |
_php_stream_fopen_from_fd_int(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC)
{
php_stdio_stream_data *self;
self = pemalloc_rel_orig(sizeof(*self), persistent_id);
memset(self, 0, sizeof(*self));
self->file = NULL;
self->is_pipe = 0;
self->lock_flag = LOCK_UN;
self->is_process_pipe =... | false | false | false | false | false | 0 |
findTitle( const QString& id, const QString& defaultTitle /*= QString()*/ )
{
for ( int i = m_clients.count() - 1; i >= 0; i-- ) {
QString title = m_clients.at( i )->title( id );
if ( !title.isEmpty() )
return title;
}
return defaultTitle;
} | false | false | false | false | false | 0 |
GetNearestKeyFrame(framepos_t lFrame) const
{
if (!m_pSeekInfo)
return ERR;
framepos_t info_pos;
if (lFrame != ERR)
{
if (lFrame >= m_pSeekInfo->size())
return 0;
info_pos = lFrame;
}
else
info_pos = m_uiLastPos;
return m_pSeekInfo->nearestKeyFrame(info_pos);
} | false | false | false | false | false | 0 |
fillEventRecord(StepPtr step, bool firstInteraction, bool) {
PPtr inSubPro = subProcess()->incoming().first;
PPtr inParticle;
if ( !(inSubPro->parents().empty()) )
inParticle = inSubPro->parents()[0];
else
inParticle = inSubPro;
PPtr inParton = theOriginals[inSubPro];
theOriginals.erase(inSubPro);
... | false | false | false | false | false | 0 |
xen_vcpuop_set_oneshot(struct clock_event_device *evt)
{
int cpu = smp_processor_id();
if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
BUG();
return 0;
} | false | false | false | false | false | 0 |
adjustMixingMatrix(long id) {
//get correct mixing matrix
switch(id) {
case 1000021 :
gluinoPhase_ = Complex(0.,1.);
break;
case 1000022 :
case 1000023 :
case 1000025 :
case 1000035 :
case 1000045 :
if(NMix_)
NMix_->adjustPhase(id);
else
throw SetupException() << "SusyBase... | false | false | false | false | false | 0 |
StoreReplay(UBYTE Set)
{
register LONG i;
// Refree and ball
match[Set].game=*p;
match[Set].team[0] = *p->team[0];
match[Set].team[1] = *p->team[1];
match[Set].ReplayCounter = counter;
match[Set].field_x = field_x;
match[Set].field_y = field_y;
for (i = 0; i < MAX_PLAYERS; i++)
... | false | false | false | false | false | 0 |
slapi_valueset_join_attr_valueset(const Slapi_Attr *a, Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2)
{
if (slapi_valueset_isempty(vs1))
valueset_set_valueset(vs1,vs2);
else
slapi_valueset_add_attr_valuearray_ext (a, vs1, vs2->va, vs2->num, 0, NULL);
} | false | false | false | false | false | 0 |
is_valid_xrange(const double val,
bool is_allow_zero,
bool is_no_max_check) {
return (((val > 0.) || (is_allow_zero && (val >= 0.))) && (is_no_max_check || (val <= 1.)));
} | false | false | false | false | false | 0 |
cancel_action_by_key(gpointer key, gpointer value, gpointer user_data)
{
gboolean remove = FALSE;
struct cancel_data *data = user_data;
struct recurring_op_s *op = (struct recurring_op_s *)value;
if (safe_str_eq(op->op_key, data->key)) {
data->done = TRUE;
remove = !cancel_op(data->lrm_... | false | false | false | false | false | 0 |
brasero_volume_get_gvolume (BraseroVolume *volume)
{
const gchar *volume_path = NULL;
GVolumeMonitor *monitor;
GVolume *gvolume = NULL;
BraseroDrive *drive;
GList *volumes;
GList *iter;
g_return_val_if_fail (volume != NULL, NULL);
g_return_val_if_fail (BRASERO_IS_VOLUME (volume), NULL);
drive = b... | false | false | false | false | false | 0 |
drawBugs(struct state *st, int *tColorIdx, int tci0, int tnc,
int *colorIdx, int ci0, int nc)
{
register bug *b;
register int i, j;
int temp;
if (((st->head+1)%st->trailLen) == st->tail) {
/* first, erase last segment of bugs if necessary */
temp = (st->tail+1) % st->trailLen;
b = st->b... | false | false | false | false | false | 0 |
operator Vector(){
Vector v1(x, y);
return v1;
} | false | false | false | false | false | 0 |
rint(double x)
#else
double rint(x)
double x;
#endif
{
int i0,j0,sx;
unsigned i,i1;
double w,t;
EXTRACT_WORDS(i0, i1, x);
sx = (i0>>31)&1;
j0 = ((i0>>20)&0x7ff)-0x3ff;
if(j0<20) {
if(j0<0) {
if(((i0&0x7fffffff)|i1)==0) return x;
i1 |= (i0&0x0fffff);
i0 &= 0xfffe0000;
i0 |= ((i1|-i1)>>12)&... | false | false | false | false | false | 0 |
elm_progressbar_value_set(Evas_Object *obj,
double val)
{
ELM_PROGRESSBAR_CHECK(obj);
ELM_PROGRESSBAR_DATA_GET(obj, sd);
if (sd->val == val) return;
sd->val = val;
if (sd->val < MIN_RATIO_LVL) sd->val = MIN_RATIO_LVL;
if (sd->val > MAX_RATIO_LVL) sd->val = MAX_RATIO_LVL;
... | false | false | false | false | false | 0 |
s48_copy_string_to_latin_1_n(long vm_string_796X, long start_797X, long count_798X, char *string_799X)
{
long max_803X;
long v_802X;
long max_801X;
long v_800X;
{ if ((3 == (3 & vm_string_796X))) {
if ((16 == (31 & ((((*((long *) ((((char *) (-3 + vm_string_796X))) + -8))))>>2))))) {
goto L27698;}
... | false | false | false | false | false | 0 |
WriteExtraType(FCDObject* object, xmlNode* parentNode)
{
FCDEType* eType = (FCDEType*)object;
if (eType->GetName().empty() && eType->GetTechniqueCount() == 0) return NULL;
// Add the <extra> element and its techniques
xmlNode* extraNode = AddChild(parentNode, DAE_EXTRA_ELEMENT);
if (!eType->GetName().emp... | false | false | false | false | false | 0 |
__mltadd__(Real *dp1, const Real *dp2, double s, int len)
#endif
{
register int i;
#ifdef VUNROLL
register int len4;
len4 = len / 4;
len = len % 4;
for ( i = 0; i < len4; i++ )
{
dp1[4*i] += s*dp2[4*i];
dp1[4*i+1] += s*dp2[4*i+1];
dp1[4*i+2] += s*dp2[4*i+2];
dp1[4*i+3] += s*dp... | false | false | false | false | false | 0 |
dispatch(timeval* howlong) {
fd_set rmask;
fd_set wmask;
fd_set emask;
FD_ZERO(&rmask);
FD_ZERO(&wmask);
FD_ZERO(&emask);
int nfound = (anyReady()) ?
fillInReady(rmask, wmask, emask)
: waitFor(rmask, wmask, emask, howlong);
notify(nfound, rmask, wmask, emask);
ret... | false | false | false | false | false | 0 |
kill_process(host, dacport, name)
char *host;
u_short dacport;
char *name;
{
dac_kill_it out ;
dac_kill_ot in ;
u_short this_op ;
int sd ;
/* connect to DAC */
if ((sd = r_connect_dac(host, dacport)) == -1)
return -1 ;
/* send op-code, process name & read response*/
this_op = htons(DAC_... | false | false | false | false | false | 0 |
set_state (const XMLTree& tree, const XMLNode&)
{
// Author
boost::shared_ptr<XMLSharedNodeList> author = tree.find("//Author");
if (author->size() < 1) {
error << "No author information in MIDNAM file" << endmsg;
return -1;
}
if (author->front()->children().size() > 0) {
_author = author->front()->childr... | false | false | false | false | false | 0 |
tryfuncTM (lua_State *L, StkId func) {
const TValue *tm = luaT_gettmbyobj(L, func, TM_CALL);
StkId p;
if (!ttisfunction(tm))
luaG_typeerror(L, func, "call");
/* Open a hole inside the stack at 'func' */
for (p = L->top; p > func; p--)
setobjs2s(L, p, p-1);
L->top++; /* slot ensured by caller */
s... | false | false | false | false | false | 0 |
initPipe(int& pipe_read, int& pipe_write)
{
int filedes[2];
int r = pipe(filedes);
if (r != -1) {
pipe_read = filedes[0];
pipe_write = filedes[1];
SocketSetCloseOnExec(pipe_read);
SocketSetCloseOnExec(pipe_write);
}
else {
omniORB::logs(5, "Unable to create pipe for SocketCollection.");
... | false | false | false | false | false | 0 |
word_break(const cst_item *word)
{
cst_item *ww,*pp;
const char *pname;
ww = item_as(word,"Phrase");
if ((ww == NULL) || (item_next(ww) != 0))
return VAL_STRING_1;
else
{
pp = item_parent(ww);
pname = val_string(item_feat(pp,"name"));
if (cst_streq("BB",pname))
return VAL_STRING_4;
e... | false | false | false | false | false | 0 |
t_dns_name_setbuffer(void) {
int result;
unsigned char junk[BUFLEN];
dns_name_t name;
isc_buffer_t buffer;
t_assert("dns_name_setbuffer", 1, T_REQUIRED, "%s", a5);
isc_buffer_init(&buffer, junk, BUFLEN);
dns_name_init(&name, NULL);
dns_name_setbuffer(&name, &buffer);
if (name.buffer == &buffer)
result = T... | false | false | false | false | false | 0 |
clutter_gst_player_set_subtitle_track_impl (ClutterGstPlayer *player,
gint index_)
{
ClutterGstPlayerPrivate *priv;
GstPlayFlags flags;
priv = PLAYER_GET_PRIVATE (player);
g_return_if_fail (index_ >= -1 &&
index_ < (gint) g_list_leng... | false | false | false | false | false | 0 |
jack_handle_reorder (jack_client_t *client, jack_event_t *event)
{
char path[PATH_MAX+1];
DEBUG ("graph reorder\n");
if (client->graph_wait_fd >= 0) {
DEBUG ("closing graph_wait_fd==%d", client->graph_wait_fd);
close (client->graph_wait_fd);
client->graph_wait_fd = -1;
}
if (client->graph_next_fd >= 0) ... | true | true | false | false | true | 1 |
mlx5e_apply_netdev_addr(struct mlx5e_priv *priv)
{
struct mlx5e_eth_addr_hash_node *hn;
struct hlist_node *tmp;
int i;
mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.netdev_uc, i)
mlx5e_execute_action(priv, hn);
mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.netdev_mc, i)
mlx5e_execute_action(priv, hn);
... | false | false | false | false | false | 0 |
setData(const int ref, const QVariant &data, const int role)
{
Q_UNUSED(ref);
if (role==Qt::EditRole) {
QSpinBox *spin = qobject_cast<QSpinBox*>(m_Spin->m_Spin);
if (spin) {
spin->setValue(data.toInt());
onValueChanged();
return true;
}
QDouble... | false | false | false | false | false | 0 |
isOnHolderBacks()
{
unsigned int numDirectHolders = 0;
Cube::t_models resist = m_mask->getResist(Dir::DIR_DOWN);
Cube::t_models::iterator end = resist.end();
for (Cube::t_models::iterator i = resist.begin(); i != end; ++i) {
if ((*i)->isAlive()) {
++numDirectHolders;
}
}
... | false | false | false | false | false | 0 |
camel_cipher_context_decrypt_sync (CamelCipherContext *context,
CamelMimePart *ipart,
CamelMimePart *opart,
GCancellable *cancellable,
GError **error)
{
CamelCipherContextClass *c... | false | false | false | true | false | 1 |
HighlightHandle(vtkProp *prop)
{
// first unhighlight anything picked
this->HighlightOutline(0);
if ( this->CurrentHandle )
{
this->CurrentHandle->SetProperty(this->HandleProperty);
}
this->CurrentHandle = static_cast<vtkActor *>(prop);
if ( this->CurrentHandle )
{
this->CurrentHandle->S... | false | false | false | false | false | 0 |
sort(){
// since single score items travel up the
// score ladder, this is the most efficient sort algorithm:
for(int i=1;i<highName.Len();i++)
for(int j=i;j>=1 && !inorder(j-1,j);j--)
swap_entries(j,j-1);
} | false | false | false | false | false | 0 |
onComboManualChange(GtkComboBox *combo, gpointer data _U_)
{
int iCol;
VisuData *dataObj;
VisuColorization *dt;
dataObj = visu_ui_panel_getData(VISU_UI_PANEL(panelDataFile));
g_return_if_fail(dataObj);
dt = visu_colorization_get(dataObj, FALSE, (gboolean*)0);
iCol = gtk_combo_box_get_active(combo);
... | false | false | false | false | false | 0 |
dgap_tty_digigeta(struct channel_t *ch,
struct digi_t __user *retinfo)
{
struct digi_t tmp;
ulong lock_flags;
if (!retinfo)
return -EFAULT;
memset(&tmp, 0, sizeof(tmp));
spin_lock_irqsave(&ch->ch_lock, lock_flags);
memcpy(&tmp, &ch->ch_digi, sizeof(tmp));
spin_unlock_irqrestore(&ch->ch_lock, lock_fl... | false | true | false | false | false | 1 |
ajClockNow(void)
{
clock_t now;
now = clock();
if(now < timeClockSave)
{
/* ajUser("ajClockNow overflow now:%Ld "
"timeClockSave:%Ld timeClockOverflow:%Ld",
(ajlong)now, (ajlong)timeClockSave, timeClockOverflow); */
if(!timeClockMax)
{
... | false | false | false | false | false | 0 |
usX2Y_AsyncSeq04_init(struct usX2Ydev *usX2Y)
{
int err = 0,
i;
if (NULL == (usX2Y->AS04.buffer = kmalloc(URB_DataLen_AsyncSeq*URBS_AsyncSeq, GFP_KERNEL))) {
err = -ENOMEM;
} else
for (i = 0; i < URBS_AsyncSeq; ++i) {
if (NULL == (usX2Y->AS04.urb[i] = usb_alloc_urb(0, GFP_KERNEL))) {
err = -ENOMEM;
... | false | false | false | false | false | 0 |
TrimSpaces(char *p)
{
char *start;
for (start = p; ISWHITE(*start) || *start == '\n'; start++)
continue;
for (p = start + strlen(start); p > start && isspace((unsigned char) p[-1]); p--)
continue;
return (int)(p - start);
} | true | true | false | false | true | 1 |
Delay(int delay_ns) {
static const int kNumNSecInSecond = 1000000000;
EXPECT_LT(delay_ns, kNumNSecInSecond);
struct timespec delay = { 0, delay_ns };
nanosleep(&delay, 0);
} | false | false | false | false | false | 0 |
readFile(string& result,size_t wanted,mode_t filter) const {
if (exists(filter)) {
char * memblock;
std::ifstream in(output().c_str(), std::ios::in | std::ios::binary | std::ios::ate);
if (in.is_open()) { // reading a complete binary file
std::ifstream::pos_type size = in.tellg();
if ( ( (filte... | false | false | false | false | false | 0 |
create_native(THD *thd, LEX_STRING name,
List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
if (item_list != NULL)
arg_count= item_list->elements;
switch (arg_count) {
case 2:
{
Item *param_1= item_list->pop();
Item *param_2= item_list->pop();
/*... | false | false | false | false | false | 0 |
get_xf_differences (BiffXFData *xfd, GnmStyle const *parentst)
{
int i;
xfd->differences = 0;
if (xfd->format_idx != FORMAT_MAGIC)
xfd->differences |= 1 << MS_BIFF_D_FORMAT_BIT;
if (xfd->font_idx != FONT_MAGIC)
xfd->differences |= 1 << MS_BIFF_D_FONT_BIT;
/* hmm. documentation doesn't say that alignment bit ... | false | false | false | false | false | 0 |
kg_translate_flag_iov(OM_uint32 type)
{
krb5_cryptotype ktype;
switch (GSS_IOV_BUFFER_TYPE(type)) {
case GSS_IOV_BUFFER_TYPE_DATA:
case GSS_IOV_BUFFER_TYPE_PADDING:
ktype = KRB5_CRYPTO_TYPE_DATA;
break;
case GSS_IOV_BUFFER_TYPE_SIGN_ONLY:
ktype = KRB5_CRYPTO_TYPE_SIGN_ONLY;
... | false | false | false | false | false | 0 |
tf_igetsourceloc(int32 *lineno, char *inst)
{
char *chp;
struct tfinst_t *sav_tfip;
struct tfrec_t *sav_tfrp;
set_tfinst_(inst, sav_tfip, sav_tfrp);
chp = tf_getsourceloc(lineno);
__tfinst = sav_tfip;
__tfrec = sav_tfrp;
return(chp);
} | false | false | false | false | false | 0 |
soap_in_ds__X509IssuerSerialType(struct soap *soap, const char *tag, struct ds__X509IssuerSerialType *a, const char *type)
{
size_t soap_flag_X509IssuerName = 1;
size_t soap_flag_X509SerialNumber = 1;
if (soap_element_begin_in(soap, tag, 0, type))
return NULL;
a = (struct ds__X509IssuerSerialType *)soap_id_enter(... | false | false | false | false | false | 0 |
gt_fmfindtextpos (const Fmindex *fm,unsigned long idx)
{
unsigned long offset = 0;
GtUchar cc;
while ((idx & fm->markdistminus1) != 0)
{
if (idx == fm->longestsuffixpos || ISSPECIAL(cc = ACCESSBWTTEXT(idx)))
{
unsigned long smallestgeq
= searchsmallestgeq(fm->specpos.spaceGtPairBwt... | false | false | false | false | false | 0 |
make_paymode(GtkWidget *label)
{
GtkListStore *store;
GtkTreeIter iter;
GtkWidget *combobox;
GtkCellRenderer *renderer;
guint i;
//store
store = gtk_list_store_new (
NUM_LST_PAYMODE,
GDK_TYPE_PIXBUF,
G_TYPE_STRING
);
//combobox
combobox = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
//col... | false | false | false | false | false | 0 |
make_sub (NODE_T * p, NODE_T * q, int t)
{
NODE_T *z = new_node ();
ABEND (p == NO_NODE || q == NO_NODE, ERROR_INTERNAL_CONSISTENCY, "make_sub");
*z = *p;
if (GINFO (p) != NO_GINFO) {
GINFO (z) = new_genie_info ();
}
PREVIOUS (z) = NO_NODE;
if (p == q) {
NEXT (z) = NO_NODE;
} else {
if (NEXT... | false | false | false | false | false | 0 |
style_separator(GB_DRAW *d, int x, int y, int w, int h, int vertical, int state)
{
QStyleOption opt;
init_option(opt, x, y, w, h, state);
if (vertical)
opt.state |= QStyle::State_Horizontal;
QApplication::style()->drawPrimitive(QStyle::PE_IndicatorToolBarSeparator, &opt, DP(d));
if (DPM(d))
{
//DPM(d)->s... | false | false | false | false | false | 0 |
setImage(const QImage& i)
{
if (i.width() > MAX_AVATAR_DISPLAY_SIZE || i.height() > MAX_AVATAR_DISPLAY_SIZE)
pixmap_.convertFromImage(i.scaled(MAX_AVATAR_DISPLAY_SIZE,MAX_AVATAR_DISPLAY_SIZE,Qt::KeepAspectRatio,Qt::SmoothTransformation));
else
pixmap_.convertFromImage(i);
} | false | false | false | false | false | 0 |
cmmf_CopyCertOrEncCert(PLArenaPool *poolp, CMMFCertOrEncCert *dest,
CMMFCertOrEncCert *src)
{
SECStatus rv = SECSuccess;
CRMFEncryptedValue *encVal;
dest->choice = src->choice;
rv = cmmf_copy_secitem(poolp, &dest->derValue, &src->derValue);
switch (src->choice) {
case cmmfCer... | false | false | false | false | false | 0 |
add_to_log (char *data)
{
FILE *fp;
if (id3_open_file(&fp, (char*)logfile, "at") == FALSE)
return FALSE;
fprintf(fp, "%s", data);
fclose(fp);
return TRUE;
} | false | false | false | false | false | 0 |
garcon_menu_get_app_dirs (GarconMenu *menu,
gboolean recursive)
{
GList *dirs = NULL;
GList *lp;
GList *sp;
GList *submenu_app_dirs;
/* Fetch all application directories */
dirs = garcon_menu_node_tree_get_string_children (menu->priv->tree,
... | false | false | false | false | false | 0 |
SignalHook (const char *signal, WLSignalInstance * wlsi, int (WLSignalInstance::*member)(WLSignalData *wlsd), int priority)
{
SignalHook(signal, new WLSignalContainer(wlsi, member, priority));
} | false | false | false | false | false | 0 |
get_default_font(int term_num)
{
const char *font;
char buf[80];
/* Window specific font name */
strnfmt(buf, sizeof(buf), "ANGBAND_X11_FONT_%d", term_num);
/* Check environment for that font */
font = getenv(buf);
if (font) return font;
/* Check environment for "base" font */
font = getenv("ANGBAND_X11_FON... | false | false | false | false | false | 0 |
fiji_get_pp_table_entry_callback_func(struct pp_hwmgr *hwmgr,
void *state, struct pp_power_state *power_state,
void *pp_table, uint32_t classification_flag)
{
struct fiji_hwmgr *data = (struct fiji_hwmgr *)(hwmgr->backend);
struct fiji_power_state *fiji_power_state =
(struct fiji_power_state *)(&(power_state-... | false | false | false | false | false | 0 |
commands_shutdown(struct commands *c)
{
if (c == NULL)
return;
ibuf_free(c->absolute_path);
c->absolute_path = NULL;
ibuf_free(c->line_number);
c->line_number = NULL;
tgdb_list_free(c->breakpoint_list, free_breakpoint);
tgdb_list_destroy(c->breakpoint_list);
ibuf_free(c->brea... | false | false | false | false | false | 0 |
gconf_settings_backend_gvariant_to_gconf_value (GVariant *value)
{
const GVariantType *type;
GConfValue *gconf_value = NULL;
type = g_variant_get_type (value);
if (g_variant_type_is_basic (type) &&
!g_variant_type_equal (type, G_VARIANT_TYPE_BASIC))
gconf_value = gconf_settings_backend_simple... | false | false | false | false | false | 0 |
removeDetailDefinition(const QString& definitionId, const QString& contactType, QContactChangeSet& changeSet, QContactManager::Error* error)
{
// we should check for changes to the database in this function, and add ids of changed data to changeSet...
// we should also check to see if the changes have invalidat... | false | false | false | false | false | 0 |
e_flowlayout_homogenous_get(Evas_Object *obj)
{
E_Smart_Data *sd;
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
sd = evas_object_smart_data_get(obj);
if (!sd) return 0;
return sd->homogenous;
} | false | false | false | false | false | 0 |
Scm_BignumToUI(ScmBignum *b, int clamp, int *oor)
{
if (clamp == SCM_CLAMP_NONE && oor != NULL) *oor = FALSE;
if (b->sign >= 0) {
if (b->size >= 2) {
if (clamp & SCM_CLAMP_HI) return SCM_ULONG_MAX;
else goto err;
} else {
return b->values[0];
}
} e... | false | false | false | false | false | 0 |
au0828_analog_stream_disable(struct au0828_dev *d)
{
dprintk(1, "au0828_analog_stream_disable called\n");
au0828_writereg(d, AU0828_SENSORCTRL_100, 0x0);
return 0;
} | false | false | false | false | false | 0 |
checkIfAddressesMatch(const Address *a1, const Address *a2)
{
if (a1->getId() == a2->getId()) return true;
if (*(a1->getAddressPtr()) == *(a2->getAddressPtr()) ) return true;
if ((Network::constcast(a2)!=NULL ||
NetworkIPv6::constcast(a2)!=NULL ||
Interface::constcast(a2->getParent())) &&
... | false | false | false | false | false | 0 |
config_user(struct configuration *p)
{
const char *t;
struct passwd *pw;
t = gettoken(p);
if (t != t_string)
return t;
pw = getpwnam(p->tokbuf);
if (pw == 0)
return e_user_unknown;
if (pw->pw_uid == 0)
return e_user_invalid;
server_uid = pw->pw_uid;
server_gid = pw->pw_gid;
return 0;
} | false | false | false | false | false | 0 |
doshutdown(void) {
isc_task_detach(&global_task);
if (userserver != NULL)
isc_mem_put(mctx, userserver, sizeof(isc_sockaddr_t));
if (localaddr != NULL)
isc_mem_put(mctx, localaddr, sizeof(isc_sockaddr_t));
if (tsigkey != NULL) {
ddebug("Freeing TSIG key");
dns_tsigkey_detach(&tsigkey);
}
if (sig0key !... | false | false | false | false | false | 0 |
MainLibLoad_Tcl(ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
#else
int MainLibLoad_Tcl(clientData, interp, objc, objv)
ClientData clientData;
Tcl_Interp *interp;
int objc;
Tcl_Obj *CONST objv[];
#endif
{
char *package=NULL;
char *shlib=NULL;
char *ermsg;
c... | false | false | false | false | false | 0 |
getHTMLEventListener(unsigned id)
{
return m_regdListeners.getHTMLEventListener(EventName::fromId(id));
} | false | false | false | false | false | 0 |
f_protect(int count, VALUE **vals)
{
int i, depth;
VALUE *v1, *v2, *v3;
VALUE result;
BOOL have_nblock;
/* initialize VALUE */
result.v_type = V_NULL;
result.v_subtype = V_NOSUBTYPE;
v1 = vals[0];
have_nblock = (v1->v_type == V_NBLOCK);
if (!have_nblock) {
if (v1->v_type != V_ADDR)
return error_value(... | false | false | false | false | false | 0 |
from_kprojid_munged(struct user_namespace *targ, kprojid_t kprojid)
{
projid_t projid;
projid = from_kprojid(targ, kprojid);
if (projid == (projid_t) -1)
projid = OVERFLOW_PROJID;
return projid;
} | false | false | false | false | false | 0 |
mcxLogGet
( mcxbits level_programmer
)
{ dim i
; mcxbool ok = FALSE
; for (i=0;i<sizeof mcx_log_class_list/sizeof mcx_log_class_list[0];i++)
{ mcxbits code_bits = level_programmer & mcx_log_class_list[i].class
#if 0
;fprintf
( stderr, "code %d user %d class %d user&class %d\n"
, (int) code_bits
, (... | false | false | false | false | false | 0 |
getMinSpeed() const
{
u_int minspeed = BR_14400;
for (int speed = BR_14400; speed >= BR_2400; speed--) {
if (br & BIT(speed)) minspeed = speed;
}
return (minspeed);
} | false | false | false | false | false | 0 |
listSliceCompareNameDescending(
const void *item1,
const void *item2)
{
const AjPStr srname1 = NULL;
const AjPStr srname2 = NULL;
EnsPSlice slice1 = *(EnsOSlice *const *) item1;
EnsPSlice slice2 = *(EnsOSlice *const *) item2;
#if defined(AJ_DEBUG) && AJ_DEBUG >= 2
if (ajDebugTest("listSlic... | false | false | false | false | false | 0 |
test_checkout_tree__can_checkout_a_subdirectory_from_a_subtree(void)
{
char *entries[] = { "de/" };
g_opts.paths.strings = entries;
g_opts.paths.count = 1;
cl_git_pass(git_revparse_single(&g_object, g_repo, "subtrees:ab"));
cl_assert_equal_i(false, git_path_isdir("./testrepo/de/"));
cl_git_pass(git_checkout_t... | false | false | false | false | false | 0 |
_stream_known_source_packet_received (FsRtpStream *stream, guint component,
GstBuffer *buffer, gpointer user_data)
{
guint32 ssrc;
FsRtpSession *self = FS_RTP_SESSION_CAST (user_data);
if (fs_rtp_session_has_disposed_enter (self, NULL))
return;
if (component == 1)
{
if (gst_rtp_buffer_validate (... | false | false | false | false | false | 0 |
snd_cs5530_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
static int dev;
struct snd_card *card;
struct snd_cs5530 *chip = NULL;
int err;
if (dev >= SNDRV_CARDS)
return -ENODEV;
if (!enable[dev]) {
dev++;
return -ENOENT;
}
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_... | false | false | false | false | false | 0 |
priv_iface_init(int index, char *iface)
{
int rc;
char dev[IFNAMSIZ];
enum priv_cmd cmd = PRIV_IFACE_INIT;
must_write(PRIV_UNPRIVILEGED, &cmd, sizeof(enum priv_cmd));
must_write(PRIV_UNPRIVILEGED, &index, sizeof(int));
strlcpy(dev, iface, IFNAMSIZ);
must_write(PRIV_UNPRIVILEGED, dev, IFNAMSIZ);
priv_wait();
mu... | true | true | false | false | false | 1 |
cmd_load(void)
{
LoadEPD (token[1]);
if (!ValidateBoard()) {
SET (flags, ENDED);
printf ("Board is wrong!\n");
}
} | false | false | false | false | false | 0 |
strcmpNoCase (const char *str1, const char *str2)
{
/* str1, str2 shouldn't be null, but if it is, we want to handle it. */
myAssert (str1 != NULL);
myAssert (str2 != NULL);
if (str1 == NULL) {
if (str2 == NULL) {
return 0;
} else {
return -1;
}
}
if (str2 == NULL) ... | false | false | false | false | false | 0 |
read_synset(int dbase, long boffset, char *word)
{
FILE *fp;
if((fp = datafps[dbase]) == NULL) {
sprintf(msgbuf, "WordNet library error: %s datafile not open\n",
partnames[dbase]);
display_message(msgbuf);
return(NULL);
}
fseek(fp, boffset, 0); /* position file to byte offset requested */
... | false | true | false | false | false | 1 |
name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name, const char* name_end)
{
int num;
num = onig_name_to_backref_number(RREGEXP(regexp)->ptr,
(const unsigned char* )name, (const unsigned char* )name_end, regs);
if (num >= 1) {
return num;
}
else {
VALUE s = rb_str_ne... | false | false | false | false | false | 0 |
unbackslash(char *src)
{
char *dst = src = strchrnul(src, '\\');
while (1) {
if (*src == '\\')
src++;
if ((*dst++ = *src++) == '\0')
break;
}
return dst;
} | false | false | false | false | false | 0 |
PrintSection(std::ostream& os,
const cmDocumentationSection §ion,
const char* name)
{
if(name && (strcmp(name, "SingleItem")!=0))
{
os <<
"---------------------------------------"
"---------------------------------------\n";
os << name << "\n\n";
}
cons... | false | false | false | false | false | 0 |
concatenate(char **str, const char *add, int len)
{
int n;
char *p;
if (*str) {
n = strlen(*str);
p = realloc(*str, (n + len + 1) * sizeof(char));
}
else {
n = 0;
p = malloc((len + 1) * sizeof(char));
}
if (p) {
*str = p;
strncpy(&p[n], add, len);
p[n+len] = 0;
return 0;
... | false | true | false | false | false | 1 |
ccall_classify_ct(CTState *cts, CType *ct, int *rcl, CTSize ofs)
{
if (ctype_isarray(ct->info)) {
CType *cct = ctype_rawchild(cts, ct);
CTSize eofs, esz = cct->size, asz = ct->size;
for (eofs = 0; eofs < asz; eofs += esz)
ccall_classify_ct(cts, cct, rcl, ofs+eofs);
} else if (ctype_isstruct(ct->in... | 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.