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 |
|---|---|---|---|---|---|---|
print()const
{
printf("Induced symmetries: %lu\n",(unsigned long)size());
for(unsigned int i= 0;i<size();i++)
operator[](i).print();
} | false | false | false | false | false | 0 |
_gfxwop_port_print(gfxw_widget_t *widget, int indentation)
{
gfxw_port_t *port = (gfxw_port_t *) widget;
_gfxw_print_widget(widget, indentation);
sciprintf("PORT");
sciprintf(" font=%d drawpos=(%d,%d)", port->font_nr, port->draw_pos.x, port->draw_pos.y);
if (port->gray_text)
sciprintf(" (gray)");
_w_gfxwop_con... | false | false | false | false | false | 0 |
IDirectFBImageProvider_DFIFF_RenderTo( IDirectFBImageProvider *thiz,
IDirectFBSurface *destination,
const DFBRectangle *dest_rect )
{
DFBResult ret;
IDirectFBSurface_data *dst_data;
CoreSurface ... | false | false | false | false | false | 0 |
hid_magn_3d_probe(struct platform_device *pdev)
{
int ret = 0;
static char *name = "magn_3d";
struct iio_dev *indio_dev;
struct magn_3d_state *magn_state;
struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
struct iio_chan_spec *channels;
int chan_count = 0;
indio_dev = devm_iio_device_alloc(&pdev->... | false | false | false | false | false | 0 |
hix5hd2_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
struct hix5hd2_i2c_priv *priv = i2c_get_adapdata(adap);
int i, ret, stop;
pm_runtime_get_sync(priv->dev);
for (i = 0; i < num; i++, msgs++) {
stop = (i == num - 1);
ret = hix5hd2_i2c_xfer_msg(priv, msgs, stop);
if (ret < 0)
... | false | false | false | false | false | 0 |
output_channels(int i_channels) const
{
// note: We have two separate cases: either one plugin
// is instantiated for each channel, or one plugin
// per chain. See EFFECT_LADSPA::init().
if (in_audio_ports > 1 ||
out_audio_ports > 1) {
return out_audio_ports;
}
return i_channels;... | false | false | false | false | false | 0 |
select_interface (int modprobe)
{
int fd;
char *modules[] = {"hdaps_ec", "hdaps", "ams"};
int mod_index;
char command[64];
if (modprobe) {
for (mod_index = 0; mod_index < sizeof(modules)/sizeof(modules[0]); mod_index++) {
snprintf(command, sizeof(command), "modprobe %s 1>/dev/null 2>/dev/null", modules[mod_... | false | false | false | false | false | 0 |
ath9k_reg_rmw_buffer(void *hw_priv,
u32 reg_offset, u32 set, u32 clr)
{
struct ath_hw *ah = (struct ath_hw *) hw_priv;
struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
u32 rsp_status;
int r;
mutex_lock(&priv->wmi->multi_rmw_mutex);
/* S... | false | false | false | false | false | 0 |
CDRAG_drag(CWIDGET *source, GB_VARIANT_VALUE *data, char *format)
{
if (GB.CheckObject(source))
return NULL;
if (gDrag::isActive())
{
GB.Error("Undergoing drag");
return NULL;
}
if (data->type == GB_T_STRING)
{
if (format)
{
if (strlen(format) < 5)
goto _BAD_FORMAT;
if (strncasecmp... | false | false | false | false | false | 0 |
d_encoding (struct d_info *di, int top_level)
{
char peek = d_peek_char (di);
if (peek == 'G' || peek == 'T')
return d_special_name (di);
else
{
struct demangle_component *dc;
dc = d_name (di);
if (dc != NULL && top_level && (di->options & DMGL_PARAMS) == 0)
{
/* Strip off any ini... | false | false | false | false | false | 0 |
py_gc_set_default_background(PyObject* self, PyObject* args)
{
PyObject* pyCanvasGroup;
GooCanvasItem* canvasGroup;
/* Parse arguments */
if(!PyArg_ParseTuple(args, "O:gc_set_background_by_id",
&pyCanvasGroup))
return NULL;
canvasGroup = (GooCanvasItem*) pygobject_get(pyCanvasGroup);
/* Call ... | false | false | false | false | false | 0 |
gw_strcmp_strblob ( gchar *str, gchar *blob, gboolean case_sensitive)
{
gchar *tmp_str = NULL;
gchar *tmp_blob = NULL;
gchar *keep_str = NULL;
gchar **words = NULL;
gchar *tmp = NULL;
gint i;
gint result = -1;
#ifdef GW_DEBUG_TOOLS_COMPONENT
g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY... | false | false | true | true | true | 1 |
PythonFindBestMove(PyObject * UNUSED(self), PyObject * args)
{
PyObject *pyDice = NULL;
PyObject *pyBoard = NULL;
PyObject *pyCubeInfo = NULL;
PyObject *pyEvalContext = NULL;
TanBoard anBoard;
int anDice[2];
int anMove[8];
cubeinfo ci;
evalcontext ec = { 0, 0, 0, 1, 0.0f };
me... | false | false | false | false | true | 1 |
fs_raw_session_new_stream (FsSession *session,
FsParticipant *participant,
FsStreamDirection direction,
GError **error)
{
FsRawSession *self = FS_RAW_SESSION (session);
FsStream *new_stream = NULL;
FsRawConference *conference;
if (!FS_IS_RAW_PARTICIPANT (participant))
{
g_set_error (error, FS... | false | false | false | false | false | 0 |
NativeToCeos( void *dst, const void *src, const size_t len, const size_t swapunit)
{
int i;
int remainder;
int units;
remainder = len % swapunit;
units = len - remainder;
for(i = 0;i < units; i += swapunit )
{
swapbyte( ( unsigned char *) dst + i, ( unsigned char * ) src + i, swapunit);... | false | false | false | false | false | 0 |
DXCopyModuleId(Pointer id)
{
Pointer nid;
if (id == NULL || (char *)id == '\0')
return NULL;
nid = DXAllocate(strlen((char *)id) + 1);
if (!nid)
return NULL;
strcpy(nid, id);
return nid;
} | false | false | false | false | false | 0 |
call_refresh_callback(void)
{
if (service_if == NULL || service_if->refresh_services_cb == NULL)
return;
if (service_if->to_refresh != 0)
g_source_remove(service_if->to_refresh);
service_if->to_refresh = g_timeout_add_full(G_PRIORITY_DEFAULT,
0, refresh_cb, NULL, NULL);
} | false | false | false | false | false | 0 |
glue_creat(const char *path, int mode)
{
proxy_ty *pp;
int result;
trace(("glue_creat()\n{\n"));
pp = proxy_find();
fputc(command_creat, pp->command);
put_string(pp->command, path);
put_int(pp->command, mode);
end_of_command(pp);
result = get_int(pp->reply);
if (result < 0)
er... | false | false | false | false | false | 0 |
Initialize()
{
if ( !m_Stream )
{
if ( m_FileName == "" )
{
m_FileName = "itkMessageLog.xml";
}
if ( m_Append )
{
m_Stream = new std::ofstream(m_FileName.c_str(), std::ios::app);
}
else
{
m_Stream = new std::ofstream( m_FileName.c_str() );
}
}
... | false | false | false | false | false | 0 |
canScatter(Event& event, int i) {
// Probability to accept
double p = 0.;
// Pions, K+, K-, p+, pbar- only
if (scatterProb == 1 || scatterProb == 2)
if (event[i].idAbs() != 111 && event[i].idAbs() != 211 &&
event[i].idAbs() != 321 && event[i].idAbs() != 2212)
return false;
// Probability
... | false | false | false | false | false | 0 |
hiragana_decode(char **str, char *yomi)
{
while (**str != 0x20)
*(yomi++) = *(*str)++;
(*str)++;
*yomi = '\0';
} | false | false | false | false | false | 0 |
ta_unmark_all(TA_S *f_line)
{
TA_S *ctmp;
for(ctmp = f_line; ctmp; ctmp = ctmp->next)
ctmp->checked = 0;
return 0;
} | false | false | false | false | false | 0 |
init_joy_config(void)
{
int i, k;
for (i = 0; i < 2; i++)
for (k = 0; k < 8; k++)
joycfg_buttons[i][k] = k;
} | false | false | false | false | false | 0 |
BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
{
unsigned int i,m;
unsigned int n;
BN_ULONG l;
BIGNUM *bn = NULL;
if (ret == NULL)
ret = bn = BN_new();
if (ret == NULL) return(NULL);
bn_check_top(ret);
l=0;
n=len;
if (n == 0)
{
ret->top=0;
return(ret);
}
i=((n-1)/BN_BYTES)+1;
m=((n-1)%... | false | false | false | true | false | 1 |
test_get_more_async (Test *test,
gconstpointer data)
{
GAsyncResult *result = NULL;
SecretService *service;
GError *error = NULL;
const gchar *path;
GList *collections;
secret_service_get (SECRET_SERVICE_LOAD_COLLECTIONS | SECRET_SERVICE_OPEN_SESSION, NULL, on_complete_get_result, &result);
... | false | false | false | false | false | 0 |
c2port_poll_in_busy(struct c2port_device *dev)
{
u8 addr;
int ret, timeout = 20;
do {
ret = (c2port_read_ar(dev, &addr));
if (ret < 0)
return -EIO;
if (!(addr & 0x02))
break;
udelay(1);
} while (--timeout > 0);
if (timeout == 0)
return -EIO;
return 0;
} | false | false | false | false | false | 0 |
myfgets(line,maxlen,fp)
char *line;
int maxlen;
ZFILE *fp;
{
int c = 0;
char *p;
p = line;
while((c=Zgetc(fp))!=EOF&&maxlen) {
*p++ = c;
maxlen--;
if (c=='\n') break;
if (c=='\r') {
c = Zgetc(fp);
if (c != EOF && c != '\n') Zungetc(c,fp);
*(p-1) = '\n';
break;
}
... | false | false | false | false | false | 0 |
carregaDadesPosicionsPeces(){
QString nomArxiuDades=configuracioJoc->arxiuDadesFigures.mid(0,
configuracioJoc->arxiuDadesFigures.length()-4);
nomArxiuDades.append(".aut");
nomArxiuDades=directoriLinux()+charPathSeparator+"auto"+charPathSeparator
+nomArxiuDades;
QFile arxiu(nomArxiuDade... | false | false | false | false | false | 0 |
IntrReturnObj ( void )
{
Obj val; /* return value */
/* ignore or code */
if ( IntrReturning > 0 ) { return; }
if ( IntrIgnoring > 0 ) { return; }
if ( IntrCoding > 0 ) { CodeReturnObj(); return; ... | false | false | false | false | false | 0 |
get_alias_set (tree t)
{
HOST_WIDE_INT set;
/* If we're not doing any alias analysis, just assume everything
aliases everything else. Also return 0 if this or its type is
an error. */
if (! flag_strict_aliasing || t == error_mark_node
|| (! TYPE_P (t)
&& (TREE_TYPE (t) == 0 || TREE_TYPE (t) ... | false | false | false | false | false | 0 |
brcms_intrsrestore(struct brcms_info *wl, u32 macintmask)
{
unsigned long flags;
spin_lock_irqsave(&wl->isr_lock, flags);
brcms_c_intrsrestore(wl->wlc, macintmask);
spin_unlock_irqrestore(&wl->isr_lock, flags);
} | false | false | false | false | false | 0 |
ssh_pki_export_privkey_to_pubkey(const ssh_key privkey,
ssh_key *pkey)
{
ssh_key pubkey;
if (privkey == NULL || !ssh_key_is_private(privkey)) {
return SSH_ERROR;
}
pubkey = pki_key_dup(privkey, 1);
if (pubkey == NULL) {
return SSH_ERROR;
}
... | false | false | false | false | false | 0 |
chk_mdports_named(struct inst_t *ip,
struct mod_t *mdp, struct expr_t **xphdr)
{
register int32 pi;
register struct mod_pin_t *mpp;
int32 pnum, __err_seen;
if ((pnum = mdp->mpnum) == 0) return(FALSE);
__err_seen = FALSE;
for (pi = 0; pi < pnum; pi++)
{
mpp = &(mdp->mpins[pi]);
if (mpp->mpsnam == NULL)
... | false | false | false | false | false | 0 |
echoListSplit3(echoScene *scene, echoObject *list, int depth) {
echoObject *ret, *tmp0, *tmp1;
if (!( echoTypeList == list->type ||
echoTypeAABBox == list->type ))
return NULL;
if (!depth)
return list;
ret = echoListSplit(scene, list, 0);
#define DOIT(obj, ax) ((obj) = echoListSplit(scene, ... | false | false | false | false | false | 0 |
avis_message_read (ByteBuffer *buffer, Message message, ElvinError *error)
{
uint32_t type = byte_buffer_read_int32 (buffer, error);
MessageFormat *format;
memset (message, 0, MAX_MESSAGE_SIZE);
if (elvin_error_occurred (error))
return false;
if ((format = message_format_for (type)) == NULL)
{
el... | false | false | false | false | false | 0 |
XOTclObjErrArgCnt(Tcl_Interp *interp, Tcl_Obj *cmdname, char *arglist) {
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "wrong # args: should be {", (char *) NULL);
if (cmdname) {
Tcl_AppendResult(interp, ObjStr(cmdname), " ", (char *) NULL);
}
if (arglist != 0) Tcl_AppendResult(interp, arglist, (char ... | false | false | false | false | false | 0 |
mc_part_std(H264Context *h, int n, int square, int chroma_height, int delta,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
int x_offset, int y_offset,
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
... | false | false | false | false | false | 0 |
escaped(const string &istring, const int pos)
{
return !(s_at(istring,pos-1) != '\\' || escaped(istring,pos-1));
} | false | false | false | false | false | 0 |
adv7511_edid_rd(struct v4l2_subdev *sd, u16 len, u8 *buf)
{
struct adv7511_state *state = get_adv7511_state(sd);
int i;
int err = 0;
v4l2_dbg(1, debug, sd, "%s:\n", __func__);
for (i = 0; !err && i < len; i += I2C_SMBUS_BLOCK_MAX)
err = adv_smbus_read_i2c_block_data(state->i2c_edid, i,
I2C_SMBUS_BLOC... | false | false | false | false | false | 0 |
modify_qp_mask(enum ib_qp_type qp_type, int mask)
{
switch (qp_type) {
case IB_QPT_XRC_INI:
return mask & ~(IB_QP_MAX_DEST_RD_ATOMIC | IB_QP_MIN_RNR_TIMER);
case IB_QPT_XRC_TGT:
return mask & ~(IB_QP_MAX_QP_RD_ATOMIC | IB_QP_RETRY_CNT |
IB_QP_RNR_RETRY);
default:
return mask;
}
} | false | false | false | false | false | 0 |
getDegreeNonDeleted(Node *node)
{
std::vector<DirectedEdge*> &edges=node->getOutEdges()->getEdges();
int degree=0;
for(unsigned int i=0; i<edges.size(); ++i) {
PolygonizeDirectedEdge *de=(PolygonizeDirectedEdge*)edges[i];
if (!de->isMarked()) ++degree;
}
return degree;
} | false | false | false | false | false | 0 |
insertFloatingObject(RenderObject *o)
{
// Create the list of special objects if we don't aleady have one
if (!m_floatingObjects) {
m_floatingObjects = new QList<FloatingObject*>;
}
else {
// Don't insert the object again if it's already in the list
QListIterator<FloatingObject*>... | false | false | false | true | false | 1 |
start()
{
QTimer::singleShot(30000, this, SLOT(timeout()));
if (m_service->m_busy || !m_service->m_ready) {
//enqueue and wait
m_service->m_queue.enqueue(this);
kDebug() << "already busy... enqueue, queue contains " << m_service->m_queue.count();
return;
}
// the servic... | false | false | false | false | false | 0 |
s_mpv_sqr_add_prop(const mp_digit *pa, mp_size a_len, mp_digit *ps)
{
#if !defined(MP_NO_MP_WORD) && !defined(MP_NO_MUL_WORD)
mp_word w;
mp_digit d;
mp_size ix;
w = 0;
#define ADD_SQUARE(n) \
d = pa[n]; \
w += (d * (mp_word)d) + ps[2*n]; \
ps[2*n] = ACCUM(w); \
w = (w >> DIGIT_BIT) + ps[2*n+... | false | false | false | false | false | 0 |
_pcomm_add_output_fd( list_t *list, int fd, int check_only,
uint8_t *data, size_t length,
pcomm_callback_ready ready_callback,
pcomm_callback_io io_callback,
pcomm_callback_ready ... | false | false | false | false | false | 0 |
prssyntaxerror(TSVectorParseState state)
{
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
state->is_tsquery ?
errmsg("syntax error in tsquery: \"%s\"", state->bufstart) :
errmsg("syntax error in tsvector: \"%s\"", state->bufstart)));
} | false | false | false | false | false | 0 |
process_starting_obs (char *stobs, int pd, int *pstructure,
double *psd0, int *pdated)
{
int structure = *pstructure;
double sd0 = 0.0;
int maybe_tseries = 1;
int dated = 0;
int err = 0;
if (structure == CROSS_SECTION ||
structure == STACKED_TIME_SERIES ||
structure == STACKED_CROSS_SE... | false | true | false | false | true | 1 |
setDepth(unsigned int depth)
{
if (depth < the_depth) {
the_depth = depth;
compact();
} else {
expand(depth);
the_depth = depth;
}
} | false | false | false | false | false | 0 |
getPointerToFunction(Function *F) {
if (F->isDeclaration() || F->hasAvailableExternallyLinkage()) {
bool AbortOnFailure = !F->hasExternalWeakLinkage();
void *Addr = getPointerToNamedFunction(F->getName(), AbortOnFailure);
addGlobalMapping(F, Addr);
return Addr;
}
// FIXME: Should we be using the ... | false | false | false | false | false | 0 |
nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, NMIP4Config *config)
{
NMDnsManagerPrivate *priv;
GError *error = NULL;
g_return_val_if_fail (mgr != NULL, FALSE);
g_return_val_if_fail (config != NULL, FALSE);
priv = NM_DNS_MANAGER_GET_PRIVATE (mgr);
/* Can't remove it if it wasn't in the list to begin wit... | false | false | false | false | false | 0 |
ascendingGenre(const GMTrackItem* pa,const GMTrackItem* pb){
const GMDBTrackItem * const ta = (GMDBTrackItem*)pa;
const GMDBTrackItem * const tb = (GMDBTrackItem*)pb;
register FXint a=0,b=0,x;
x = comparecase(ta->genre,tb->genre);
if (x!=0) return x;
if (begins_with_keyword(ta->artist)) a=FXMIN(ta->artis... | false | false | false | false | false | 0 |
sconf_ph_print_array(policy_hierarchy_t array[])
{
int i;
DENTER(TOP_LAYER, "sconf_ph_print_array");
for (i = INVALID_POLICY + 1; i < LAST_POLICY_VALUE; i++) {
char character = policy_hierarchy_enum2char(array[i-1].policy);
DPRINTF(("policy: %c; dependent: %d\n", character, array[i-1].d... | false | false | false | false | false | 0 |
setContents(GooString *new_content) {
annotLocker();
delete contents;
if (new_content) {
contents = new GooString(new_content);
//append the unicode marker <FE FF> if needed
if (!contents->hasUnicodeMarker()) {
contents->insert(0, 0xff);
contents->insert(0, 0xfe);
}
} else {
co... | false | false | false | false | false | 0 |
grecs_format_locus(grecs_locus_t *locus, struct grecs_format_closure *clos)
{
if (locus) {
char *str = NULL;
size_t size = 0;
if (locus->beg.col == 0)
grecs_asprintf(&str, &size, "%s:%u",
locus->beg.file,
locus->beg.line);
else if (strcmp(locus->beg.file, locus->end.file))
grecs_as... | false | false | false | false | false | 0 |
uinput_create(char *name)
{
struct uinput_dev dev;
int fd, err, i;
fd = open("/dev/uinput", O_RDWR);
if (fd < 0) {
fd = open("/dev/input/uinput", O_RDWR);
if (fd < 0) {
fd = open("/dev/misc/uinput", O_RDWR);
if (fd < 0) {
err = -errno;
error("Can't open input device: %s (%d)",
strerror(-er... | false | false | false | false | false | 0 |
encode(
BasicIo& io,
const byte* pData,
uint32_t size,
ByteOrder byteOrder,
const ExifData& exifData,
const IptcData& iptcData,
const XmpData& xmpData
)
{
// Copy to be able to modify the Exif data
ExifData ed = exi... | false | false | false | false | false | 0 |
UpdatePhysicalInput ()
{
SDL_Event event;
// loop, handling all pending events
while (SDL_PollEvent (&event))
{
switch (event.type)
{
case SDL_QUIT:
CloseGame ();
puts ("Quit");
break;
case SDL_FCEU_HOTKEY_EVENT:
switch (event.user.code)
{
case HK_PAUSE:
TogglePause ();
... | false | false | false | false | false | 0 |
jme_set_features(struct net_device *netdev, netdev_features_t features)
{
struct jme_adapter *jme = netdev_priv(netdev);
spin_lock_bh(&jme->rxmcs_lock);
if (features & NETIF_F_RXCSUM)
jme->reg_rxmcs |= RXMCS_CHECKSUM;
else
jme->reg_rxmcs &= ~RXMCS_CHECKSUM;
jwrite32(jme, JME_RXMCS, jme->reg_rxmcs);
spin_unlo... | false | false | false | false | false | 0 |
vmci_ctx_unset_notify(struct vmci_ctx *context)
{
struct page *notify_page;
spin_lock(&context->lock);
notify_page = context->notify_page;
context->notify = &ctx_dummy_notify;
context->notify_page = NULL;
spin_unlock(&context->lock);
if (notify_page) {
kunmap(notify_page);
put_page(notify_page);
}
} | false | false | false | false | false | 0 |
globus_l_gfs_pw_copy(
struct passwd * pw)
{
struct passwd * out_pw;
if(pw == NULL)
{
return NULL;
}
out_pw = (struct passwd *) malloc(sizeof(struct passwd));
if(out_pw == NULL)
{
return NULL;
}
out_pw->pw_name = pw->pw_nam... | false | false | false | false | false | 0 |
all_zeros_p (const_tree exp)
{
if (TREE_CODE (exp) == CONSTRUCTOR)
{
HOST_WIDE_INT nz_elts, init_elts;
bool complete_p;
categorize_ctor_elements (exp, &nz_elts, &init_elts, &complete_p);
return nz_elts == 0;
}
return initializer_zerop (exp);
} | false | false | false | false | false | 0 |
ladish_app_initiate_stop(struct ladish_app * app_ptr)
{
if (strcmp(app_ptr->level, LADISH_APP_LEVEL_LASH) == 0 &&
app_ptr->dbus_name != NULL &&
lash_client_proxy_quit(app_ptr->dbus_name))
{
log_info("LASH Quit initiated for '%s' with D-Bus name '%s'", app_ptr->name, app_ptr->dbus_name);
}
else
... | false | false | false | false | false | 0 |
GetConnectionState(const AddressOrGUID systemIdentifier)
{
if (systemIdentifier.systemAddress!=UNASSIGNED_SYSTEM_ADDRESS)
{
unsigned int i=0;
requestedConnectionQueueMutex.Lock();
for (; i < requestedConnectionQueue.Size(); i++)
{
if (requestedConnectionQueue[i]->systemAddress==systemIdentifier.sys... | false | false | false | false | false | 0 |
toAnnotPaths(const QList< QLinkedList<QPointF> > &inkPaths)
{
const int pathsNumber = inkPaths.size();
AnnotPath **res = new AnnotPath*[pathsNumber];
for (int i = 0; i < pathsNumber; ++i)
res[i] = toAnnotPath( inkPaths[i] );
return res;
} | false | false | false | false | false | 0 |
_flush( void)
{
XTRACE();
int len = ZSTREAM_BUFFSIZE - _stream.avail_out;
if( len)
{
_fstream.write( (char*)_outBuf, len);
_stream.next_out = _outBuf;
_stream.avail_out = ZSTREAM_BUFFSIZE;
}
} | false | false | false | false | false | 0 |
setTrackVisibility(int i, bool show)
{
QString x = show?"show": "hide";
QStringList scriptStr;
scriptStr
<< QString("trks[%1].%2();").arg(i).arg(x)
;
evaluateJS(scriptStr);
} | false | false | false | false | false | 0 |
_nrrdResampleVectorAllocateUpdate(NrrdResampleContext *rsmc) {
static const char me[]="_nrrdResampleVectorAllocateUpdate";
unsigned int axIdx, kpIdx, dotLen, minSamples;
nrrdResample_t spacingOut, support;
NrrdResampleAxis *axis;
if (rsmc->flag[flagKernels]
|| rsmc->flag[flagSamples]
|| rsmc->fla... | false | false | false | false | false | 0 |
x264_predict_16x16_v_c( pixel *src )
{
pixel4 v0 = MPIXEL_X4( &src[ 0-FDEC_STRIDE] );
pixel4 v1 = MPIXEL_X4( &src[ 4-FDEC_STRIDE] );
pixel4 v2 = MPIXEL_X4( &src[ 8-FDEC_STRIDE] );
pixel4 v3 = MPIXEL_X4( &src[12-FDEC_STRIDE] );
for( int i = 0; i < 16; i++ )
{
MPIXEL_X4( src+ 0 ) = v0;
... | false | false | false | false | false | 0 |
it8709_get_tx_used_slots(struct ite_dev *dev)
{
ite_dbg("%s called", __func__);
return it8709_rr(dev, IT85_C0TFSR) & IT85_TXFBC;
} | false | false | false | false | false | 0 |
SetContents (const char* const c)
{
ReleaseContents();
if (c) {
Contents = new std::string(c);
}
} | false | false | false | false | false | 0 |
daemon_init (Daemon *daemon)
{
daemon->priv = DAEMON_GET_PRIVATE (daemon);
daemon->priv->extension_ifaces = daemon_read_extension_ifaces ();
daemon->priv->users = create_users_hash_table ();
daemon->priv->passwd_monitor = setup_monitor (daemon,
... | false | false | false | false | false | 0 |
output_separated_file(
void *pUser, /* Pointer to row-count integer */
int nArg, /* Number of columns in this result row */
char **azArg, /* Text of data in all columns */
char **azName /* Names of the columns */
){
int *pCount = (int*)pUser;
int i;
if( *pCount==0 ){
for(i=0; i<nArg;... | false | false | false | false | false | 0 |
bam_tpos2qpos(const bam1_core_t *c, const uint32_t *cigar, int32_t tpos, int is_left, int32_t *_tpos)
{
int k, x = c->pos, y = 0, last_y = 0;
*_tpos = c->pos;
for (k = 0; k < c->n_cigar; ++k) {
int op = cigar[k] & BAM_CIGAR_MASK;
int l = cigar[k] >> BAM_CIGAR_SHIFT;
if (op == BAM_CMATCH) {
if (c->pos > tpos... | false | false | false | false | false | 0 |
fm10k_cache_ring_qos(struct fm10k_intfc *interface)
{
struct net_device *dev = interface->netdev;
int pc, offset, rss_i, i, q_idx;
u16 pc_stride = interface->ring_feature[RING_F_QOS].mask + 1;
u8 num_pcs = netdev_get_num_tc(dev);
if (num_pcs <= 1)
return false;
rss_i = interface->ring_feature[RING_F_RSS].indi... | false | false | false | false | false | 0 |
test_get_type(void)
{
hid_t dtype; /* datatype id */
H5I_type_t type_ret; /* return value */
/* Create a datatype id */
dtype = H5Tcopy(H5T_NATIVE_INT);
CHECK(dtype, FAIL, "H5Tcopy");
if (dtype < 0)
goto out;
/* Check that the ID is correct */
type_ret = H5Iget_... | false | false | false | false | false | 0 |
inheritEnv(char **env, const char **what)
{
char *value;
for (; *what; ++what)
if ((value = getenv(*what)))
env = setEnv(env, *what, value);
return env;
} | false | false | false | false | true | 1 |
scale(double scaleFactor)
{
agg::trans_affine_scaling scale(scaleFactor);
// Generate the tiling transform in pixel units
mOffset = mTileTransform * scale;
// The mInvert transform can transform coordinates from the pixel unit tiling
// to the unit square tiling.
if (mFrieze) {
... | false | false | false | false | false | 0 |
have_docstring(Node *n) {
String *str = Getattr(n, "feature:docstring");
return (str != NULL && Len(str) > 0) || (Getattr(n, "feature:autodoc") && !GetFlag(n, "feature:noautodoc"));
} | false | false | false | false | false | 0 |
valid_array_reference (name)
char *name;
{
char *t;
int r, len;
t = mbschr (name, '['); /* ] */
if (t)
{
*t = '\0';
r = legal_identifier (name);
*t = '[';
if (r == 0)
return 0;
/* Check for a properly-terminated non-blank subscript. */
len = skipsubscript (t, 0, 0)... | false | false | false | false | false | 0 |
print_separator_line(int percent, int ch, gf_io_t pc)
{
int i, start, len;
len = ps_global->ttyo->screen_cols * percent / 100;
start = (ps_global->ttyo->screen_cols - len)/2;
for(i=0; i<start; i++)
pc(' ');
for(i=start; i<start+len; i++)
pc(ch);
gf_puts(NEWLINE, pc);
} | false | false | false | false | false | 0 |
top(Node *n) {
if (out == 0) {
String *outfile = Getattr(n, "outfile");
Replaceall(outfile, ".cxx", ".xml");
Replaceall(outfile, ".cpp", ".xml");
Replaceall(outfile, ".c", ".xml");
out = NewFile(outfile, "w", SWIG_output_files());
if (!out) {
FileErrorDisplay(outfile);
SWIG_exi... | false | false | false | false | false | 0 |
gst_segment_clip_sink_setcaps (GstPad * pad, GstCaps * caps)
{
GstSegmentClip *self = GST_SEGMENT_CLIP (gst_pad_get_parent (pad));
GstSegmentClipClass *klass = GST_SEGMENT_CLIP_GET_CLASS (self);
gboolean ret;
GST_DEBUG_OBJECT (pad, "Setting caps: %" GST_PTR_FORMAT, caps);
ret = klass->set_caps (self, caps);
... | false | false | false | false | false | 0 |
atspi_hyperlink_get_index_range (AtspiHyperlink *obj, GError **error)
{
dbus_int32_t d_start_offset, d_end_offset;
AtspiRange *ret = g_new (AtspiRange, 1);
ret->start_offset = ret->end_offset = -1;
if (!obj)
return ret;
_atspi_dbus_call (obj, atspi_interface_hyperlink, "GetIndexRange", error, "=>ii", &... | false | false | false | false | false | 0 |
ajBtreeKeywildDel(AjPBtKeywild *Pthis)
{
AjPBtKeywild thys = NULL;
AjPStr id = NULL;
AjPBtPri pri = NULL;
if(!Pthis || !*Pthis)
return;
thys = *Pthis;
ajStrDel(&thys->keyword);
ajStrDel(&thys->prefix);
while(ajListPop(thys->idlist,(void **)&id))
ajStrDel(&id);
while(ajList... | false | false | false | false | false | 0 |
player_send_initial_update(client_t *client) {
int playerno;
player_t *player = &players[0];
for (playerno = 0; playerno < MAXPLAYERS; playerno++, player++) {
if (!PLAYER_USED(player))
continue;
player_to_network(player, PLAYER_DIRTY_ALL, client);
}
player_send_king_upd... | false | false | false | false | false | 0 |
symtab_value_free(struct symtab_value *sv)
{
GSList *sl;
symtab_value_check(sv);
GM_SLIST_FOREACH(sv->symbols, sl) {
symbol_entry_free(sl->data);
}
gm_slist_free_null(&sv->symbols);
sv->magic = 0;
WFREE(sv);
} | false | false | false | false | false | 0 |
on_notification_activate(GtkStatusIcon* icon, gpointer userdata) {
if (gnome_ppp.connected.show == TRUE) {
gtk_widget_hide (gnome_ppp.connected.window);
gnome_ppp.connected.show = FALSE;
} else {
gtk_widget_show (gnome_ppp.connected.window);
gnome_ppp.connected.show = TRUE;
}
} | false | false | false | false | false | 0 |
create_transfer (gftp_transfer * tdata)
{
if (tdata->fromreq->stopable)
return;
if (GFTP_IS_SAME_HOST_START_TRANS ((gftp_window_data *) tdata->fromwdata,
tdata->fromreq))
{
gftp_swap_socks (tdata->fromreq,
((gftp_window_data *) tdata->fromw... | false | false | false | false | false | 0 |
newque(struct ipc_namespace *ns, struct ipc_params *params)
{
struct msg_queue *msq;
int id, retval;
key_t key = params->key;
int msgflg = params->flg;
msq = ipc_rcu_alloc(sizeof(*msq));
if (!msq)
return -ENOMEM;
msq->q_perm.mode = msgflg & S_IRWXUGO;
msq->q_perm.key = key;
msq->q_perm.security = NULL;
r... | false | false | false | false | false | 0 |
st_widget_accessible_get_name (AtkObject *obj)
{
const gchar* name = NULL;
g_return_val_if_fail (ST_IS_WIDGET_ACCESSIBLE (obj), NULL);
name = ATK_OBJECT_CLASS (st_widget_accessible_parent_class)->get_name (obj);
if (name == NULL)
{
StWidget *widget = NULL;
widget = ST_WIDGET (atk_gobject_acce... | false | false | false | false | false | 0 |
nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb)
{
int pagemiss, cas, width, bpp;
int nvclks, mclks, pclks, crtpagemiss;
int found, mclk_extra, mclk_loop, cbs, m1, p1;
int mclk_freq, pclk_freq, nvclk_freq;
int us_m, us_n, us_p, crtc_drain_rate;
int cpm_us, us_crt, clwm;
pclk_freq = arb->pclk_k... | false | false | false | false | false | 0 |
_gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred,
const gnutls_datum_t * cert_list,
int cert_list_length, unsigned int *status)
{
int ret = 0;
gnutls_openpgp_crt_t key = NULL;
unsigned int verify = 0, verify_self = 0;
if (!cert_list... | false | false | false | false | false | 0 |
assign(const UVector& other, UElementAssigner *assign, UErrorCode &ec) {
if (ensureCapacity(other.count, ec)) {
setSize(other.count, ec);
if (U_SUCCESS(ec)) {
for (int32_t i=0; i<other.count; ++i) {
if (elements[i].pointer != 0 && deleter != 0) {
(*del... | false | false | false | false | false | 0 |
FCGX_StartFilterData(FCGX_Stream *stream)
{
FCGX_Stream_Data *data = (FCGX_Stream_Data *)stream->data;
if(data->reqDataPtr->role != FCGI_FILTER
|| !stream->isReader
|| !stream->isClosed
|| data->type != FCGI_STDIN) {
SetError(stream, FCGX_CALL_SEQ_ERROR);
retu... | false | false | false | false | false | 0 |
parse_str(const char *field, size_t length, pio_status_t *status)
{
if( length > 0 )
{
char *iid = (char *) malloc( sizeof( char ) * ( length + 1 ) );
strncpy( iid, field, length + 1 );
*status = PIO_OK;
return iid;
}
else
{
*status = PIO_ERROR;
retur... | false | false | false | false | false | 0 |
sug_compare(s1, s2)
const void *s1;
const void *s2;
{
suggest_T *p1 = (suggest_T *)s1;
suggest_T *p2 = (suggest_T *)s2;
int n = p1->st_score - p2->st_score;
if (n == 0)
{
n = p1->st_altscore - p2->st_altscore;
if (n == 0)
n = STRICMP(p1->st_word, p2->st_word);
}
return n;
} | false | false | false | false | false | 0 |
CWINDOW_must_quit()
{
int i;
gMainWindow *win;
for(i = 0; i < gMainWindow::count(); i++)
{
win = gMainWindow::get(i);
if (win->isTopLevel() && win->isOpened())
return false;
}
return true;
} | false | false | false | false | false | 0 |
printKCache(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
int KCacheMode = MI->getOperand(OpNo).getImm();
if (KCacheMode > 0) {
int KCacheBank = MI->getOperand(OpNo - 2).getImm();
O << "CB" << KCacheBank << ':';
int KCacheAddr = MI->getOperand(OpNo + 2).getImm();... | false | false | false | false | false | 0 |
subOpSCP(T_ASC_Association **subAssoc)
{
T_DIMSE_Message msg;
T_ASC_PresentationContextID presID;
if (!ASC_dataWaiting(*subAssoc, 0)) /* just in case */
return DIMSE_NODATAAVAILABLE;
OFCondition cond = DIMSE_receiveCommand(*subAssoc, opt_blockMode, opt_dimse_timeout, &presID,
&... | false | false | false | false | false | 0 |
bitset_copy_to(struct bitset *from, struct bitset *to)
{
unsigned long *src, *dest;
unsigned long i, size;
dest = to->bits;
src = from->bits;
size = max(from->size, to->size);
for (i = 0; i < size / BYTES_PER_LONG; i++)
dest[i] = src[i];
} | 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.