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 |
|---|---|---|---|---|---|---|
get_chunks_number(const GUTF8String &name)
// Returns the number of chunks with given fully qualified name
{
DEBUG_MSG("GIFFManager::get_chunks_number(): name='" << name << "'\n");
DEBUG_MAKE_INDENT(3);
int retval;
const int last_dot=name.rsearch('.');
if (last_dot<0)
{
retval=top_level->get_chunks_... | false | false | false | false | false | 0 |
cut_report_new (const gchar *name,
const gchar *first_property, ...)
{
CutModule *module;
GObject *report;
va_list var_args;
module = cut_report_load_module(name);
g_return_val_if_fail(module != NULL, NULL);
va_start(var_args, first_property);
report = cut_module_instantiat... | false | false | false | false | false | 0 |
str2iraf (string, irafstring, nchar)
char *string; /* 1-byte/character string */
char *irafstring; /* IRAF 2-byte/character string */
int nchar; /* Maximum number of characters in IRAF string */
{
int i, j, nc, nbytes;
nc = strlen (string);
/* Fill output string with zeroes */
nbytes = nchar * 2;
... | false | false | false | false | false | 0 |
wl12xx_sta_add(struct wl1271 *wl,
struct wl12xx_vif *wlvif,
struct ieee80211_sta *sta)
{
struct wl1271_station *wl_sta;
int ret = 0;
u8 hlid;
wl1271_debug(DEBUG_MAC80211, "mac80211 add sta %d", (int)sta->aid);
ret = wl1271_allocate_sta(wl, wlvif, sta);
if (ret < 0)
return ret;
wl_sta = (struct wl1... | false | false | false | false | false | 0 |
net_recv( void *ctx, unsigned char *buf, size_t len )
{
int ret = read( *((int *) ctx), buf, len );
if( ret < 0 )
{
if( net_is_blocking() != 0 )
return( POLARSSL_ERR_NET_WANT_READ );
#if defined(_WIN32) || defined(_WIN32_WCE)
if( WSAGetLastError() == WSAECONNRESET )
... | false | false | false | false | false | 0 |
H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
const hsize_t *max)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Check args */
HDassert(rank <= H5S_MAX_RANK);
HDassert(0 == ... | false | false | false | false | false | 0 |
writeAsSUM()
{
// sum data
double sum_data=0.0;
for(map<int,double>::iterator iter=m_save_map.begin();
iter!=m_save_map.end();
iter++){
sum_data+=iter->second;
}
// open file for appending
ofstream out_file(m_file_name.c_str(),ios::app);
// write data
out_file << sum_data << endl;
// c... | false | false | false | false | false | 0 |
lg_createPublicKeyObject(SDB *sdb, CK_KEY_TYPE key_type,
CK_OBJECT_HANDLE *handle, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
CK_ATTRIBUTE_TYPE pubKeyAttr = CKA_VALUE;
CK_RV crv = CKR_OK;
NSSLOWKEYPrivateKey *priv;
SECItem pubKeySpace = {siBuffer, NULL, 0};
SECItem *pubKey;
#ifdef NSS_ENABLE_... | true | true | false | false | false | 1 |
P_Clear_Output_Port (int argc, Object *argv) {
Discard_Output (argc == 1 ? argv[0] : Curr_Output_Port);
return Void;
} | false | false | false | false | false | 0 |
Analyze(HBasicBlock* block) {
TraceRange("Analyzing block B%d\n", block->block_id());
int last_changed_range = changed_ranges_.length() - 1;
// Infer range based on control flow.
if (block->predecessors()->length() == 1) {
HBasicBlock* pred = block->predecessors()->first();
if (pred->end()->IsCompareI... | false | false | false | false | false | 0 |
Create(wxWindow* parent, const wxString& title, wxString text)
{
m_allowEmpty = false;
SetParent(parent);
if (!wxXmlResource::Get()->LoadDialog(this, parent, _T("ID_INPUTDIALOG")))
return false;
SetTitle(title);
if (!XRCCTRL(*this, "wxID_OK", wxButton))
return false;
if (!XRCCTRL(*this, "wxID_CANCEL", wxB... | false | false | false | false | false | 0 |
search_datafile(int n,char **names,unsigned int *col,
unsigned int verbosity)
{
char valid=0,validcol=0;
char *retname=NULL;
int i;
unsigned int hcol;
FILE *test;
for (i=n-1;i>0;i--) {
if (names[i] != NULL) {
valid=0;
if (strcmp(names[i],"-")) {
if (col != 0)
validcol=look_for_c... | false | true | true | false | true | 1 |
ProcessQuery(PlannedStmt *plan,
const char *sourceText,
ParamListInfo params,
DestReceiver *dest,
char *completionTag)
{
QueryDesc *queryDesc;
elog(DEBUG3, "ProcessQuery");
/*
* Create the QueryDesc object
*/
queryDesc = CreateQueryDesc(plan, sourceText,
GetActiveSnapshot(), InvalidSn... | false | false | false | false | false | 0 |
lv_can_remove_split_from_lot(Split * split, GNCLot * lot)
{
GncInvoice *lot_invoice, *txn_invoice;
Transaction *txn;
lot_invoice = gncInvoiceGetInvoiceFromLot(lot);
txn = xaccSplitGetParent(split);
txn_invoice = gncInvoiceGetInvoiceFromTxn(txn);
if ( lot_invoice != NULL && lot_invoice == txn_in... | false | false | false | false | false | 0 |
clutter_animation_start (ClutterAnimation *animation)
{
ClutterTimeline *timeline;
timeline = clutter_animation_get_timeline_internal (animation);
if (G_LIKELY (timeline != NULL))
clutter_timeline_start (timeline);
else
{
/* sanity check */
g_warning (G_STRLOC ": no timeline found, unable ... | false | false | false | false | false | 0 |
otol(aDigit)
char aDigit;
{
long digit;
digit = -1;
if ((aDigit >= '0') && (aDigit <= '7')) digit = (long)(aDigit - '0');
if (digit < 0) {
eprinth (NULL);
eprintf ("\n Invalid digit \'%c\' in octal string \"%s\".\n",
aDigit, LV_const);
EXIT (1);
}
return (digit);
} | false | false | false | false | false | 0 |
pixcir_stop(struct pixcir_i2c_ts_data *ts)
{
int error;
/* Disable interrupt generation */
error = pixcir_int_enable(ts, false);
if (error) {
dev_err(&ts->client->dev,
"Failed to disable interrupt generation: %d\n",
error);
return error;
}
/* Exit ISR if running, no more report parsing */
ts->running... | false | false | false | false | false | 0 |
create_mi_node(char *name, int name_len,
char *value, int value_len, int flags)
{
struct mi_node *new;
int size_mem;
int name_pos;
int value_pos;
if (!name) name_len=0;
if (!name_len) name=0;
if (!value) value_len=0;
if (!value_len) value=0;
if (!name && !value)
return NULL;
size_mem = sizeof(st... | false | false | false | false | false | 0 |
dgap_ports_digi_flag_show(struct device *p,
struct device_attribute *attr,
char *buf)
{
struct board_t *bd;
int count = 0;
unsigned int i;
bd = dgap_verify_board(p);
if (!bd)
return 0;
for (i = 0; i < bd->nasync; i++)
count += snprintf(buf + count, PAGE_SIZE - count, "%d %x\n",
bd->channel... | false | false | false | false | false | 0 |
rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc)
{
unsigned int c, l;
if (e <= p)
return -1;
if (rb_enc_asciicompat(enc)) {
c = (unsigned char)*p;
if (!ISASCII(c))
return -1;
if (len) *len = 1;
return c;
}
l = rb_enc_precise_... | false | false | false | false | false | 0 |
CNF_GetBindAddress(int family, IPAddr *addr)
{
if (family == IPADDR_INET4)
*addr = bind_address4;
else if (family == IPADDR_INET6)
*addr = bind_address6;
else
addr->family = IPADDR_UNSPEC;
} | false | false | false | false | false | 0 |
_mpd_qpow_real(mpd_t *result, const mpd_t *base, const mpd_t *exp,
const mpd_context_t *ctx, uint32_t *status)
{
mpd_context_t workctx;
MPD_NEW_STATIC(texp,0,0,0,0);
if (!mpd_qcopy(&texp, exp, status)) {
mpd_seterror(result, MPD_Malloc_error, status);
return;
}
mpd_m... | false | false | false | false | false | 0 |
verify_raw_data(gint *data, size_t n, gint max) {
int i;
for(i = 0; i < n; i++) {
if(data[i] > max)
return i + 1;
}
return 0;
} | false | false | false | false | false | 0 |
updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
{
struct utmp u;
memset (&u, 0, sizeof (u));
u.ut_type = ut->ut_type;
u.ut_pid = ut->ut_pid;
if (ut->ut_line)
strncpy (u.ut_line, ut->ut_line, sizeof (u.ut_line));
if (ut->ut_id)
strncpy (u.ut_id, ut->ut_id, sizeof (u.ut_id));
... | false | true | false | false | false | 1 |
DoVerboseProperty (
Obj self,
Obj obj )
{
Obj val;
Int flag1;
Int flag2;
Obj kind;
Obj flags;
/* get the flags for the getter and the tester */
fla... | false | false | false | false | false | 0 |
actionDeletesPreOrAdd(Action *a, Action *b) {
for (int i = 0; i < numDels(a); i++) {
for (int j = 0; j < numPreconds(b); j++)
if (getDel(a,i) == getPrecond(b,j))
return true;
for (int j = 0; j < numAdds(b); j++)
if (getDel(a,i) == getAdd(b,j))
return true;
}
return fal... | false | false | false | false | false | 0 |
rs_init_gf(int poly)
{
int m, b, p, v;
// Return storage from previous setup
if (log) {
free(log);
free(alog);
free(rspoly);
rspoly = NULL;
}
// Find the top bit, and hence the symbol size
for (b = 1, m = 0; b <= poly; b <<= 1)
m++;
b >>= 1;
m--;
gfpoly = poly;
symsize = m;
// Calculate the log/a... | false | true | false | false | false | 1 |
layout_toolbar_add(LayoutWindow *lw, ToolbarType type, const gchar *action)
{
const gchar *path = NULL;
if (!action || !lw->ui_manager) return;
if (g_list_find_custom(lw->toolbar_actions[type], action, (GCompareFunc)strcmp)) return;
switch (type)
{
case TOOLBAR_MAIN:
path = "/ToolBar";
break;
case TO... | false | false | false | false | false | 0 |
_dxfgetobjgb(struct finfo *f, int id)
{
struct hashidtolist *he;
long lid = (long)id;
if (!f || !f->ol || !f->ht || id < 0)
return NULL;
/* is object id in hash table?
*/
he = (struct hashidtolist *)DXQueryHashElement(f->ht, (Key)&lid);
if (!he)
return NULL;
return &(he->ol-... | false | false | false | false | false | 0 |
mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field)
{
guint32 idx;
if (klass->image->dynamic) {
field = mono_metadata_get_corresponding_field_from_generic_type_definition (field);
return lookup_custom_attr (klass->image, field);
}
idx = find_field_index (klass, field);
idx <<= MONO_CUSTOM_AT... | false | false | false | false | false | 0 |
generate_multiset_while_guard(charlist * scalarsetlist)
{
charlist * sl;
fprintf(codefile, " while_guard = oldcount_multisetindex!=count_multisetindex;\n");
for (sl=scalarsetlist; sl!=NULL; sl = sl->next)
fprintf(codefile,
" while_guard = while_guard || (oldcount_%s!=count_%s);\n",
sl->e... | false | false | false | false | false | 0 |
retry_write(int fd, const void *buf, size_t nbyte)
{
int n;
int written = 0;
if (nbyte == 0) return 0;
for (;;) {
n = write(fd, buf, nbyte);
if (n == -1) {
if (errno == EINTR) continue;
return -1;
}
written += n;
if (((size_t) n) >= nbyte) return written;
buf += n;
nbyte -= n;
... | false | false | false | false | false | 0 |
refreshCheckConfigure(void)
{
refresh_check_helper *p = Config.Program.refresh_check;
if (p) {
requirePathnameExists("external_refresh_check", p->cmdline->key);
}
} | false | false | false | false | false | 0 |
take()
{
if (_type == GEARMAN_RESULT_BINARY and size())
{
gearman_string_t ret_string= value.string.take();
clear();
return ret_string;
}
static gearman_string_t ret= {0, 0};
return ret;
} | false | false | false | false | false | 0 |
transportEnc_LatmAdjustSubframeBits(HANDLE_LATM_STREAM hAss,
int *bits)
{
/* Substract bits from possible previous subframe */
*bits -= hAss->latmSubframeStart;
/* Add fill bits */
if (hAss->subFrameCnt == 0)
*bits += hAss->fillBits;
} | false | false | false | false | false | 0 |
bisho_frame_callback (BishoFrame *frame, const char *id, GHashTable *params)
{
BishoPane *pane;
pane = g_hash_table_lookup (frame->priv->panes, id);
if (pane)
bisho_pane_continue_auth (pane, params);
} | false | false | false | false | false | 0 |
LynxInitializeCutCxTable()
{
int Index;
long DeltaGate;
long DeltaDiff;
char Layer;
char GateLayer;
char DiffLayer;
long *Table;
int MbkLayer;
int TransType;
int CXType;
rdsbegin();
for ( MbkLayer = 0; MbkLayer < MBK_MAX_LAYER; MbkLayer++ )
{
TransType = GET_LYNX_TRANSI... | false | true | false | false | false | 1 |
expected_symbol_error (int c, parser *p)
{
const char *found = getsymb(p->sym, p);
parser_print_input(p);
if (*found == '\0') {
pprintf(p->prn, _("Expected '%c' but formula ended\n"), c);
} else {
pprintf(p->prn, _("Expected '%c' but found '%s'\n"), c,
found);
}
if (!strcmp(found, "&")) ... | false | false | false | false | false | 0 |
next(priv_dumper_t *dumper)
{
int statok;
for (;;) {
if (*dumper->argv) {
dumper->next__done = statok = 1;
if (!(freopen(*dumper->argv, "r", stdin))) {
bb_simple_perror_msg(*dumper->argv);
dumper->exitval = 1;
++dumper->argv;
continue;
}
} else {
if (dumper->next__done)
return 0; ... | false | false | false | false | false | 0 |
ffikye(fitsfile *fptr, /* I - FITS file pointer */
const char *keyname, /* I - keyword name */
float value, /* I - keyword value */
int decim, /* I - no of decimals */
const char *comm, /* I - keyword comment */... | false | false | false | false | false | 0 |
parseAttribute(AttributeImpl *attr)
{
switch(attr->id())
{
case ATTR_ALIGN:
{
DOMString v = attr->value().lower();
if ( strcmp( v, "middle" ) == 0 || strcmp( v, "center" ) == 0 )
addCSSProperty(CSS_PROP_TEXT_ALIGN, CSS_VAL__KHTML_CENTER);
else if (strcmp(v, "left") ==... | false | false | false | false | false | 0 |
PrepareRowForJpeg(rfbClientPtr cl,
uint8_t *dst,
int x,
int y,
int count)
{
if (cl->screen->serverFormat.bitsPerPixel == 32) {
if ( cl->screen->serverFormat.redMax == 0xFF &&
cl->screen->serverFormat.greenMax == 0xFF &&
... | false | false | false | false | false | 0 |
dspcreate(struct channel_req *crq)
{
struct dsp *ndsp;
u_long flags;
if (crq->protocol != ISDN_P_B_L2DSP
&& crq->protocol != ISDN_P_B_L2DSPHDLC)
return -EPROTONOSUPPORT;
ndsp = vzalloc(sizeof(struct dsp));
if (!ndsp) {
printk(KERN_ERR "%s: vmalloc struct dsp failed\n", __func__);
return -ENOMEM;
}
... | false | false | false | false | false | 0 |
user_hash_subs(const char *userid)
{
char *fname = xmalloc(strlen(config_dir) + sizeof(FNAME_DOMAINDIR) +
sizeof(FNAME_USERDIR) + strlen(userid) +
sizeof(FNAME_SUBSSUFFIX) + 10);
char c, *domain;
if (config_virtdomains && (domain = strchr(userid, '@'))) {
char d = (char) dir_hash_c(domain+1, con... | false | false | false | false | false | 0 |
FetchPointer(table, index)
PointerTable *table;
I index;
{
void *ptr;
if (table == NULL ||
index < 0 ||
index >= table->length ||
(ptr = table->ptr[index]) == (void *)(-1))
ptr = (void *)(-1);
R ptr;
} | false | false | false | false | false | 0 |
select_vector (int mx, int my, float s_f)
/* returns the bond that is closest to the current cursor position */
{
int v1, v2, v, d, x, y, tx, ty;
struct data *hpc, *hmin;
int vmin;
hpc = da_root.next;
vmin = 999999;
hmin = 0;
for (d = 0; d < hp->n; d++)
{
x = hpc->x * s_f;
tx = hpc->tx * ... | false | false | false | false | false | 0 |
procscript(const char* proc, const char* host, int32_t port, double tout,
bool bin, const char* swname, double swtime,
const char* ssname, bool ssbrd,
const std::map<std::string, std::string>& params) {
kt::RemoteDB db;
if (!db.open(host,... | false | false | false | false | false | 0 |
setup(char *in, fortress *_fort) {
if(in != NULL) {
input = malloc(sizeof(wchar_t) * strlen(in));
mbstowcs(input, in, strlen(in));
}
step_count = 0;
rock_pos = 4;
world = malloc(sizeof(int) * WORLD_SIZE);
workshops = malloc(sizeof(int) * WORLD_SIZE);
fort = _fort;
world[0] = 0;
world[1] = 0;
... | false | false | false | false | false | 0 |
set_event_mask(int index)
{
struct dev_info *dev = &devs[index];
/* The second byte is 0xff instead of 0x9f (two reserved bits
* disabled) since a Broadcom 1.2 dongle doesn't respond to the
* command otherwise */
uint8_t events[8] = { 0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x00, 0x00 };
/* Events for 1.2 and newe... | false | false | false | false | false | 0 |
SerializeColumns(DataStructures::Table *in, RakNet::BitStream *out)
{
const DataStructures::List<DataStructures::Table::ColumnDescriptor> &columns=in->GetColumns();
out->Write((unsigned)columns.Size());
unsigned i;
for (i=0; i<columns.Size(); i++)
{
StringCompressor::Instance()->EncodeString(columns[i].co... | false | false | false | false | false | 0 |
undoAction( const Context& context )
{
for ( vector<int>::iterator i = generatedMessages.begin(); i != generatedMessages.end(); ++i )
deleteMessage( *i );
return Command::undoAction(context );
} | false | false | false | false | false | 0 |
removeIP(const UINT8 ip[4])
{
#ifdef PAYMENT
return E_SUCCESS;
#else
UINT16 hashvalue=(ip[2]<<8)|ip[3];
SINT32 ret;
m_pMutex->lock();
PIPLIST entry=m_HashTable[hashvalue];
if(entry==NULL)
{
m_pMutex->unlock();
CAMsg::printMsg(LOG_INFO,"Try to remove IP which is not in the hashtable of the IP-li... | false | false | false | false | false | 0 |
totem_playlist_add_files (GtkWidget *widget, TotemPlaylist *playlist)
{
GSList *filenames, *l;
GList *mrl_list = NULL;
filenames = totem_add_files (totem_playlist_get_toplevel (playlist), NULL);
if (filenames == NULL)
return;
for (l = filenames; l != NULL; l = l->next) {
char *mrl = l->data;
mrl_list = g_l... | false | false | false | false | false | 0 |
saveSettings()
{
mSavedSettings.clear();
QSettings settings("grame.fr", "FaustWorks");
QStringList keys = settings.allKeys();
for ( int i = 0 ; i < keys.size() ; i++ )
{
mSavedSettings[keys[i]] = settings.value( keys[i] );
}
} | false | false | false | false | false | 0 |
init_p2t(p2t_t *p, void (*fkt)(uint8_t const *buf))
{
memset(p->pes,0,TS_SIZE);
p->counter = 0;
p->pos = 0;
p->frags = 0;
if (fkt) p->t_out = fkt;
else p->t_out = twrite;
} | false | false | false | false | false | 0 |
VisitIfStatement(IfStatement* node) {
ASSERT(!in_spilled_code());
Comment cmnt(masm_, "[ IfStatement");
// Generate different code depending on which parts of the if statement
// are present or not.
bool has_then_stm = node->HasThenStatement();
bool has_else_stm = node->HasElseStatement();
CodeForStateme... | false | false | false | false | false | 0 |
init(void)
{
MESSAGE_ITEM otemp;
otemp << "Linear enveloped initialized; length ";
otemp.setprecision(3);
otemp << stages_len_rep;
otemp << " seconds.";
ECA_LOG_MSG(ECA_LOGGER::user_objects, otemp.to_string());
} | false | false | false | false | false | 0 |
color_setXformSpec (
IP_XFORM_HANDLE hXform, /* in: handle for xform */
DWORD_OR_PVOID aXformInfo[]) /* in: xform information */
{
PCOL_INST g;
HANDLE_TO_PTR (hXform, g);
g->which_cnv = (IP_WHICH_CNV)aXformInfo[IP_CNV_COLOR_SPACE_WHICH_CNV].dword;
calcGammaTable (g, aXformInfo[IP_CNV... | false | false | false | false | false | 0 |
dispatchEvent(Event* e, ExceptionCode& ec, bool tempEvent)
{
Q_UNUSED(e);
Q_UNUSED(ec);
Q_UNUSED(tempEvent);
kDebug() << "dispatch event" << endl;
// TODO: This function will be removed in a follow-up patch!
/*EventTarget* target = this;
Node* useNode = shadowTreeParentElementForShadowTreeE... | false | false | false | false | false | 0 |
s5c73m3_set_timing_register_for_vdd(struct s5c73m3 *state)
{
static const u32 regs[][2] = {
{ 0x30100018, 0x0618 },
{ 0x3010001c, 0x10c1 },
{ 0x30100020, 0x249e }
};
int ret;
int i;
for (i = 0; i < ARRAY_SIZE(regs); i++) {
ret = s5c73m3_write(state, regs[i][0], regs[i][1]);
if (ret < 0)
return ret;
... | false | false | false | false | false | 0 |
GC_freehblk(hbp)
struct hblk *hbp;
{
struct hblk *next, *prev;
hdr *hhdr, *prevhdr, *nexthdr;
signed_word size;
GET_HDR(hbp, hhdr);
size = hhdr->hb_sz;
size = HBLKSIZE * OBJ_SZ_TO_BLOCKS(size);
GC_remove_counts(hbp, (word)size);
hhdr->hb_sz = size;
# ifdef USE_MUNMAP
hhdr -> hb_last_reclai... | false | false | false | false | false | 0 |
nlm_bind_host(struct nlm_host *host)
{
struct rpc_clnt *clnt;
dprintk("lockd: nlm_bind_host %s (%s)\n",
host->h_name, host->h_addrbuf);
/* Lock host handle */
mutex_lock(&host->h_mutex);
/* If we've already created an RPC client, check whether
* RPC rebind is required
*/
if ((clnt = host->h_rpcclnt) != ... | false | false | false | false | false | 0 |
DisplayPosition(
const FvwmWindow *tmp_win, const XEvent *eventp, int x, int y,int Init)
{
char str[100];
int offset;
fscreen_scr_arg fscr;
FlocaleWinString fstr;
if (Scr.gs.do_hide_position_window)
{
return;
}
position_geometry_window(eventp);
/* Translate x,y into local screen coordinates,
* in case Xi... | false | false | false | false | false | 0 |
dolmove_correct(node *p)
{ /* get final states for intermediate nodes */
long i;
long z0, z1, s0, s1, temp;
if (p->tip)
return;
for (i = 0; i < (words); i++) {
if (p->back == NULL) {
s0 = zeroanc[i];
s1 = oneanc[i];
} else {
s0 = treenode[p->back->index - 1]->statezero[i];
... | false | false | false | false | false | 0 |
sym_set_warm_start (sym_environment *env, warm_start_desc *ws)
{
if (!ws){
printf("sym_set_warm_start():The warm_start desc. is empty!\n");
return(FUNCTION_TERMINATED_ABNORMALLY);
}
warm_start_desc * ws_copy = create_copy_warm_start(ws);
sym_delete_warm_start(env->warm_start);
env->warm_... | false | false | false | false | false | 0 |
h264_write(struct ast_filestream *s, struct ast_frame *f)
{
int res;
unsigned int ts;
unsigned short len;
int mark;
if (f->frametype != AST_FRAME_VIDEO) {
ast_log(LOG_WARNING, "Asked to write non-video frame!\n");
return -1;
}
mark = ast_format_get_video_mark(&f->subclass.format) ? 0x8000 : 0;
if (f->subcl... | false | false | false | false | false | 0 |
gmpc_provider_music_tree_get_artist_art (GmpcProviderMusicTree* self, const gchar* directory, mpd_Song* song, GmpcPluginMetaDataCallback callback, void* callback_target, GAsyncReadyCallback _callback_, gpointer _user_data_) {
GmpcProviderMusicTreeGetArtistArtData* _data_;
GmpcProviderMusicTree* _tmp0_;
const gchar* ... | false | false | false | false | false | 0 |
uglymem_stats(STRPTR msg, STRPTR file, ULONG line, STRPTR date, STRPTR time)
{
/* statistics header */
fprintf(stderr, "MEMORY STATISTICS (%s)\n", msg);
if (file)
{
fprintf(stderr, "(\"%s\" (%lu), at %s, %s)\n",
file, line, date, time);
}
/* memory statistics */
fprintf(stderr, " bytes ... | false | false | false | false | false | 0 |
d_unnamed_type (struct d_info *di)
{
struct demangle_component *ret;
long num;
if (! d_check_char (di, 'U'))
return NULL;
if (! d_check_char (di, 't'))
return NULL;
num = d_compact_number (di);
if (num < 0)
return NULL;
ret = d_make_empty (di);
if (ret)
{
ret->type = DEMANGLE_CO... | false | false | false | false | false | 0 |
s3fb_ddc_read(struct s3fb_info *par)
{
if (s3fb_ddc_needs_mmio(par->chip))
return readb(par->mmio + DDC_MMIO_REG);
else
return vga_rcrt(par->state.vgabase, DDC_REG);
} | false | false | false | false | false | 0 |
g_netbuf_trim(GNetBuf *msg, guint len)
{
if (msg->len > len) {
msg->len = len;
msg->tail = msg->data+len;
}
} | false | false | false | false | false | 0 |
liblistappend(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj lists_scm;
ScmObj lists;
ScmObj SCM_SUBRARGS[2];
int SCM_i;
SCM_ENTER_SUBR("append");
for (SCM_i=0; SCM_i<2; SCM_i++) {
SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
}
lists_scm = SCM_SUBRARGS[SCM_ARGCNT-1];
lists = (lists_scm);
{
{
... | false | false | false | false | false | 0 |
send_line(const char *src, unsigned int len, int eol_flag)
{
int max;
int i = 0, j = 0;
static char *buf = NULL;
static int buflen = 0;
if (!xsock ||
(xsock->constate != SS_CONNECTED && !(xsock->flags & SOCKECHO)))
{
eprintf("Not connected.");
return 0;
}
if (xsock && ... | false | false | false | true | false | 1 |
cally_util_simulate_snooper_install (void)
{
ClutterStageManager *stage_manager = NULL;
ClutterStage *stage = NULL;
GSList *stage_list = NULL;
GSList *iter = NULL;
stage_manager = clutter_stage_manager_get_default ();
stage_list = clutter_stage_manager_list_stages (stage_manager);
for (iter = stage_list... | false | false | false | false | false | 0 |
ComputeNormal( GLUtesselator *tess, GLdouble norm[3], int check )
/*
* If check==FALSE, we compute the polygon normal and place it in norm[].
* If check==TRUE, we check that each triangle in the fan from v0 has a
* consistent orientation with respect to norm[]. If triangles are
* consistently oriented CCW, return ... | false | false | false | false | false | 0 |
EffectDisEnchant(SpellEffectIndex /*eff_idx*/)
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
{ return; }
Player* p_caster = (Player*)m_caster;
if (!itemTarget || !itemTarget->GetProto()->DisenchantID)
{ return; }
p_caster->UpdateCraftSkill(m_spellInfo->Id);
((Player*)m_caster)->Se... | false | false | false | false | false | 0 |
SNSDisplay_Field ( char *p_field_name, char *p_field, int len )
{
int indx;
if (p_field != NULL)
{
__LOG_INFO ("%-19s : ", p_field_name);
for (indx = 0; indx < len; indx++)
__LOG_INFO ("%2.2x", *(unsigned char *)&p_field[ indx ]);
__LOG_INFO ("\n");
}
} | false | false | false | false | false | 0 |
xfs_attrmulti_attr_remove(
struct inode *inode,
unsigned char *name,
__uint32_t flags)
{
int error;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
return -EPERM;
error = xfs_attr_remove(XFS_I(inode), name, flags);
if (!error)
xfs_forget_acl(inode, name, flags);
return error;
} | false | false | false | false | false | 0 |
connect(struct sockaddr *server_addr, int addrlen) {
int fd;
if (this->fFd != -1) {
::close(this->fFd);
this->fFd = -1;
}
fd = socket(PF_INET, SOCK_STREAM, 0);
if (fd == -1)
return -errno;
if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) {
::close(fd);
return... | false | false | false | false | false | 0 |
get_file_in_dir(fname, dname)
char_u *fname;
char_u *dname; /* don't use "dirname", it is a global for Alpha */
{
char_u *t;
char_u *tail;
char_u *retval;
int save_char;
tail = gettail(fname);
if (dname[0] == '.' && dname[1] == NUL)
retval = vim_strsave(fname);
else if (dname[0... | false | false | false | false | false | 0 |
handle_template(const char *tmpl, const char *args)
{
char *args_dup = NULL;
char *p, *p_old;
char **argsp = NULL;
unsigned int argcnt = 0, template_idx, i;
char *eval_text;
if ((sscanf(tmpl, "template%u", &template_idx) != 1) ||
(template_idx >= MAX_TEMPLATES) || !template[template_idx])
return NULL;
i... | false | false | false | false | false | 0 |
bgav_vc1_sequence_header_dump(const bgav_vc1_sequence_header_t * h)
{
bgav_dprintf("VC-1 sequence header\n");
bgav_dprintf(" profile: %d\n", h->profile);
if(h->profile == PROFILE_ADVANCED)
{
bgav_dprintf(" level: %d\n", h->h.adv.level);
bgav_dprintf(" chromaformat: %d\n",... | false | false | false | false | false | 0 |
hasShaderBasedTechnique(const String& materialName,
const String& groupName,
const String& srcTechniqueSchemeName,
const String& dstTechniqueSchemeName) const
{
OGRE_... | false | false | false | false | false | 0 |
parseTerm() throw(Error)
{
auto_ptr< BoolExpr<string> > left(parseFactor());
if (!tokenSeen("&"))
return left.release();
skipToken("&");
BoolExpr<string> *right = parseTerm(); // may throw
return new BoolExpr<string>(BoolExpr<string>::AND, left.release(), right);
} | false | false | false | false | false | 0 |
report_build(const FoundSet& found_set, const sharedptr<const Report>& report)
{
//Create a DOM Document with the XML:
xmlpp::DomParser dom_parser;;
xmlpp::Document* pDocument = dom_parser.get_document();
xmlpp::Element* nodeRoot = pDocument->get_root_node();
if(!nodeRoot)
{
//Add it if it isn't there ... | false | false | false | false | false | 0 |
LoadAssetContributor(FCDObject* object, xmlNode* contributorNode)
{
FCDAssetContributor* assetContributor = (FCDAssetContributor*)object;
bool status = true;
for (xmlNode* child = contributorNode->children; child != NULL; child = child->next)
{
if (child->type != XML_ELEMENT_NODE) continue;
fm::stri... | false | false | false | false | false | 0 |
AppendIncludeDirectories(
cmGeneratedFileStream& fout,
const std::vector<std::string>& includeDirs,
std::set<std::string>& emittedDirs)
{
for(std::vector<std::string>::const_iterator inc = includeDirs.begin();
inc != includeDirs... | false | false | false | false | false | 0 |
_test_box_in_grid(int dim, int curr,
int *start, int *end, int dims)
{
int i;
int start_curr = curr;
for (i=start[dim]; i<=end[dim]; i++) {
curr = start_curr + (i * offset[dim]);
if(dim == (dims-1)) {
if(!grid[curr])
return false;
} else {
if(!_test_box_in_grid(dim+1, curr, start, end, dims))
... | false | false | false | false | false | 0 |
globus_gram_job_manager_request_load_all(
globus_gram_job_manager_t * manager)
{
int rc = GLOBUS_SUCCESS;
char * state_file_pattern = NULL;
GlobusGramJobManagerLock(manager);
globus_gram_job_manager_log(
manager,
... | false | false | false | false | false | 0 |
gegl_extension_handler_register_util (GHashTable **handlers,
const gchar *extension,
const gchar *handler)
{
/* Case fold so we get case insensitive extension comparisions */
gchar *ext = g_utf8_casefold (extension, -1);
if (!*handler... | false | false | false | false | false | 0 |
toString() const
{
return "[" + description() + "] " + fieldList().toString();
} | false | false | false | false | false | 0 |
use_pack_expansion_extra_args_p (tree parm_packs,
int arg_pack_len,
bool has_empty_arg)
{
/* If one pack has an expansion and another pack has a normal
argument or if one pack has an empty argument and an another
one hasn't then tsubst_pack_expansion cannot perform the
substitution and need t... | false | false | false | false | false | 0 |
integrity_iint_find(struct inode *inode)
{
struct integrity_iint_cache *iint;
if (!IS_IMA(inode))
return NULL;
read_lock(&integrity_iint_lock);
iint = __integrity_iint_find(inode);
read_unlock(&integrity_iint_lock);
return iint;
} | false | false | false | false | false | 0 |
eina_array_flush(Eina_Array *array)
{
EINA_SAFETY_ON_NULL_RETURN(array);
EINA_MAGIC_CHECK_ARRAY(array);
array->count = 0;
array->total = 0;
if (!array->data)
return;
free(array->data);
array->data = NULL;
} | false | false | false | false | false | 0 |
esl_rsq_CReverse(const char *s, char *rev)
{
int L, i;
char c;
L = strlen(s);
for (i = 0; i < L/2; i++)
{ /* swap ends */
c = s[L-i-1];
rev[L-i-1] = s[i];
rev[i] = c;
}
if (L%2) { rev[i] = s[i]; } /* don't forget middle residue in odd-length s */
rev[L] = '\0';
... | false | false | false | false | false | 0 |
gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
{
GstAudioTestSrc *src = GST_AUDIO_TEST_SRC (basesrc);
GstClockTime time;
GST_DEBUG_OBJECT (src, "seeking %" GST_SEGMENT_FORMAT, segment);
time = segment->last_stop;
src->reverse = (segment->rate < 0.0);
/* now move to the time indic... | false | false | false | false | false | 0 |
get_glue(res_state statp, ns_class class, int opts, rrset_ns *nsrrsp) {
rr_ns *nsrr, *nsrr_n;
u_char *resp;
resp = malloc(NS_MAXMSG);
if (resp == NULL)
return(-1);
/* Go and get the A RRs for each empty NS RR on our list. */
for (nsrr = HEAD(*nsrrsp); nsrr != NULL; nsrr = nsrr_n) {
ns_msg msg;
int n;
n... | false | false | false | false | false | 0 |
wide_strtoverdec(int32 blen)
{
register char *chp;
word32 *reg10, *newdig, *acc;
int32 wlen;
struct xstk_t *xsp;
wlen = wlen_(blen);
push_xstk_(xsp, blen);
/* build the constant 10 */
reg10 = xsp->ap;
memset(reg10, 0, wlen*WRDBYTES);
reg10[0] = 10;
/* and use b part to hold new digit to add */
newdig = xsp... | false | true | false | false | false | 1 |
Includes16x9HD(const std::vector<VideoFormat>& formats) {
std::vector<VideoFormat>::const_iterator i;
for (i = formats.begin(); i != formats.end(); ++i) {
if ((i->height >= 720) && (i->width * 9 == i->height * 16)) {
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
Frdbyte()
{
struct stream *strm;
int ch;
int flg;
flg = *FLAGPTR(argStkPtr);
if(flg != fSTREAM || !isinpfile(argStkPtr,BINARY)) {
error(rdbytesym,err_binp,voidsym);
return(brkerr());
}
strm = STREAMPTR(argStkPtr);
ch = fgetc(strm->file);
return(mksfixnum(ch));
} | 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.