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 |
|---|---|---|---|---|---|---|
ifuIntegrateSpectra(cpl_table *spectra, int zero, int skip)
{
/* char task[] = "ifuIntegrateSpectra"; */
char colSpectrum[MAX_COLNAME];
double *buffer;
double *spectrum;
double sum;
int *y = cpl_table_get_data_int(spectra, "y");
int countFibers = N_BLOCKS * FIBERS_PER_BLOC... | false | false | false | false | false | 0 |
gen8_gmch_probe(struct drm_device *dev,
u64 *gtt_total,
size_t *stolen,
phys_addr_t *mappable_base,
u64 *mappable_end)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u64 gtt_size;
u16 snb_gmch_ctl;
int ret;
/* TODO: We're not aware of mappable constraints on gen8 yet */
*mappable... | false | false | false | false | false | 0 |
rcar_i2c_irq_send(struct rcar_i2c_priv *priv, u32 msr)
{
struct i2c_msg *msg = priv->msg;
/*
* FIXME
* sometimes, unknown interrupt happened.
* Do nothing
*/
if (!(msr & MDE))
return 0;
/*
* If address transfer phase finished,
* goto data phase.
*/
if (msr & MAT)
rcar_i2c_write(priv, ICMCR, RCA... | false | false | false | false | false | 0 |
cb_remote_names2 (GnmNamedExpr *nexpr,
G_GNUC_UNUSED gpointer value,
struct cb_remote_names *data)
{
Workbook *wb =
nexpr->pos.sheet ? nexpr->pos.sheet->workbook : nexpr->pos.wb;
if (wb != data->wb)
data->names = g_slist_prepend (data->names, nexpr);
} | false | false | false | false | false | 0 |
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gstflupesfilter_debug, "mpegpesfilter", 0,
"MPEG-TS/PS PES filter output");
GST_DEBUG_CATEGORY_INIT (gstflusectionfilter_debug, "mpegsectionfilter", 0,
"MPEG-TS Section filter output");
if (!gst_flups_demux_plugin_init (plugin))
return F... | false | false | false | false | false | 0 |
sil_interrupt(int irq, void *dev_instance)
{
struct ata_host *host = dev_instance;
void __iomem *mmio_base = host->iomap[SIL_MMIO_BAR];
int handled = 0;
int i;
spin_lock(&host->lock);
for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap = host->ports[i];
u32 bmdma2 = readl(mmio_base + sil_port[ap->port... | false | false | false | false | false | 0 |
ybounds(double a, double b) {
if (a != ymin || b != ymax) {
ymin = a; ymax = b;
redraw();
}
} | false | false | false | false | false | 0 |
php_get_xbm(php_stream *stream, struct gfxinfo **result TSRMLS_DC)
{
char *fline;
char *iname;
char *type;
int value;
unsigned int width = 0, height = 0;
if (result) {
*result = NULL;
}
if (php_stream_rewind(stream)) {
return 0;
}
while ((fline=php_stream_gets(stream, NULL, 0)) != NULL) {
... | true | true | true | false | true | 1 |
callback_poll(struct soap *soap, int timeout)
{
int poll = 5; /* 5 poll cycles max, ensures we make progress */
soap->accept_timeout = timeout;
soap->recv_timeout = timeout;
soap->send_timeout = 1; /* 1 sec I/O timeout */
printf("\n**** Callback Polling\n");
while (poll-- && soap_valid_socket(soap_accept... | false | false | false | false | false | 0 |
check_cancellable_cb (gpointer user_data)
{
CancelData *cancel_data = user_data;
GthBrowser *browser = cancel_data->browser;
if ((browser->priv->load_data_queue == NULL)
&& (browser->priv->load_file_data_queue == NULL)
&& (browser->priv->task == NULL)
&& (browser->priv->background_tasks == NULL))
{
... | false | false | false | false | false | 0 |
key_file_unuse (CamelKeyFile *bs)
{
GList *link;
LOCK (key_file_lock);
link = g_queue_find (&key_file_active_list, bs->priv);
if (link != NULL) {
g_queue_unlink (&key_file_active_list, link);
g_queue_push_tail_link (&key_file_list, link);
}
UNLOCK (key_file_lock);
CAMEL_KEY_FILE_UNLOCK (bs, lock);
} | false | false | false | false | false | 0 |
recv_file(const char *port)
{
int sockfd, portno, n, newsockfd;
struct sockaddr_in server_addr, cli_addr;
socklen_t clilen;
char *filename;
char buffer[MAX_BUF_LEN];
FILE *fp = NULL;
filename = NULL;
portno = atoi(port);
if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
... | false | false | false | false | true | 1 |
decode_create(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
{
__be32 *p;
uint32_t bmlen;
int status;
status = decode_op_hdr(xdr, OP_CREATE);
if (status)
return status;
if ((status = decode_change_info(xdr, cinfo)))
return status;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_overflo... | false | false | false | false | false | 0 |
_copy_cstr_into_lexer(Lexer* lex, const char* p, int n)
{
const int size = n + 1;
if (lex->tok_str_size < size) {
lex->tok_str = (char*) erealloc(lex->tok_str, size);
lex->tok_str_size = size;
}
memcpy(lex->tok_str, p, n);
lex->tok_str[n] = '\0';
return lex->tok_str;
} | false | false | false | false | false | 0 |
gui_set_cursor( int type )
{
int move = 0;
int x = -1, y;
if ( type >= CURSOR_COUNT ) type = 0;
if ( cursor != type ) {
x = gui->cursors->bkgnd->surf_rect.x + hspots[cursor].x;
y = gui->cursors->bkgnd->surf_rect.y + hspots[cursor].y;
move = 1;
}
cursor = type;
if ( m... | false | false | false | false | false | 0 |
photos_view_model_item_removed_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
{
PhotosBaseItem *item = PHOTOS_BASE_ITEM (user_data);
gboolean ret_val = FAL... | false | false | false | false | false | 0 |
setup_inheritance_datastore(struct ast_channel *chan)
{
struct ast_datastore *datastore = NULL;
struct audiohook_inheritance_datastore *audiohook_inheritance_datastore = NULL;
if (!(datastore = ast_datastore_alloc(&audiohook_inheritance_info, NULL))) {
return NULL;
}
if (!(audiohook_inheritance_datastore = ast... | false | false | false | false | false | 0 |
free_port(struct device *dev)
{
int d;
struct parport *port = to_parport_dev(dev);
spin_lock(&full_list_lock);
list_del(&port->full_list);
spin_unlock(&full_list_lock);
for (d = 0; d < 5; d++) {
kfree(port->probe_info[d].class_name);
kfree(port->probe_info[d].mfr);
kfree(port->probe_info[d].model);
kfree... | false | false | false | false | false | 0 |
actionPerformed(YAction *action, unsigned int /*modifiers*/) {
if (fListener) {
if (action == fButtonOK) {
fListener->handleMsgBox(this, mbOK);
} else if (action == fButtonCancel) {
fListener->handleMsgBox(this, mbCancel);
}
}
} | false | false | false | false | false | 0 |
bcmgenet_wol_power_up_cfg(struct bcmgenet_priv *priv,
enum bcmgenet_power_mode mode)
{
u32 cpu_mask_set;
u32 reg;
if (mode != GENET_POWER_WOL_MAGIC) {
netif_err(priv, wol, priv->dev, "invalid mode: %d\n", mode);
return;
}
reg = bcmgenet_umac_readl(priv, UMAC_MPD_CTRL);
reg &= ~MPD_EN;
bcmgenet_um... | false | false | false | false | false | 0 |
getPropertyList(QString name) const
{
Uri property = getPropertyUri(name);
Triples r = m_store->match(Triple(m_node, property, Node()));
QVariantList vl;
for (int i = 0; i < r.size(); ++i) {
vl.push_back(r[i].c.toVariant());
}
return vl;
} | false | false | false | false | false | 0 |
gst_base_video_encoder_sink_eventfunc (GstBaseVideoEncoder * base_video_encoder,
GstEvent * event)
{
GstBaseVideoEncoderClass *base_video_encoder_class;
gboolean ret = FALSE;
base_video_encoder_class =
GST_BASE_VIDEO_ENCODER_GET_CLASS (base_video_encoder);
switch (GST_EVENT_TYPE (event)) {
case ... | false | false | false | false | false | 0 |
build_mem_elf32_phdr(const char *buf, struct mem_ehdr *ehdr, int idx)
{
struct mem_phdr *phdr;
const char *pbuf;
Elf32_Phdr lphdr;
pbuf = buf + ehdr->e_phoff + (idx * sizeof(lphdr));
phdr = &ehdr->e_phdr[idx];
memcpy(&lphdr, pbuf, sizeof(lphdr));
if ( (elf32_to_cpu(ehdr, lphdr.p_filesz) > UINT32_MAX) ||
(elf3... | false | true | false | false | false | 1 |
_af_print_audioformat (AudioFormat *fmt)
{
/* sampleRate, channelCount */
printf("{ %7.2f Hz %d ch ", fmt->sampleRate, fmt->channelCount);
/* sampleFormat, sampleWidth */
switch (fmt->sampleFormat)
{
case AF_SAMPFMT_TWOSCOMP:
printf("%db 2 ", fmt->sampleWidth);
break;
case AF_SAMPFMT_UNSIGNED:
printf... | false | false | false | false | false | 0 |
dma_queue_emit_debugger_state (DmaDebuggerQueue *self, IAnjutaDebuggerState state, GError* err)
{
DEBUG_PRINT("update debugger state new %d old %d", state, self->debugger_state);
/* Add missing states if useful */
for(;self->debugger_state != state;)
{
IAnjutaDebuggerState next_state = state;
switch (state)... | false | false | false | false | false | 0 |
httpHdrContRangePackInto(const HttpHdrContRange * range, Packer * p)
{
assert(range && p);
httpHdrRangeRespSpecPackInto(&range->spec, p);
if (!known_spec(range->elength))
packerPrintf(p, "/*");
else
packerPrintf(p, "/%ld", (long int) range->elength);
} | false | false | false | false | false | 0 |
floatBottom() const
{
if (!m_floatingObjects) return 0;
int bottom=0;
FloatingObject* r;
QListIterator<FloatingObject*> it(*m_floatingObjects);
while ( it.hasNext() ) {
r = it.next();
if (r->endY>bottom)
bottom=r->endY;
}
return bottom;
} | false | false | false | false | false | 0 |
format_check (void *msgid_descr, void *msgstr_descr, bool equality,
formatstring_error_logger_t error_logger,
const char *pretty_msgid, const char *pretty_msgstr)
{
struct spec *spec1 = (struct spec *) msgid_descr;
struct spec *spec2 = (struct spec *) msgstr_descr;
bool err = false;
... | false | false | false | false | false | 0 |
getp_copy_from(VMG_ vm_obj_id_t self,
vm_val_t *retval, uint *argc)
{
static CVmNativeCodeDesc desc(4);
unsigned long dst_idx;
unsigned long src_idx;
unsigned long cnt;
vm_obj_id_t src_arr_id;
CVmObjByteArray *src_arr;
/* check arguments */
... | false | false | false | false | false | 0 |
setReuseAddress()
{
int opt=1;
if (setsockopt(myFD, SOL_SOCKET, SO_REUSEADDR,
(char*)&opt, sizeof(opt)) != 0)
{
myErrorStr="Failure to setsockopt REUSEADDR";
perror("setsockopt");
return(false);
}
else
return(true);
} | false | false | false | false | false | 0 |
handle_widget_event(SDL_Event *event)
{
struct widget *ui = get_active_ui();
if (ui)
ui->handle_event(ui, event);
} | false | false | false | false | false | 0 |
sync_unlock(struct gfs2_sbd *sdp, struct dlm_lksb *lksb, char *name)
{
struct lm_lockstruct *ls = &sdp->sd_lockstruct;
int error;
error = dlm_unlock(ls->ls_dlm, lksb->sb_lkid, 0, lksb, ls);
if (error) {
fs_err(sdp, "%s lkid %x error %d\n",
name, lksb->sb_lkid, error);
return error;
}
wait_for_compl... | false | false | false | false | false | 0 |
lookup_object_info_by_iface (GObject *object,
const char *iface,
gboolean fallback,
GType *out_iface_type)
{
LookupObjectInfoByIfaceData data;
data.iface = iface;
data.info = NULL;
data.fallback = fallback;
data.iface_type = 0;
foreach_object_info (object, lookup_obj... | false | false | false | false | false | 0 |
format_check (void *msgid_descr, void *msgstr_descr, bool equality,
formatstring_error_logger_t error_logger,
const char *pretty_msgid, const char *pretty_msgstr)
{
struct spec *spec1 = (struct spec *) msgid_descr;
struct spec *spec2 = (struct spec *) msgstr_descr;
bool err = false;
... | false | false | false | false | false | 0 |
SwitchParser(cbProject* project, ParserBase* parser)
{
if (!parser || parser == m_Parser || GetParserByProject(project) != parser)
{
TRACE(_T("NativeParser::SwitchParser(): No need to / cannot switch."));
return false;
}
TRACE(_T("NativeParser::SwitchParser()"));
SetParser(parser);... | false | false | false | false | false | 0 |
plugin_exec_with_num(GtkWidget *widget, gint num){
Plugin *plugin;
Documentable *doc = document_manager_get_current_documentable(main_window.docmg);
if (!doc) return;
GtkPluginManagerMenu *menu= GTK_PLUGIN_MANAGER_MENU (widget);
if (get_plugin_manager_items_count(menu->priv->plugmg) < num) return;
plugin =... | false | false | false | false | false | 0 |
Do(const Spectrum& in, Spectrum& out)
{
if ( !mConfig.GetPreserveOuts() )
{
out = in; //TODO big cludge for streaming
}
int nBands = mNumBandsCtl.GetLastValue();
int nGainBands = 5; //it is one more than the actual gains
int firstBand = 5;
TData fFirstBand = 100;
DataArray gains(4);
gains[0] = log2lin(m... | false | false | false | false | false | 0 |
netstat_foreach (Netinfo * netinfo, gchar * line, gsize len, gpointer user_data)
{
gchar *text_utf8;
gsize bytes_written;
GtkTextBuffer *buffer = NULL;
GtkTextIter iter;
g_return_if_fail (netinfo != NULL);
/*g_return_if_fail (line != NULL);*/
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (netinfo->output)... | false | false | false | false | false | 0 |
ed_al_check_len_cb(AW_window *aww)
{
char *error = 0;
char *use = aww->get_root()->awar("presets/use")->read_string();
GB_begin_transaction(GLOBAL_gb_main);
if (!error) error = (char *)GBT_check_data(GLOBAL_gb_main,use);
GB_commit_transaction(GLOBAL_gb_main);
if (error) aw_message(error);
fr... | false | false | false | false | false | 0 |
Scm_WriteBinaryF32(ScmObj sval, ScmPort *oport, ScmSymbol *endian)
{
swap_f32_t v;
ENSURE_OPORT(oport);
CHECK_ENDIAN(endian);
v.val = (float)Scm_GetDouble(sval);
SWAP_32(endian, v);
Scm_Putz(v.buf, 4, oport);
} | false | false | false | false | false | 0 |
xen_enable_sysenter(void)
{
int ret;
unsigned sysenter_feature;
#ifdef CONFIG_X86_32
sysenter_feature = X86_FEATURE_SEP;
#else
sysenter_feature = X86_FEATURE_SYSENTER32;
#endif
if (!boot_cpu_has(sysenter_feature))
return;
ret = register_callback(CALLBACKTYPE_sysenter, xen_sysenter_target);
if(ret != 0)
se... | false | false | false | false | false | 0 |
inv_create(Oid lobjId)
{
Oid lobjId_new;
/*
* Create a new largeobject with empty data pages
*/
lobjId_new = LargeObjectCreate(lobjId);
/*
* dependency on the owner of largeobject
*
* The reason why we use LargeObjectRelationId instead of
* LargeObjectMetadataRelationId here is to provide backward c... | false | false | false | false | false | 0 |
filledPolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, int color)
{
int result;
int i;
int y;
int miny, maxy;
int x1, y1;
int x2, y2;
int ind1, ind2;
int ints;
/*
* Sanity check
*/
if (n < 3) {
return -1;
}
/*
* Allocate t... | false | false | false | false | false | 0 |
reportinterval(aim_session_t *sess, aim_module_t *mod,
aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
{
int ret = 0;
aim_rxcallback_t userfunc;
fu16_t interval;
interval = aimbs_get16(bs);
if ((userfunc = aim_callhandler(sess, rx->conn, snac->family,
snac->subtype)))
ret = userfunc(sess, rx, int... | false | false | false | false | false | 0 |
input_darray(FILE *gfp, int n_values, double *array)
{
int i;
int read_items;
if ( n_values <= 0 ) return (0);
read_items = 0;
for ( i = 0; i < n_values; i++ )
{
skip_nondigit_lines(gfp);
if ( feof(gfp) ) break;
read_items += fscanf(gfp, "%lg", &array[i]);
if ( feof(gfp) ) bre... | false | false | false | false | false | 0 |
get_line_type(const char *line)
{
int linelen = strlen(line);
enum line_type type;
for (type = 0; type < ARRAY_SIZE(line_info); type++)
/* Case insensitive search matches Signed-off-by lines better. */
if (linelen >= line_info[type].linelen &&
!strncasecmp(line_info[type].line, line, line_info[type].linel... | false | false | false | false | false | 0 |
add_mailbox(Mailbox **list, char *path, char *desc) {
if (path != NULL) {
int i, j, k, gotPath = 0;
char tmpPath[FILE_NAME_LEN], tmpDesc[FILE_NAME_LEN];
i = 0;
while (1) {
if (path[i] == 0) break;
path += i;
i = 0;
while (isspace((int)(path[0]))) path++;
while (path[i] !... | false | false | false | false | false | 0 |
Set(const char *string)
{
double number;
int count = sscanf(string, "%lf", &number);
if (count != 1)
Throw("String '%s' is not a number", string);
Set(number);
} | false | false | false | false | false | 0 |
tangent(void)
{
double arg;
arg = POPn;
if (Cos(arg) == 0) runtime_error(_("invalid argument in tan"));
PSHn(Tan(arg));
} | false | false | false | false | false | 0 |
jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio) {
opj_jp2_box_t box;
int skip_len;
opj_common_ptr cinfo = jp2->cinfo;
jp2_read_boxhdr(cinfo, cio, &box);
do {
if (JP2_COLR != box.type) {
cio_skip(cio, box.length - 8);
jp2_read_boxhdr(cinfo, cio, &box);
}
} while(JP2_COLR != box.type);
jp2... | false | false | false | false | false | 0 |
s_bmul_d_add(const mp_digit *a, mp_size a_len, mp_digit b, mp_digit *d)
{
mp_digit a_i, a0b0, a1b1, carry = 0;
while (a_len--) {
a_i = *a++;
s_bmul_1x1(&a1b1, &a0b0, a_i, b);
*d++ ^= a0b0 ^ carry;
carry = a1b1;
}
*d ^= carry;
} | false | false | false | false | false | 0 |
inc_rec(ap_expr_eval_ctx_t *ctx)
{
if (ctx->reclvl < AP_EXPR_MAX_RECURSION) {
ctx->reclvl++;
return 0;
}
*ctx->err = "Recursion limit reached";
/* short circuit further evaluation */
ctx->reclvl = INT_MAX;
return 1;
} | false | false | false | false | false | 0 |
xbaeCreateBottomShadowClipGC(mw)
XbaeMatrixWidget mw;
{
XGCValues values;
XtGCMask mask = GCForeground | GCBackground;
/*
* GC for drawing bottom shadow inside cells with clipping.
*/
values.foreground = mw->manager.bottom_shadow_color;
values.background = mw->manager.foreground;
if ... | false | false | false | false | false | 0 |
mt7601u_burst_write_regs(struct mt7601u_dev *dev, u32 offset,
const u32 *data, int n)
{
const int max_regs_per_cmd = INBAND_PACKET_MAX_LEN / 4 - 1;
struct sk_buff *skb;
int cnt, i, ret;
if (!n)
return 0;
cnt = min(max_regs_per_cmd, n);
skb = alloc_skb(cnt * 4 + MT_DMA_HDR_LEN + 4, GFP_KERNEL);
if (!... | true | true | false | false | false | 1 |
ripoffline(int line, int (*init) (WINDOW *, int))
{
START_TRACE();
T((T_CALLED("ripoffline(%d,%p)"), line, init));
if (line == 0)
returnCode(OK);
returnCode(_nc_ripoffline((line < 0) ? -1 : 1, init));
} | false | false | false | false | false | 0 |
reserve_iova(struct iova_domain *iovad,
unsigned long pfn_lo, unsigned long pfn_hi)
{
struct rb_node *node;
unsigned long flags;
struct iova *iova;
unsigned int overlap = 0;
spin_lock_irqsave(&iovad->iova_rbtree_lock, flags);
for (node = rb_first(&iovad->rbroot); node; node = rb_next(node)) {
if (__is_range_o... | false | false | false | false | false | 0 |
amp_skin_expose(GtkWidget *wi, GdkEventExpose *ev)
{
GdkRegion *region;
region = gdk_region_rectangle (&wi->allocation);
gdk_region_intersect (region, ev->region);
GxPaintBox *paintbox = GX_PAINT_BOX(wi);
gint x0 = wi->allocation.x;
gint y0 = wi->allocation.y;
gint w = wi->allocation.widt... | false | false | false | false | false | 0 |
GFXarc (int argc, lvar_t *argv) {
Ggattr_t gattr;
Grect_t r;
Gpoint_t op;
Gsize_t sp;
int wi, rtn;
if (
getint (argv[0].o, &wi) == -1 || !ISAWIDGET (wi) || !ISACANVAS2 (wi) ||
getxy (argv[2].o, &op) == -1 || getxy (argv[3].o, &sp) == -1 ||
getgattr ((argc == 5) ? argv[4]... | false | false | false | false | false | 0 |
my_thread_init(void)
{
struct st_my_thread_var *tmp;
my_bool error=0;
if (!my_thread_global_init_done)
return 1; /* cannot proceed with unintialized library */
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): thread_id: 0x%lx\n",
(ulong) pthread_self());
#endif
if (my_pthread_ge... | false | false | false | false | false | 0 |
SetStatementPosition(Statement* stmt) {
#ifdef ENABLE_DEBUGGER_SUPPORT
if (!isolate()->debugger()->IsDebuggerActive()) {
CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
} else {
// Check if the statement will be breakable without adding a debug break
// slot.
BreakableStatementChecker ... | false | false | false | false | false | 0 |
totem_playlist_add_mrls (TotemPlaylist *self,
GList *mrls,
gboolean cursor,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
AddMrlsOperationData *operation_data;
... | false | false | false | false | false | 0 |
ci_populate_single_graphic_level(struct radeon_device *rdev,
u32 engine_clock,
u16 sclk_activity_level_t,
SMU7_Discrete_GraphicsLevel *graphic_level)
{
struct ci_power_info *pi = ci_get_pi(rdev);
int ret;
ret = ci_calculate_sclk_params(rdev, engine_clock, graphic_level);
if (ret)
retur... | false | false | false | false | false | 0 |
xmlParseURIHierPart(xmlURIPtr uri, const char **str) {
int ret;
const char *cur;
if (str == NULL)
return(-1);
cur = *str;
if ((cur[0] == '/') && (cur[1] == '/')) {
cur += 2;
ret = xmlParseURIAuthority(uri, &cur);
if (ret != 0)
return(ret);
i... | false | false | false | false | false | 0 |
reset()
{
QList <Player*> playerList = m_game->getPlayers();
for(int i = 0; i < playerList.count(); i++)
{
m_mapPlayerInfo.value(playerList[i])->bonusShieldDimm->setVisible(true);
m_mapPlayerInfo.value(playerList[i])->bonusThrowDimm->setVisible(true);
m_mapPlayerInfo.value(playerList... | false | false | false | false | false | 0 |
job_alloc_info(uint32_t uid, uint32_t job_id, struct job_record **job_pptr)
{
struct job_record *job_ptr;
job_ptr = find_job_record(job_id);
if (job_ptr == NULL)
return ESLURM_INVALID_JOB_ID;
if ((slurmctld_conf.private_data & PRIVATE_DATA_JOBS) &&
(job_ptr->user_id != uid) && !validate_operator(uid) &&
... | false | false | false | false | false | 0 |
value_update_csn( Slapi_Value *value, CSNType t, const CSN *csn)
{
if(value!=NULL)
{
csnset_update_csn(&value->v_csnset,t,csn);
}
return value;
} | false | false | false | false | false | 0 |
RTC_Init(RTC_InitTypeDef* RTC_InitStruct)
{
ErrorStatus status = ERROR;
/* Check the parameters */
assert_param(IS_RTC_HOUR_FORMAT(RTC_InitStruct->RTC_HourFormat));
assert_param(IS_RTC_ASYNCH_PREDIV(RTC_InitStruct->RTC_AsynchPrediv));
assert_param(IS_RTC_SYNCH_PREDIV(RTC_InitStruct->RTC_SynchPrediv)... | false | false | false | false | false | 0 |
entry_activate (ENameSelectorEntry *name_selector_entry)
{
gint cursor_pos;
gint range_start, range_end;
ENameSelectorEntryPrivate *priv;
EDestination *destination;
gint range_len;
const gchar *text;
gchar *cue_str;
cursor_pos = gtk_editable_get_position (GTK_EDITABLE (name... | false | false | false | false | false | 0 |
eraseMargin(bool top, u16 h)
{
if (mWidth % FW(1)) {
fillRect(FW(mCols), top ? 0 : FH(mRows - h), mWidth % FW(1), FH(h), 0);
}
if (mHeight % FH(1)) {
fillRect(0, FH(mRows), mWidth, mHeight % FH(1), 0);
}
} | false | false | false | false | false | 0 |
multi_io_send_reliable_force(net_player *pl)
{
// invalid
if((pl == NULL) || (NET_PLAYER_NUM(pl) >= MAX_PLAYERS)){
return;
}
// don't do it for single player
if(!(Game_mode & GM_MULTIPLAYER)){
return;
}
// send everything in
if(MULTIPLAYER_MASTER) {
psnet_rel_send(pl->reliable_socket, pl->s_info.rel... | false | false | false | false | false | 0 |
GIFEncode (xgdIOCtxPtr fp, int GInterlace,
int Background, int Transparent, int BitsPerPixel, int *Red,
int *Green, int *Blue, gGraphImagePtr img)
{
int B;
int RWidth, RHeight;
int LeftOfs, TopOfs;
int Resolution;
int ColorMapSize;
int InitCodeSize;
int i;
int GWidth = img->width... | false | false | false | false | true | 1 |
cmd_sym_find(char **arg)
{
regex_t find_preg;
char *expr = get_arg(arg);
if (!expr) {
stab_enum(stab_default, print_sym, NULL);
return 0;
}
if (regcomp(&find_preg, expr, REG_EXTENDED | REG_NOSUB)) {
printc_err("sym: failed to compile: %s\n", expr);
return -1;
}
stab_enum(stab_default, find_sym, &find_... | false | false | false | false | false | 0 |
i915_gem_object_put_fence(struct drm_i915_gem_object *obj)
{
struct drm_i915_private *dev_priv = obj->base.dev->dev_private;
struct drm_i915_fence_reg *fence;
int ret;
ret = i915_gem_object_wait_fence(obj);
if (ret)
return ret;
if (obj->fence_reg == I915_FENCE_REG_NONE)
return 0;
fence = &dev_priv->fence_... | false | false | false | false | false | 0 |
AcpiDsIsResultUsed (
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState)
{
const ACPI_OPCODE_INFO *ParentInfo;
ACPI_FUNCTION_TRACE_PTR (DsIsResultUsed, Op);
/* Must have both an Op and a Result Object */
if (!Op)
{
ACPI_ERROR ((AE_INFO, "Null Op"));
return_U... | false | false | false | false | false | 0 |
arrayiter_setstate(arrayiterobject *it, PyObject *state)
{
Py_ssize_t index = PyLong_AsSsize_t(state);
if (index == -1 && PyErr_Occurred())
return NULL;
if (index < 0)
index = 0;
it->index = index;
Py_RETURN_NONE;
} | false | false | false | false | false | 0 |
calcsize(text)
char *text;
{
unsigned size;
int token;
retext = text;
class_cnt = 0;
start_cnt = 1;
end_sp = 0;
size = 5;
while ((token = gettoken(&text, (regexp *)0)) != 0)
{
if (IS_CLASS(token))
{
size += 34;
}
else if (IS_META(token))
{
size += 2;
}
else
{
size++;
}
}
retur... | false | false | false | false | false | 0 |
dvb_usbv2_adapter_init(struct dvb_usb_device *d)
{
struct dvb_usb_adapter *adap;
int ret, i, adapter_count;
/* resolve adapter count */
adapter_count = d->props->num_adapters;
if (d->props->get_adapter_count) {
ret = d->props->get_adapter_count(d);
if (ret < 0)
goto err;
adapter_count = ret;
}
for (i... | false | false | false | false | false | 0 |
user_prompter_prompt_thread (GSimpleAsyncResult *simple,
GObject *object,
GCancellable *cancellable)
{
EDBusUserPrompter *dbus_prompter;
PrompterAsyncData *async_data;
GMainContext *main_context;
GError *local_error = NULL;
gulong handler_id;
g_return_if_... | false | false | false | false | false | 0 |
strnnew (const wchar_t *str, size_t n)
{
const wchar_t *t = str;
size_t len;
// Figure out how long this string is (remember, it might not be
// NUL-terminated).
for (len = 0;
len < n && *t++ != ACE_TEXT_WIDE ('\0');
len++)
continue;
wchar_t *s;
ACE_NEW_RETURN (s,
wc... | false | false | false | false | false | 0 |
gegl_sampler_get_from_buffer (GeglSampler *const sampler,
const gint x,
const gint y)
{
guchar *buffer_ptr;
gint dx;
gint dy;
gint sof;
const gint bpp =
babl_format_get_bytes_per_pixel (sampler->interpolate_format);
/... | false | false | false | false | false | 0 |
qselect_xml_destroy(qselect_handler_t *thiz, lList** alpp) {
if (thiz != NULL ) {
sge_dstring_free((dstring*)thiz->ctx);
FREE(thiz->ctx);
}
return 0;
} | false | false | false | false | false | 0 |
LastPlane()
{
return ((iColor == (ColorPlaneCount+StartPlane-1)) &&
(iRow == (unsigned int)(NumRows[iColor] - 1)) &&
(iPlane == ColorDepth[iColor]) // was pre-incremented
);
} | false | false | false | false | false | 0 |
computeFrequences(VibCorrections* vibCorrections)
{
gint nf = vibCorrections->numberOfFrequences;
gdouble f = vibCorrections->delta*vibCorrections->delta*AMU_TO_AU;
gint i;
for(i=0;i<nf;i++)
{
vibCorrections->calculatedFrequences[i]=sqrt(fabs((
vibCorrections->energies[0][2*i+1]+
vibCorrections->energies[0]... | false | false | false | false | false | 0 |
image_zoom( void * om[ ],
void * nm[ ],
int h,
int w,
int nh,
int nw,
int comp,
FL_IMAGE * im FL_UNUSED_ARG )
{
int *lut = fl_malloc( ( nw + 1 ) * sizeof *lut );
unsigned short **ngray... | true | true | false | false | false | 1 |
giggle_git_config_binding_new (GiggleGitConfig *config,
GiggleGitConfigField field,
GObject *object,
GParamSpec *pspec)
{
GiggleGitConfigBinding *binding;
binding = g_slice_new0 (GiggleGitConfigBinding);
binding->config = config;
binding->field = field;
b... | false | false | false | false | false | 0 |
config_get_one(config_t c, const char* key, int num)
{
config_elem_t elem = xhash_get(c->hash, key);
if(elem == NULL)
return NULL;
if(num >= elem->nvalues)
return NULL;
return elem->values[num];
} | false | false | false | false | false | 0 |
comp_real(const void *x, const void *y){
real *xx = (real*) x;
real *yy = (real*) y;
if (*xx > *yy){
return 1;
} else if (*xx < *yy){
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
anthy_create_mem_dic(void)
{
int i;
struct mem_dic *md;
md = anthy_smalloc(mem_dic_ator);
for (i = 0; i < HASH_SIZE; i++) {
md->seq_ent_hash[i] = NULL;
}
md->seq_ent_allocator =
anthy_create_allocator(sizeof(struct seq_ent),
seq_ent_dtor);
md->dic_ent_allocator =
anthy_create_alloca... | false | false | false | false | false | 0 |
findConnection(const QString &sid, const Jid &peer) const
{
IBBConnectionListIt it(d->activeConns);
for(IBBConnection *c; (c = it.current()); ++it) {
if(c->streamid() == sid && (peer.isEmpty() || c->peer().compare(peer)) )
return c;
}
return 0;
} | false | false | false | false | false | 0 |
taso_lue(FILE *f) {
int i;
unsigned char c;
Taso *k=getmem(sizeof(Taso));
fix_fread(&k->ac, 1, 4, f);
if(k->ac<0)
{
k->ac=0;
return(k);
}
k->al=getmem(sizeof(Alue*)*k->ac);
for (i=0; i<k->ac; i++) k->al[i]=alue_lue(f);
{
int phlag;
do {
phlag=0;
for (i=0; i<k->ac-1; i++... | false | false | false | false | false | 0 |
execute()
{
if( ! d->init() ) {
d->handleException();
return;
}
QString scriptCode = action()->code();
if( scriptCode.startsWith(QLatin1String("#!")) ) // remove optional shebang-line
scriptCode.remove(0, scriptCode.indexOf('\n'));
const QString fileName = action()->file().... | false | false | false | false | false | 0 |
Realloc_brush(word new_brush_width, word new_brush_height, byte *new_brush, byte **old_brush)
{
byte *new_smear_brush;
byte *new_brush_remapped;
word new_smear_brush_width;
word new_smear_brush_height;
byte new_brush_is_provided;
new_brush_is_provided = (new_brush!=NULL);
if (!new_brush_is_provided... | false | false | false | false | false | 0 |
HandleArenaPreparation(bool apply, bool Real)
{
if (!Real)
return;
Unit* target = GetTarget();
target->ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION, apply);
if (apply)
{
// max regen powers at start preparation
target->SetHealth(target->GetMaxHealth());
tar... | false | false | false | false | false | 0 |
opal_datatype_destroy( opal_datatype_t** dt )
{
opal_datatype_t* pData = *dt;
if( (pData->flags & OPAL_DATATYPE_FLAG_PREDEFINED) &&
(pData->super.obj_reference_count <= 1) )
return OPAL_ERROR;
OBJ_RELEASE( pData );
*dt = NULL;
return OPAL_SUCCESS;
} | false | false | false | false | false | 0 |
is_char_code_used(pdf_font_resource_t *pdfont, gs_char char_code)
{
pdf_char_proc_ownership_t *pcpo;
for (pcpo = pdfont->u.simple.s.type3.char_procs; pcpo != NULL; pcpo = pcpo->char_next) {
if (pcpo->char_code == char_code) {
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
dest_filter_changed_cb(GtkEditable *editable, gpointer data)
{
Dest_Data *dd = data;
GtkWidget *entry;
const gchar *buf;
gchar *path;
entry = GTK_BIN(dd->filter_combo)->child;
buf = gtk_entry_get_text(GTK_ENTRY(entry));
g_free(dd->filter);
dd->filter = NULL;
if (strlen(buf) > 0) dd->filter = g_strdup(buf);
... | false | false | false | false | false | 0 |
st_theme_node_geometry_equal (StThemeNode *node,
StThemeNode *other)
{
StSide side;
g_return_val_if_fail (ST_IS_THEME_NODE (node), FALSE);
if (node == other)
return TRUE;
g_return_val_if_fail (ST_IS_THEME_NODE (other), FALSE);
_st_theme_node_ensure_geometry (node);
_st_... | false | false | false | false | false | 0 |
DestroyInline(li, box)
HTMLInfo li;
HTMLBox box;
{
HTMLInline isp = (HTMLInline)box->closure;
if (isp->wn != NULL)
{
RenderDestroy(isp->wn);
isp->wn = NULL;
}
if (isp->wp != NULL)
{
SinkSetHooks(isp->wp, NULL, NULL);
isp->wp = NULL;
}
if (isp->wd != NULL)
{
GUIDestroy(isp->wd);
... | false | false | false | false | false | 0 |
finish_agent_init (gboolean on_startup)
{
int res;
if (InterlockedCompareExchange (&inited, 1, 0) == 1)
return;
if (agent_config.launch) {
char *argv [16];
// FIXME: Generated address
// FIXME: Races with transport_connect ()
argv [0] = agent_config.launch;
argv [1] = agent_config.transport;
argv [... | true | true | false | false | false | 1 |
setData(const QScriptValue &data)
{
QObject *object = data.toQObject();
if(RawData *codeRawData = qobject_cast<RawData*>(object))
{
if(!mImage.loadFromData(codeRawData->byteArray()))
{
throwError("ImageDataError", tr("Unable to set the image data"));
return thisObject();
}
}
else
mImage =... | 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.