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 |
|---|---|---|---|---|---|---|
GetStyleString()
{
if (m_pszStyleString == NULL)
{
m_pszStyleString = CPLStrdup(GetPenStyleString());
}
return m_pszStyleString;
} | false | false | false | false | false | 0 |
dir_hier_path(
const char* filename, const char* root, int fanout,
char* path, bool create
) {
char dir[256], dirpath[MAXPATHLEN];
int retval;
if (fanout==0) {
sprintf(path, "%s/%s", root, filename);
return 0;
}
filename_hash(filename, fanout, dir);
sprintf(dirpath, "%... | false | false | false | false | false | 0 |
dstrcatf(dstr_t *ds, const char *src, ...)
{
va_list ap;
size_t restlen = ds->alloc - ds->len;
size_t srclen;
va_start(ap, src);
srclen = vsnprintf(&ds->data[ds->len], restlen, src, ap);
va_end(ap);
if (srclen >= restlen) {
do {
ds->alloc *= 2;
restlen = ds-... | false | false | false | false | true | 1 |
directory_all_unreachable(time_t now)
{
connection_t *conn;
(void)now;
stats_n_seconds_working=0; /* reset it */
while ((conn = connection_get_by_type_state(CONN_TYPE_AP,
AP_CONN_STATE_CIRCUIT_WAIT))) {
entry_connection_t *entry_conn = TO_ENTRY_CONN(conn);
... | false | false | false | false | false | 0 |
reset(bool resetManualBones)
{
BoneList::iterator i;
for (i = mBoneList.begin(); i != mBoneList.end(); ++i)
{
if(!(*i)->isManuallyControlled() || resetManualBones)
(*i)->reset();
}
} | false | false | false | false | false | 0 |
ReportUnexpectedToken(Token::Value token) {
// We don't report stack overflows here, to avoid increasing the
// stack depth even further. Instead we report it after parsing is
// over, in ParseProgram/ParseJson.
if (token == Token::ILLEGAL && stack_overflow_) return;
// Four of the tokens are treated special... | false | false | false | false | false | 0 |
SelectShift(const Instruction *I,
ARM_AM::ShiftOpc ShiftTy) {
// We handle thumb2 mode by target independent selector
// or SelectionDAG ISel.
if (isThumb2)
return false;
// Only handle i32 now.
EVT DestVT = TLI.getValueType(DL, I->getType(), true);
if (DestVT != MVT::i32)... | false | false | false | false | false | 0 |
packed_host_unpack_addr(
const struct packed_host *phost, /* MUST be a pointer */
host_addr_t *addr_ptr)
{
g_assert(phost != NULL);
switch (phost->ha.net) {
case NET_TYPE_IPV4:
if (addr_ptr) {
/*
* Compiler hack alert!
*
* Ensure generated code will NEVER try to access the whole array
* sinc... | false | false | false | false | false | 0 |
mgslpc_write_room(struct tty_struct *tty)
{
MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
int ret;
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write_room"))
return 0;
if (info->params.mode == MGSL_MODE_HDLC) {
/* HDLC (frame oriented) mode */
if (info->tx_active)
return 0;
else
return ... | false | false | false | false | false | 0 |
instr_typify(struct instrdata *id) {
int i, len = id->instr_cnt, cnt, j, lh;
uint8 *instrs = id->instrs;
uint8 *bts;
if ( id->bts==NULL )
id->bts = galloc(len+1);
bts = id->bts;
for ( i=lh=0; i<len; ++i ) {
bts[i] = bt_instr;
++lh;
if ( instrs[i]==ttf_npushb ) {
/* NPUSHB */
bts[+... | false | false | false | false | false | 0 |
sirf_usp_pcm_runtime_resume(struct device *dev)
{
struct sirf_usp *usp = dev_get_drvdata(dev);
int ret;
ret = clk_prepare_enable(usp->clk);
if (ret) {
dev_err(dev, "clk_enable failed: %d\n", ret);
return ret;
}
sirf_usp_i2s_init(usp);
return 0;
} | false | false | false | false | false | 0 |
fix_file_permissions(const std::string &fname,bool executable) {
mode_t mode = S_IRUSR | S_IWUSR;
if(executable) { mode |= S_IXUSR; };
return (chmod(fname.c_str(),mode) == 0);
} | false | false | false | false | false | 0 |
show_shell_usage (fp, extra)
FILE *fp;
int extra;
{
int i;
char *set_opts, *s, *t;
if (extra)
fprintf (fp, _("GNU bash, version %s-(%s)\n"), shell_version_string (), MACHTYPE);
fprintf (fp, _("Usage:\t%s [GNU long option] [option] ...\n\t%s [GNU long option] [option] script-file ...\n"),
sh... | false | false | false | false | false | 0 |
globus_gram_job_manager_read_callback_contacts(
globus_gram_jobmanager_request_t * request,
FILE * fp)
{
globus_gram_job_manager_contact_t * contact;
globus_list_t ** tmp;
int count;
int ... | false | false | false | false | false | 0 |
onLeftBtnPress(FXObject*,FXSelector,void* ptr){
FXEvent* event=(FXEvent*)ptr;
FXint index;
flags&=~FLAG_TIP;
handle(this,FXSEL(SEL_FOCUS_SELF,0),ptr);
if(isEnabled()){
grab();
flags&=~FLAG_UPDATE;
// First change callback
if(target && target->tryHandle(this,FXSEL(SEL_LEFTBUTTONPRESS,message),... | false | false | false | false | false | 0 |
getchar_raw (void)
{
SDL_Event event;
int Returnkey = 0;
// keyboard_update (); /* treat all pending keyboard-events */
while ( !Returnkey )
{
SDL_WaitEvent (&event); /* wait for next event */
switch (event.type)
{
case SDL_KEYDOWN:
/*
* here we use the fact that, I ci... | false | false | false | false | false | 0 |
print_hex(uint32_t msg_len, uint8_t *msg_pt) {
uint8_t *temp = (uint8_t *) malloc(3 * msg_len + 1);
uint8_t *pt = temp;
int i;
for (i = 0; i < msg_len; i++) {
if (i == 0) {
sprintf((char *) pt, "%02x", msg_pt[i]);
pt += 2;
} else if (i % 4 == 0) {
sprintf((char *) pt, ":%02x", msg_pt[i]);
pt += 3;
... | false | true | false | false | false | 1 |
add_to_showcmd(c)
int c;
{
char_u *p;
int old_len;
int extra_len;
int overflow;
#if defined(FEAT_MOUSE)
int i;
static int ignore[] =
{
# ifdef FEAT_GUI
K_VER_SCROLLBAR, K_HOR_SCROLLBAR,
K_LEFTMOUSE_NM, K_LEFTRELEASE_NM,
# endif
K_IGNORE,
K_LEFTMOUSE, K_LEFTDRAG, K_LEFTRELEASE,
... | false | false | false | false | false | 0 |
__add_array (int32_t *dest, int32_t *src, int count)
{
int i = 0;
for (i = 0; i < count; i++) {
dest[i] = hton32 (ntoh32 (dest[i]) + ntoh32 (src[i]));
}
} | false | false | false | false | false | 0 |
lock_screen (GsmInhibitDialog *dialog)
{
GError *error;
error = NULL;
g_spawn_command_line_async ("gnome-screensaver-command --lock", &error);
if (error != NULL) {
g_warning ("Couldn't lock screen: %s", error->message);
g_error_free (error);
}
} | false | false | false | false | false | 0 |
rend_client_rendcirc_has_opened(origin_circuit_t *circ)
{
tor_assert(circ->_base.purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND);
log_info(LD_REND,"rendcirc is open");
/* generate a rendezvous cookie, store it in circ */
if (rend_client_send_establish_rendezvous(circ) < 0) {
return;
}
} | false | false | false | false | false | 0 |
unplug()
{
fakeDevice()->setProperty("isPlugged", false);
emit plugStateChanged(false, fakeDevice()->udi());
} | false | false | false | false | false | 0 |
reset_all()
{
std::list< CL_SharedPtr<CL_EventTrigger_Generic> >::iterator it;
for (it = triggers.begin(); it != triggers.end(); it++) (*it)->reset();
} | false | false | false | false | false | 0 |
stripe_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, dict_t *xdata)
{
xlator_list_t *trav = NULL;
stripe_local_t *local = NULL;
stripe_private_t *priv = NULL;
int32_t op_errno = EINVAL;
VALIDATE_OR_GOTO (frame, err);
VALIDATE_OR_GOTO (... | false | false | false | false | false | 0 |
applyQuarticFit(l_float32 a,
l_float32 b,
l_float32 c,
l_float32 d,
l_float32 e,
l_float32 x,
l_float32 *py)
{
l_float32 x2;
PROCNAME("applyQuarticFit");
if (!py)
return ERROR_INT("&y not defi... | false | false | false | false | false | 0 |
genie_tan_complex (NODE_T * p)
{
A68_REAL *im = (A68_REAL *) (STACK_OFFSET (-ALIGNED_SIZE_OF (A68_REAL)));
A68_REAL *re = (A68_REAL *) (STACK_OFFSET (-2 * ALIGNED_SIZE_OF (A68_REAL)));
double r, i;
A68_REAL u, v;
RESET_ERRNO;
r = VALUE (re);
i = VALUE (im);
PUSH_PRIMITIVE (p, r, A68_REAL);
PUSH_PRIMIT... | false | false | false | false | false | 0 |
copy_select_jobinfo(select_jobinfo_t *jobinfo)
{
struct select_jobinfo *rc = NULL;
if (jobinfo == NULL)
;
else if (jobinfo->magic != JOBINFO_MAGIC)
error("copy_jobinfo: jobinfo magic bad");
else {
rc = xmalloc(sizeof(struct select_jobinfo));
rc->dim_cnt = jobinfo->dim_cnt;
memcpy(rc->geometry, jobinfo->g... | false | false | false | false | false | 0 |
printDebugLoc(DebugLoc DL, const MachineFunction *MF,
raw_ostream &CommentOS) {
const LLVMContext &Ctx = MF->getFunction()->getContext();
if (!DL.isUnknown()) { // Print source line info.
DIScope Scope(DL.getScope(Ctx));
// Omit the directory, because it's likely to be lon... | false | false | false | false | false | 0 |
replace_newlines_to_str( const std::string& str_in, const std::string& replace )
{
if( str_in.empty() || replace.empty() ) return str_in;
std::string str_out;
str_out.reserve( str_in.length() );
size_t pos = 0, found = 0;
while( ( found = str_in.find_first_of( "\r\n", pos ) ) != std::string::npos ... | false | false | false | false | false | 0 |
gmpi_thr_destroy(gmpi_state_t *st)
{
if (st != NULL) {
if (st->tid != (pthread_t)-1) {
pthread_cancel(st->tid);
pthread_join(st->tid, NULL);
}
gmpi_state_destroy(st);
}
return SLURM_SUCCESS;
} | false | false | false | false | false | 0 |
bad_number_method(ScmObj *args, int nargs, ScmGeneric *gf)
{
const char *fn = (const char *)SCM_GENERIC_DATA(gf);
if (nargs == 1) {
Scm_Error("operation %s is not defined on object %S", fn, args[0]);
} else if (nargs == 2) {
Scm_Error("operation %s is not defined between %S and %S",
... | false | false | false | false | false | 0 |
get_contents(memory_file & contents) const
{
if(value != NULL)
contents.set_raw_data(*value);
else
contents.set_raw_data(storage(0));
} | false | false | false | false | false | 0 |
isString()
{
TY nty = next->toBasetype()->ty;
return nty == Tchar || nty == Twchar || nty == Tdchar;
} | false | false | false | false | false | 0 |
ep93xx_spi_read_write(struct ep93xx_spi *espi)
{
struct spi_message *msg = espi->current_msg;
struct spi_transfer *t = msg->state;
/* read as long as RX FIFO has frames in it */
while ((ep93xx_spi_read_u8(espi, SSPSR) & SSPSR_RNE)) {
ep93xx_do_read(espi, t);
espi->fifo_level--;
}
/* write as long as TX FIFO... | false | false | false | false | false | 0 |
match(InputText* textIn)
{
const uint8_t *input = textIn->fRawInput;
int32_t limit = (textIn->fRawLength / 4) * 4;
int32_t numValid = 0;
int32_t numInvalid = 0;
bool hasBOM = FALSE;
int32_t confidence = 0;
if (getChar(input, 0) == 0x0000FEFFUL) {
hasBOM = TRUE;
}
for(int32_... | false | false | false | false | false | 0 |
gog_tool_resize_object_render (GogView *view)
{
if (GOG_MANUAL_SIZE_AUTO == gog_object_get_manual_size_mode (view->model))
return;
gog_renderer_draw_grip (view->renderer,
view->allocation.x + view->allocation.w,
view->allocation.y + view->allocation.h);
} | false | false | false | false | false | 0 |
check_day_hour(bitfield *days, bitfield *hours, const time_t check)
{
struct tm *tp, t;
if (!days[INCLUDE] && !days[EXCLUDE] && !hours[INCLUDE] && !hours[EXCLUDE])
return 0;
if ( !(tp = localtime(&check)) )
return 2;
t = *tp; /* save result from further time.h functioncalls */
if ( hours[INCLUDE] && !(hour... | false | false | false | false | false | 0 |
pkix_pl_KeyComparator_Default(
PKIX_UInt32 *firstKey,
PKIX_UInt32 *secondKey,
PKIX_Boolean *pResult,
void *plContext)
{
/* Assume both keys are pointers to PKIX_UInt32 */
PKIX_UInt32 firstInt, secondInt;
PKIX_ENTER(HASHTABLE, "pkix_pl_KeyComparator_Default");
... | false | false | false | false | false | 0 |
process_perf(struct ib_device *ibdev, u8 port,
const struct ib_mad *in_mad,
struct ib_mad *out_mad)
{
struct ib_pma_mad *pmp = (struct ib_pma_mad *)out_mad;
int ret;
*out_mad = *in_mad;
if (pmp->mad_hdr.class_version != 1) {
pmp->mad_hdr.status |= IB_SMP_UNSUP_VERSION;
ret = reply((struct ib_smp *) pmp);... | false | false | false | false | false | 0 |
WI_initAnimatedBack(void)
{
int i;
anim_t* a;
if (gamemode == commercial)
return;
if (wbs->epsd > 2)
return;
for (i=0;i<NUMANIMS[wbs->epsd];i++)
{
a = &anims[wbs->epsd][i];
// init variables
a->ctr = -1;
// specify the next time to draw it
if (a->type == ANIM_ALWAYS)
a->nexttic... | false | false | false | false | false | 0 |
hash_pop(bool blocking)
{
struct work *work = NULL, *tmp;
int hc;
mutex_lock(stgd_lock);
if (!HASH_COUNT(staged_work)) {
/* Increase the queue if we reach zero and we know we can reach
* the maximum we're asking for. */
if (work_filled && max_queue < opt_queue) {
max_queue++;
work_filled = false;
}
... | false | false | false | true | false | 1 |
camel_folder_count_by_expression (CamelFolder *folder,
const gchar *expression,
GCancellable *cancellable,
GError **error)
{
CamelFolderClass *class;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
class = CAM... | false | false | false | true | false | 1 |
handle_action(struct linked_server *ls,
const void *data __attr_unused, size_t length __attr_unused)
{
if (ls->connection->client.reconnecting) {
uo_server_speak_console(ls->server,
"please wait until uoproxy finishes reconnecting");
return PA_DROP;
... | false | false | false | false | false | 0 |
es_ttf_fontFaces(sdl_data *sd, int len, char *buff)
{
char *bp, *start;
int sendlen;
TTF_Font *font;
long numfaces;
bp = buff;
POPGLPTR(font, bp);
numfaces = TTF_FontFaces(font);
start = bp = sdl_get_temp_buff(sd, 4);
put32be(bp, numfaces);
sendlen = bp - start... | false | false | false | false | false | 0 |
setCommon(FaxParam& parm, u_int v)
{
if (v != this->*parm.pv) {
if (0 < v && v < parm.NparmNames) {
if (command("%s %s", parm.cmd, parm.parmNames[v]) != COMPLETE) {
printError("%s", (const char*) lastResponse);
return (false);
}
} else {
printError(NLS::TEXT("Bad %s parameter value %u."), parm.... | false | false | false | false | false | 0 |
ui_pay_manage_dialog_remove(GtkWidget *widget, gpointer user_data)
{
struct ui_pay_manage_dialog_data *data;
guint32 key;
Payee *item;
gint result;
gboolean do_remove;
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
DB( g_print("(ui_pay_manage_dialog) remove (data=%... | false | false | false | false | false | 0 |
write_real_cst (const tree value)
{
if (abi_version_at_least (2))
{
long target_real[4]; /* largest supported float */
char buffer[9]; /* eight hex digits in a 32-bit number */
int i, limit, dir;
tree type = TREE_TYPE (value);
int words = GET_MODE_BITSIZE (TYPE_MODE (type)) /... | false | false | false | false | false | 0 |
peak_pciec_set_leds(struct peak_pciec_card *card, u8 led_mask, u8 s)
{
u8 new_led = card->led_cache;
int i;
/* first check what is to do */
for (i = 0; i < card->chan_count; i++)
if (led_mask & PCA9553_LED(i)) {
new_led &= ~PCA9553_LED_MASK(i);
new_led |= PCA9553_LED_STATE(s, i);
}
/* check if LS0 sett... | false | false | false | false | false | 0 |
note_get_default_ref(const char **out, git_repository *repo)
{
int ret;
git_config *cfg;
*out = NULL;
if (git_repository_config__weakptr(&cfg, repo) < 0)
return -1;
ret = git_config_get_string(out, cfg, "core.notesRef");
if (ret == GIT_ENOTFOUND) {
*out = GIT_NOTES_DEFAULT_REF;
return 0;
}
return ret;... | false | false | false | false | false | 0 |
Vector_Add( real* dest, real c, real* v, int k )
{
for( --k; k>=0; --k )
dest[k] += c * v[k];
} | false | false | false | false | false | 0 |
refcounted_strmap_free(refcounted_strmap *map)
{
if (!map)
return;
if (git_atomic_dec(&map->refcount) != 0)
return;
free_vars(map->values);
git__free(map);
} | false | false | false | false | false | 0 |
VowelChartDir(wxDC *dc, wxBitmap *bitmap)
{//=================================================
int ix;
int nf;
int count = 0;
SpectSeq *spectseq;
SpectFrame *frame1;
SpectFrame *frame2=NULL;
wxFileName filename;
wxString dir = wxDirSelector(_T("Directory of vowel files"),path_phsource);
if(dir.IsEmpty()) retu... | false | false | false | false | false | 0 |
dundi_helper(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *data, int flag)
{
struct dundi_result results[MAX_RESULTS];
int res;
int x;
int found = 0;
if (!strncasecmp(context, "macro-", 6)) {
if (!chan) {
ast_log(LOG_NOTICE, "Can't use macro mode without a channel... | false | false | false | false | false | 0 |
parse_node_finalize (ParseNode* obj) {
ParseNode * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PARSE_NODE, ParseNode);
_parser_unref0 (self->parser);
_parse_node_unref0 (self->parent);
_parse_node_unref0 (self->left);
_parse_node_unref0 (self->right);
_lexer_token_unref0 (self->token);
_g_free0 (self->va... | false | false | false | false | false | 0 |
clk_byte_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
struct clk_rcg2 *rcg = to_clk_rcg2(hw);
const struct freq_tbl *f = rcg->freq_tbl;
int index = qcom_find_src_index(hw, rcg->parent_map, f->src);
unsigned long parent_rate, div;
u32 mask = BIT(rcg->hid_width) - 1;
struct clk_hw *p;
... | false | false | false | false | false | 0 |
patricia_foreach_remove(patricia_t *pt, patricia_cbr_t cb, void *u)
{
struct remove_ctx ctx;
GSList *sl;
patricia_check(pt);
g_assert(cb);
ctx.sl = NULL;
ctx.last_was_removed = FALSE;
ctx.cb = cb;
ctx.u = u;
ctx.removed = 0;
patricia_traverse(pt,
patricia_traverse_foreach_node, &ctx,
patricia_traverse_... | false | false | false | false | false | 0 |
hasDeallocation(const Token *first, const Token *last)
{
// This function is called when no simple check was found for assignment
// to self. We are currently looking for a specific sequence of:
// deallocate member ; ... member = allocate
// This check is far from ideal because it can cause false nega... | false | false | false | false | false | 0 |
CalculateWorldTransform() const
{
const FCDSceneNode* parent = GetParent();
if (parent != NULL)
{
//FMMatrix44 tm1 = parent->CalculateWorldTransform();
//FMMatrix44 tm2 = CalculateLocalTransform();
//return tm1 * tm2;
return parent->CalculateWorldTransform() * CalculateLocalTransform();
}
else
... | false | false | false | false | false | 0 |
xtransformer_write(transformer_state_t *xstate, const void *buf, size_t bufsize)
{
ssize_t nwrote = transformer_write(xstate, buf, bufsize);
if (nwrote != (ssize_t)bufsize) {
xfunc_die();
}
return nwrote;
} | false | false | false | false | false | 0 |
setCurrentUserIsServerManager()
{
if (WarnAllProcesses)
qWarning() << Q_FUNC_INFO;
d->checkNullUser();
// if (userBase()->database().driverName()=="QSQLITE") {
// return false;
// }
if (!d->m_Sql->database().isOpen()) {
if (!d->m_Sql->database().open()) {
... | false | false | false | false | false | 0 |
init_swinst( void )
{
static int initialized = 0;
DEBUGMSGTL(("swinst", "init called\n"));
if (initialized)
return; /* already initialized */
/*
* call arch init code
*/
netsnmp_swinst_arch_init();
} | false | false | false | false | false | 0 |
exit_client(struct Client *client_p, /* The local client originating the
* exit or NULL, if this exit is
* generated by this server for
* internal reasons.
* This will not get any of the
* generated messages. */
struct Client *source_p, /* Client exiting */
struct Client *from, /... | false | false | false | false | false | 0 |
BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
{
int x, y;
uint8 *dstp;
uint8 *patp;
uint32 color32;
uint32 *dstp32;
if(hdcDest->brush->style == GDI_BS_SOLID)
{
color32 = gdi_get_color_32bpp(hdcDest, hdcDest->brush->color);
for (y = 0; y < nHeight; y++)
{
ds... | false | false | false | false | false | 0 |
_untagged_variant_declaration_free(struct bt_declaration *declaration)
{
struct declaration_untagged_variant *untagged_variant_declaration =
container_of(declaration, struct declaration_untagged_variant, p);
unsigned long i;
bt_free_declaration_scope(untagged_variant_declaration->scope);
g_hash_table_destroy(unt... | false | false | false | false | false | 0 |
bnx2_init_5706s_phy(struct bnx2 *bp, int reset_phy)
{
if (reset_phy)
bnx2_reset_phy(bp);
bp->phy_flags &= ~BNX2_PHY_FLAG_PARALLEL_DETECT;
if (BNX2_CHIP(bp) == BNX2_CHIP_5706)
BNX2_WR(bp, BNX2_MISC_GP_HW_CTL0, 0x300);
if (bp->dev->mtu > 1500) {
u32 val;
/* Set extended packet length bit */
bnx2_write_p... | false | false | false | false | false | 0 |
deviceSendDiscoverRequest(std::string deviceName, Address address, std::vector<std::string>* returnedNodes, std::vector<std::string>* returnedLeaves, std::vector<std::string>* returnedAttributes)
{
Device* currentDevice;
std::map<std::string, Device*>::iterator it;
std::map<std::string, Plugin*>::iterator it2;
//... | false | false | false | false | false | 0 |
Track(const Meta::TrackPtr& originalTrack)
: m_track( originalTrack )
, m_album( 0 )
, m_artist( 0 )
, m_composer( 0 )
, m_genre( 0 )
, m_year( 0 )
{
Q_ASSERT( originalTrack );
} | false | false | false | false | false | 0 |
session_logout_task(int sid, queue_task_t *qtask)
{
iscsi_session_t *session;
iscsi_conn_t *conn;
int rc = ISCSI_SUCCESS;
session = session_find_by_sid(sid);
if (!session) {
log_debug(1, "session sid %d not found.\n", sid);
return ISCSI_ERR_SESS_NOT_FOUND;
}
conn = &session->conn[0];
/*
* I... | false | false | false | false | false | 0 |
variables() const
{
vector<int> res;
for (Tvarmap::const_iterator it = vars.begin();
it != vars.end(); ++it) {
const Tlagmap& lmap = (*it).second;
for (Tlagmap::const_iterator itt = lmap.begin();
itt != lmap.end(); ++itt)
res.push_back((*itt).second);
}
return res;
} | false | false | false | false | false | 0 |
generate_histogram_rgb (Histogram histogram, gGraphImagePtr img)
{
int x;
int y;
int red;
int green;
int blue;
unsigned char *p_in;
ColorFreq *col;
zero_histogram_rgb (histogram);
for (y = 0; y < img->height; y++)
{
p_in = img->pixels + (y * img->scanline_width);
for (x... | false | false | false | false | false | 0 |
get_device_events_reply (DBusPendingCall *pending, void *user_data)
{
DBusMessage *reply = dbus_pending_call_steal_reply (pending);
DBusMessageIter iter, iter_array, iter_struct;
if (!reply)
goto done;
if (strncmp (dbus_message_get_signature (reply), "a(s", 3) != 0)
{
g_warning ("atk-bridge: get... | false | false | false | false | false | 0 |
mca_btl_openib_endpoint_cpc_complete(mca_btl_openib_endpoint_t *endpoint)
{
/* If the CPC uses the CTS protocol, then start it up */
if (endpoint->endpoint_local_cpc->cbm_uses_cts) {
int transport_type_ib_p = 0;
/* Post our receives, which will make credit management happy
(i.e., rd_c... | false | false | false | false | false | 0 |
parseString (vString *const string, const int delimiter)
{
boolean end = FALSE;
while (! end)
{
int c = fileGetc ();
if (c == EOF)
end = TRUE;
/*
else if (c == '\\')
{
c = fileGetc(); // This maybe a ' or ". //
vStringPut(string, c);
}
*/
else if (c == delimiter)
end = TRUE;
else
vSt... | false | false | false | false | false | 0 |
xmms_xml_init (xmms_xform_t *xform)
{
gchar *mime, *root_node = NULL;
root_node = get_root_node_name (xform);
if (!root_node) {
XMMS_DBG ("unable to find root node of xml document");
return FALSE;
}
mime = g_strconcat ("application/x-xmms2-xml+", root_node, NULL);
xmms_xform_outdata_type_add (xform,
... | false | false | false | false | false | 0 |
writeV5Config( const char *configFile,
const boost::shared_ptr<EncFSConfig> &config )
{
ConfigReader cfg;
cfg["creator"] << config->creator;
cfg["subVersion"] << config->subVersion;
cfg["cipher"] << config->cipherIface;
cfg["naming"] << config->nameIface;
cfg["keySize"] << config->keyS... | false | false | false | false | false | 0 |
bsched_free(bsched_t *bs)
{
GList *iter;
bsched_check(bs);
for (iter = bs->sources; iter; iter = g_list_next(iter)) {
bio_source_t *bio = iter->data;
bio_check(bio);
g_assert(bsched_get(bio->bws) == bs);
bio->bws = BSCHED_BWS_INVALID; /* Mark orphan source */
}
gm_list_free_null(&bs->sources);
gm_sli... | false | false | false | false | false | 0 |
ping_members(struct dlm_ls *ls)
{
struct dlm_member *memb;
int error = 0;
list_for_each_entry(memb, &ls->ls_nodes, list) {
error = dlm_recovery_stopped(ls);
if (error)
break;
error = dlm_rcom_status(ls, memb->nodeid, 0);
if (error)
break;
}
if (error)
log_rinfo(ls, "ping_members aborted %d last no... | false | false | false | false | false | 0 |
mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size){
AVCodecContext *avctx= s->avctx;
Mpeg1Context *s1 = (Mpeg1Context*)s;
/* start frame decoding */
if(s->first_field || s->picture_structure==PICT_FRAME){
if(MPV_frame_start(s, avctx) < 0)
return -1;
ff_er... | false | false | false | false | false | 0 |
cb_wbcg_drag_data_received (GtkWidget *widget, GdkDragContext *context,
gint x, gint y, GtkSelectionData *selection_data,
guint info, guint time, WBCGtk *wbcg)
{
gchar *target_type = gdk_atom_name (gtk_selection_data_get_target (selection_data));
if (!strcmp (target_type, "text/uri-list")) { /* filenam... | false | false | false | false | false | 0 |
parseMappedAttribute(MappedAttribute* attr)
{
if (attr->name() == SVGNames::clipPathUnitsAttr) {
if (attr->value() == "userSpaceOnUse")
setClipPathUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE);
else if (attr->value() == "objectBoundingBox")
setClipPathUnitsBaseVa... | false | false | false | false | false | 0 |
SetTrackLen(double trackLen)
{
mTrackLen = trackLen;
int len = mEnv.Count();
for (int i = 0; i < len; i++)
if (mEnv[i]->GetT() > mTrackLen) {
delete mEnv[i];
mEnv.RemoveAt(i);
len--;
i--;
}
} | false | false | false | false | false | 0 |
gadget_to_dummy_hcd(struct usb_gadget *gadget)
{
struct dummy *dum = container_of(gadget, struct dummy, gadget);
if (dum->gadget.speed == USB_SPEED_SUPER)
return dum->ss_hcd;
else
return dum->hs_hcd;
} | false | false | false | false | false | 0 |
sh_dmae_rst(struct sh_dmae_device *shdev)
{
unsigned short dmaor;
unsigned long flags;
spin_lock_irqsave(&sh_dmae_lock, flags);
dmaor = dmaor_read(shdev) & ~(DMAOR_NMIF | DMAOR_AE | DMAOR_DME);
if (shdev->pdata->chclr_present) {
int i;
for (i = 0; i < shdev->pdata->channel_num; i++) {
struct sh_dmae_chan... | false | false | false | false | false | 0 |
objc_add_method_declaration (bool is_class_method, tree decl, tree attributes)
{
if (!objc_interface_context)
{
/* PS: At the moment, due to how the parser works, it should be
impossible to get here. But it's good to have the check in
case the parser changes.
*/
fatal_error ("method declara... | false | false | false | false | false | 0 |
gda_ddl_creator_set_dest_from_file (GdaDDLCreator *ddlc, const gchar *xml_spec_file, GError **error)
{
g_return_val_if_fail (GDA_IS_DDL_CREATOR (ddlc), FALSE);
g_return_val_if_fail (xml_spec_file && *xml_spec_file, FALSE);
if (ddlc->priv->d_mstruct)
g_object_unref (ddlc->priv->d_mstruct);
ddlc->priv->d_mstruct ... | false | false | false | false | false | 0 |
test_dns_name_countlabels(char *test_name, unsigned int exp_nlabels) {
int result;
unsigned int nlabels;
isc_result_t dns_result;
dns_fixedname_t fixed;
dns_name_t *dns_name;
result = T_UNRESOLVED;
t_info("testing %s\n", test_name);
dns_fixedname_init(&fixed);
dns_name = dns_fixedname_name(&fixed);
dns_re... | false | false | false | false | false | 0 |
gnome_scan_param_widget_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
g_return_if_fail (GNOME_IS_SCAN_PARAM_WIDGET (object));
switch (prop_id)
{
case PROP_PARAM_SPEC:
/* TODO: Add getter for "param-spec" property here */
break;
case PROP_VALUE:
g_value_set_boxed (val... | false | false | false | false | false | 0 |
StartMultiplayerGame(PG_MessageObject* c): ConfigurableWindow( NULL, PG_Rect::null, "newmultiplayergame", false ), startButton(false), success(false), newMap(NULL), page(ModeSelection), mode ( 0 ), replay(true), supervisorEnabled(false),
mapParameterEditor(NULL), mapParameterEditorParent(NULL),
allianceSetup(NULL... | false | false | false | false | false | 0 |
showclient(rule)
const struct rule_t *rule;
{
char addr[MAXRULEADDRSTRING];
slog(LOG_INFO, "client-rule #%u, line #%lu",
rule->number, rule->linenumber);
slog(LOG_INFO, "verdict: %s", verdict2string(rule->verdict));
slog(LOG_INFO, "src: %s",
ruleaddress2string(&rule->src, addr, sizeof(addr)));
slog(LOG_INFO... | false | false | false | false | false | 0 |
ioc_release_fn(struct work_struct *work)
{
struct io_context *ioc = container_of(work, struct io_context,
release_work);
unsigned long flags;
/*
* Exiting icq may call into put_io_context() through elevator
* which will trigger lockdep warning. The ioc's are guaranteed to
* be different, use a dif... | false | false | false | false | false | 0 |
fileio_readall(fileio *self)
{
#ifdef HAVE_FSTAT
struct stat st;
Py_off_t pos, end;
#endif
PyObject *result;
Py_ssize_t total = 0;
int n;
size_t newsize;
if (self->fd < 0)
return err_closed();
if (!_PyVerify_fd(self->fd))
return PyErr_SetFromErrno(PyExc_IOError);
re... | false | false | false | false | false | 0 |
ParseAlloc(Instruction *&Inst, PerFunctionState &PFS) {
Value *Size = 0;
LocTy SizeLoc;
unsigned Alignment = 0;
Type *Ty = 0;
if (ParseType(Ty)) return true;
bool AteExtraComma = false;
if (EatIfPresent(lltok::comma)) {
if (Lex.getKind() == lltok::kw_align) {
if (ParseOptionalAlignment(Alignmen... | false | false | false | false | false | 0 |
get_traj(FILE *traj_fd, long long *traj_size, float *delay, long which)
#else
long long
get_traj(traj_fd, traj_size, delay, which)
FILE *traj_fd;
long long *traj_size;
float *delay;
long which;
#endif
{
long long traj_offset = 0;
long long tmp2 = 0;
int tmp = 0;
int tokens;
int ret=0;
char *ret1,*where;
char buf... | false | false | false | false | false | 0 |
Curl_ssl_config_matches(struct ssl_config_data* data,
struct ssl_config_data* needle)
{
if((data->version == needle->version) &&
(data->verifypeer == needle->verifypeer) &&
(data->verifyhost == needle->verifyhost) &&
safe_strequal(data->CApath, needle->CApath) &&
safe_streq... | false | false | false | false | false | 0 |
u_free_uhp(uhp)
u_header_T *uhp;
{
u_entry_T *nuep;
u_entry_T *uep;
uep = uhp->uh_entry;
while (uep != NULL)
{
nuep = uep->ue_next;
u_freeentry(uep, uep->ue_size);
uep = nuep;
}
vim_free(uhp);
} | false | false | false | false | false | 0 |
set (const ACEXML_URL_Addr &addr)
{
ACE_OS::free (this->path_name_);
ACE_OS::free (this->addr_string_);
if (this->ACE_INET_Addr::set (addr) == -1)
return -1;
else
{
if (addr.path_name_)
ACE_ALLOCATOR_RETURN (this->path_name_,
ACE_OS::strdup (addr.path_name_),
... | false | false | false | false | false | 0 |
gwy_delaunay_add_point(GwyDelaunayVertex *p, GwyDelaunayMesh *m)
{
gint i, j, k, attempt;
gdouble o;
simplex *new, *s, **update;
// If the list arguments are NULL, then we create local lists.
// Otherwise, we return the list of updates we did.
// This is so that we can easily perform point removal.
// T... | false | false | false | false | false | 0 |
NewSet( void )
#else
NewSet( )
#endif
{
setnum++;
if ( setnum==BitsPerWord ) /* is current setwd full? */
{
DumpSetWd(); NewSetWd(); setnum = 0;
}
} | false | false | false | false | false | 0 |
explain_buffer_errno_wait_explanation(explain_string_buffer_t *sb,
int errnum, const char *syscall_name, int *status)
{
/*
* http://www.opengroup.org/onlinepubs/009695399/functions/wait.html
*/
(void)status;
switch (errnum)
{
case ECHILD:
explain_buffer_no_outstanding_children(... | false | false | false | false | false | 0 |
ride()
{
if (ride_) return ride_;
// open the ride file
QFile file(path + "/" + fileName);
ride_ = RideFileFactory::instance().openRideFile(main, file, errors_);
if (ride_ == NULL) return NULL; // failed to read ride
setDirty(false); // we're gonna use on-disk so by
// def... | 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.