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 |
|---|---|---|---|---|---|---|
default_parameter_type(
char *why, imp_sth_t *imp_sth, phs_t *phs)
{
struct imp_dbh_st *imp_dbh = NULL;
imp_dbh = (struct imp_dbh_st *)(DBIc_PARENT_COM(imp_sth));
if (imp_sth->odbc_default_bind_type != 0) {
return imp_sth->odbc_default_bind_type;
} else {
/* MS Access can return an ... | false | false | false | false | false | 0 |
_addto_nodelist(List nodelist, int *start, int *end)
{
int *coord = NULL;
int i;
coord = xmalloc(sizeof(int) * params.cluster_dims);
for (i = 0; i < params.cluster_dims; i++) {
xassert(start[i] >= 0);
coord[i] = start[i];
if (end[i] < dim_size[i])
continue;
fatal("It appears the slurm.conf file has chan... | false | false | false | false | false | 0 |
gsb_fyear_config_append_line ( GtkTreeModel *model,
gint fyear_number,
GtkTreeIter *iter_to_fill )
{
gchar *invalid;
GtkTreeIter local_iter;
GtkTreeIter *iter_ptr;
if (iter_to_fill)
iter_ptr = iter_to_fill;
else
iter_ptr = &local_iter;
if ( gsb_data_fyear_get_invalid (fyear_n... | false | false | false | false | false | 0 |
backarg_expand( char *buf, const int len, const char *fmt,
const char *dname, const char *dpath,
const char *host, struct tm *tm )
{
int i, r = 1, strf_expand = 0;
int special = 0;
char b[ ARG_BUF_SIZE + 1 ], c;
Cary ca;
cary_init( &ca, b, sizeof(b) );
for( i = 0 ; ( c = fmt[ i ] ) && r ; i++ )
{
if( c ==... | true | true | false | false | false | 1 |
should_load_proto(struct iptables_command_state *cs)
{
if (cs->protocol == NULL)
return false;
if (find_proto(cs->protocol, XTF_DONT_LOAD,
cs->options & OPT_NUMERIC, NULL) == NULL)
return true;
return cs->proto_used;
} | false | false | false | false | false | 0 |
eio_futime (int fd, double atime, double mtime, int pri, eio_cb cb, void *data, eio_channel *channel)
{
REQ (EIO_FUTIME); req->int1 = fd; req->nv1 = atime; req->nv2 = mtime; SEND;
} | false | false | false | false | false | 0 |
sb16_audio_trigger(int dev, int bits)
{
sb_devc *devc = audio_devs[dev]->devc;
int bits_16 = bits & devc->irq_mode_16;
bits &= devc->irq_mode;
if (!bits && !bits_16)
sb_dsp_command(devc, 0xd0); /* Halt DMA */
else
{
if (bits)
{
switch (devc->irq_mode)
{
case IMODE_INPUT:
sb16_audio_start_in... | true | true | false | false | false | 1 |
getint (unsigned char **sp)
{
int n;
if ( !((*sp)[0] < INFOKEY_RADIX && (*sp)[1] < INFOKEY_RADIX) )
return -1;
n = (*sp)[0] + (*sp)[1] * INFOKEY_RADIX;
*sp += 2;
return n;
} | false | false | false | false | false | 0 |
setGravity(const btVector3& gravity)
{
m_gravity = gravity;
for ( int i=0;i<m_collisionObjects.size();i++)
{
btCollisionObject* colObj = m_collisionObjects[i];
btRigidBody* body = btRigidBody::upcast(colObj);
if (body)
{
body->setGravity(gravity);
}
}
} | false | false | false | false | false | 0 |
__add_conta_pnd0del(struct conta_t *cap, struct mod_t *mdp,
char *sdfmsg)
{
register int32 i, bi;
struct conta_t *pbcap;
/* make sure gate can have delay */
if (cap->lhsx->getpatlhs)
{
/* rnotice error here will stop simulation */
__bld_lineloc(__xs, cap->casym->syfnam_ind, cap->casym->sylin_cnt);
if (... | false | false | false | false | false | 0 |
EmitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override {
if (const MCSymbolRefExpr *SRE = dyn_cast_or_null<MCSymbolRefExpr>(Value))
if (SRE->getKind() == MCSymbolRefExpr::VK_ARM_SBREL && !(Size == 4))
getContext().reportFatalError(Loc, "relocated expression must be 32-bit");
EmitDa... | false | false | false | false | false | 0 |
buildin_getcastlename(struct script_state *st)
{
char *mapname = conv_str(st,& (st->stack->stack_data[st->start+2]));
struct guild_castle *gc = NULL;
int type = 0;
if(st->end>st->start+3)
type = conv_num(st,& (st->stack->stack_data[st->start+3]));
if(strcmp(mapname,"this") == 0) {
int m = script_mapname2mapi... | false | false | false | false | false | 0 |
autonumber_clear_database (AUTONUMBER_TEXT *autotext)
{
/* cleanup everything for the next searchtext */
if (autotext->used_numbers != NULL) {
g_list_free(autotext->used_numbers);
autotext->used_numbers = NULL;
}
if (autotext->free_slots != NULL) {
g_list_foreach(autotext->free_slots, (GFunc) g_free... | false | false | false | false | false | 0 |
imclient_xs_fcmdcb(struct imclient *client, void *prock,
struct imclient_reply *reply)
{
AV *av;
struct xsccb *rock = (struct xsccb *) prock;
/* SvREFCNT_dec(SvRV(rock->prock)); */
SvRV(rock->prock) = (SV *) (av = newAV());
/* sv_setsv(rock->prock, sv_2mortal(newRV_inc((SV *) (av = newAV())))); */
av_pu... | false | false | false | false | false | 0 |
pack_border_hybrid(int n, int *list, double *buf)
{
int i,j,m;
double *shape,*quat;
m = 0;
for (i = 0; i < n; i++) {
j = list[i];
if (ellipsoid[j] < 0) buf[m++] = 0;
else {
buf[m++] = 1;
shape = bonus[ellipsoid[j]].shape;
quat = bonus[ellipsoid[j]].quat;
buf[m++] = shape[0];... | false | false | false | false | false | 0 |
set_adapter_dmxsource(char *o)
{
int i, j, la, st, end, fd;
char buf[100], *arg[20], *sep, *seps;
adapter *ad;
strncpy(buf, o, sizeof(buf));
la = split(arg, buf, sizeof(arg), ',');
for (i = 0; i < la; i++)
{
sep = strchr(arg[i], '-');
seps = strchr(arg[i], ':');
if (!seps)
continue;
fd = map_intd(se... | true | true | false | false | true | 1 |
iter_match(ptr<expr> x, bool& changed,
std::unordered_set<ptr<expr>>& visited) {
if ( fixed.count(x) ) return x->match();
if ( ! running.count(x) ) return fix_match(x);
if ( visited.count(x) ) return x->match(); else visited.insert(x);
gen_set old_match = x->match();
gen_set new... | false | false | false | false | false | 0 |
sqlbox_configure_sqlite(Cfg* cfg)
{
CfgGroup *grp;
Octstr *sql;
DBPoolConn *pc;
if (!(grp = cfg_get_single_group(cfg, octstr_imm("sqlbox"))))
panic(0, "SQLBOX: Sqlite: group 'sqlbox' is not specified!");
sqlbox_logtable = cfg_get(grp, octstr_imm("sql-log-table"));
if (sqlbox_logtable =... | false | false | false | false | false | 0 |
pointer_map_insert (struct pointer_map_t *pmap, const void *p)
{
size_t n;
/* For simplicity, expand the map even if P is already there. This can be
superfluous but can happen at most once. */
if (pmap->n_elements > pmap->n_slots / 4)
{
size_t new_log_slots = pmap->log_slots + 1;
size_t ne... | false | false | false | false | false | 0 |
M_FileExists(char *filename)
{
FILE *fstream;
fstream = fopen(filename, "r");
if (fstream != NULL)
{
fclose(fstream);
return true;
}
else
{
// If we can't open because the file is a directory, the
// "file" exists at least!
return errno == EISDIR;
... | false | false | false | false | true | 1 |
__usermem(env, listp)
ENV *env;
char ***listp;
{
size_t len;
int ret;
char **array, **arrayp, **orig, *strp;
/* Find out how much space we need. */
for (len = 0, orig = *listp; *orig != NULL; ++orig)
len += sizeof(char *) + strlen(*orig) + 1;
len += sizeof(char *);
/* Allocate it and set up the pointers. *... | false | false | false | false | false | 0 |
snd_via82xx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
struct via82xx_modem *chip = entry->private_data;
int i;
snd_iprintf(buffer, "%s\n\n", chip->card->longname);
for (i = 0; i < 0xa0; i += 4) {
snd_iprintf(buffer, "%02x: %08x\n", i, inl(chip->port + i));
}
} | false | false | false | false | false | 0 |
get_hash_info(void)
{
PyObject *hash_info;
int field = 0;
PyHash_FuncDef *hashfunc;
hash_info = PyStructSequence_New(&Hash_InfoType);
if (hash_info == NULL)
return NULL;
hashfunc = PyHash_GetFuncDef();
PyStructSequence_SET_ITEM(hash_info, field++,
PyLong... | false | false | false | false | true | 1 |
get_framebits(lame_global_flags const *gfp, int frameBits[15])
{
lame_internal_flags *const gfc = gfp->internal_flags;
int bitsPerFrame, i;
/* always use at least this many bits per granule per channel
* unless we detect analog silence, see below
*/
gfc->bitrate_index = gfc->VBR_min_bit... | false | false | false | false | false | 0 |
parseAttribute(AttributeImpl *attr)
{
switch ( attr->id() )
{
case ATTR_DATA:
url = khtml::parseURL( attr->val() ).string();
setNeedComputeContent();
break;
case ATTR_CLASSID:
classId = attr->value().string();
setNeedComputeContent();
break;
case ATTR_ONLOAD: // ### s... | false | false | false | false | false | 0 |
rtl92c_dm_bt_coexist(struct ieee80211_hw *hw)
{
struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw);
bool wifi_connect_change;
bool bt_state_change;
bool rssi_state_change;
if ((rtlpcipriv->bt_coexist.bt_coexistence) &&
(rtlpcipriv->bt_coexist.bt_coexist_type == BT_CSR_BC4)) {
wifi_connect_change = rtl92c... | false | false | false | false | false | 0 |
BuildLabels2D(vtkViewport *viewport, bool force)
{
if (!force && (!this->LabelVisibility || this->NumberOfLabelsBuilt == 0))
return;
for (int i = 0; i < this->NumberOfLabelsBuilt; i++)
{
this->LabelActors2D[i]->GetProperty()->SetColor(this->LabelTextProperty->GetColor());
this->LabelActors2D[i]->... | false | false | false | false | false | 0 |
gsf_output_iconv_set_property (GObject *object,
guint property_id,
GValue const *value,
GParamSpec *pspec)
{
GsfOutputIconv *ic = (GsfOutputIconv *)object;
char *scopy;
switch (property_id) {
case PROP_SINK:
gsf_output_iconv_set_sink (ic, g_value_get_object (value));
... | false | false | false | false | false | 0 |
migrate_parse_gconf_tree_xml_in_evolution (GQueue *dir_stack)
{
if (g_strcmp0 (g_queue_peek_nth (dir_stack, 0), "apps") != 0)
return FALSE;
if (g_strcmp0 (g_queue_peek_nth (dir_stack, 1), "evolution") != 0)
return FALSE;
return TRUE;
} | false | false | false | false | false | 0 |
free_subscripts (vec<subscript_p> subscripts)
{
unsigned i;
subscript_p s;
FOR_EACH_VEC_ELT (subscripts, i, s)
{
free_conflict_function (s->conflicting_iterations_in_a);
free_conflict_function (s->conflicting_iterations_in_b);
free (s);
}
subscripts.release ();
} | false | false | false | false | false | 0 |
entry_key_press (GtkWidget *widget,
GdkEventKey *event,
GSLockPlug *plug)
{
restart_cancel_timeout (plug);
/* if the input widget is visible and ready for input
* then just carry on as usual
*/
if (gtk_widget_get_visible (plug->priv->auth_p... | false | false | false | false | false | 0 |
list_last(PMList *list)
{
PMList *ptr;
for(ptr = list; ptr && ptr->next; ptr = ptr->next);
return(ptr);
} | false | false | false | false | false | 0 |
read_summary_page()
{
int sum = 0;
int bytes_read = 0;
char header1 = read_bytes(1, &bytes_read, &sum); // Always 0x10
char header2 = read_bytes(1, &bytes_read, &sum); // Always 0x02
uint16_t command = read_bytes(2, &bytes_read, &sum);
if (header1 == 0x10 && header... | false | false | false | false | false | 0 |
queue_stop_cpus_work(const struct cpumask *cpumask,
cpu_stop_fn_t fn, void *arg,
struct cpu_stop_done *done)
{
struct cpu_stop_work *work;
unsigned int cpu;
/*
* Disable preemption while queueing to avoid getting
* preempted by a stopper which might wait for other stoppers
* to enter @fn which can l... | false | false | false | false | false | 0 |
snd_uart16550_del_timer(struct snd_uart16550 *uart)
{
if (uart->timer_running) {
del_timer(&uart->buffer_timer);
uart->timer_running = 0;
}
} | false | false | false | false | false | 0 |
pkcs12_fill_buffer( unsigned char *data, size_t data_len,
const unsigned char *filler, size_t fill_len )
{
unsigned char *p = data;
size_t use_len;
while( data_len > 0 )
{
use_len = ( data_len > fill_len ) ? fill_len : data_len;
memcpy( p, filler, use_len... | false | true | false | false | false | 1 |
libfvalue_integer_copy_from_byte_stream(
libfvalue_integer_t *integer,
const uint8_t *byte_stream,
size_t byte_stream_size,
int encoding,
libcerror_error_t **error )
{
static char *function = "libfvalue_integer_copy_from_byte_stream";
if( integer == NULL )
{
libcerror_error_set(
error,... | false | false | false | false | false | 0 |
ProcessSourceNode(SDNode *N, SelectionDAG *DAG,
InstrEmitter &Emitter,
DenseMap<SDValue, unsigned> &VRBaseMap,
SmallVector<std::pair<unsigned, MachineInstr*>, 32> &Orders,
SmallSet<unsigned, 8> &Seen) {
unsigned Order... | false | false | false | false | false | 0 |
GB_SystemDomainName(void)
{
char host[256], domain[256];
if (gethostname(host, sizeof(host) - 1))
return "";
if (getdomainname(domain, sizeof(domain) - 1))
return "";
if ((strlen(host) + strlen(domain)) > COMMON_BUF_MAX)
return "";
*COMMON_buffer = 0;
if (*domain && strcmp(domain, "(none)"))
{
s... | false | false | false | false | false | 0 |
make_our_sa_ipsec(struct sa_block *s)
{
struct isakmp_payload *r;
struct isakmp_payload *p = NULL, *pn;
struct isakmp_attribute *a;
int dh_grp = get_dh_group_ipsec(s->ipsec.do_pfs)->ipsec_sa_id;
unsigned int crypt, hash, keylen;
int i;
r = new_isakmp_payload(ISAKMP_PAYLOAD_SA);
r->u.sa.doi = ISAKMP_DOI_IPSEC;
... | false | false | false | false | false | 0 |
dvb_id_bus_manager_proxy_GetDevices (DVBIDBusManager* self, int* result_length1, GError** error) {
GDBusMessage *_message;
GVariant *_arguments;
GVariantBuilder _arguments_builder;
GDBusMessage *_reply_message;
GVariant *_reply;
GVariantIter _reply_iter;
GHashTable** _result;
int _result_length1;
GVariant* _tm... | false | false | false | false | false | 0 |
cat_file(gchar* namefile,gboolean tabulation)
{
gchar *t = NULL;
gchar *tsrt = NULL;
FILE *fd;
gchar *dump = NULL;
t=g_malloc(BBSIZE*sizeof(gchar));
fd = FOpen(namefile, "rb");
if(fd)
{
while(!feof(fd))
{
if(!fgets(t,BBSIZE, fd)) break;
dump = tsrt;
if(!tsrt)
{
if(tabulatio... | false | false | false | false | false | 0 |
fdevent_fd_check(fd_set *fds)
{
int i, n = 0;
fdevent *fde;
for(i = 0; i < select_n; i++) {
fde = fd_table[i];
if(fde == 0) continue;
if(fcntl(i, F_GETFL, NULL) < 0) {
FD_SET(i, fds);
n++;
// fde->state |= FDE_DONT_CLOSE;
}
}
retu... | false | false | false | false | false | 0 |
claCheck(
ClaElem *cla /* IN - The cla elem to check */
)
#else
static Boolean claCheck(cla)
ClaElem *cla; /* IN - The cla elem to check */
#endif
{
Boolean ok = FALSE;
if ((cla->classes&(Aword)CLA_OBJ) != 0)
ok = ok || isObj(params[cla->code-1].code);
if ((cla->classes&(Aword)CLA_CNT) != 0)
... | false | false | false | false | false | 0 |
process_command_line(int argc, char **argv)
{
int c;
int error = 0;
/* No error output from getopt */
opterr = 0;
while ((c = getopt(argc, argv, "hc:a:p:fr:s:")) > 0) {
char *end;
int temp_int;
switch (c) {
case 'h':
fprintf(stderr, "%s", help_text);
exit(EXIT_SUCCESS);
/* NOTREACHED */
c... | false | true | false | false | true | 1 |
type_from_extension (const gchar *extension)
{
g_assert (extension);
if (strcmp (extension, ".pkcs8") == 0)
return GKM_TYPE_GNOME2_PRIVATE_KEY;
else if (strcmp (extension, ".pub") == 0)
return GKM_TYPE_GNOME2_PUBLIC_KEY;
else if (strcmp (extension, ".cer") == 0)
return GKM_TYPE_CERTIFICATE;
return 0;
} | false | false | false | false | false | 0 |
rcMarkBoxArea(rcContext* ctx, const float* bmin, const float* bmax, unsigned char areaId,
rcCompactHeightfield& chf)
{
rcAssert(ctx);
ctx->startTimer(RC_TIMER_MARK_BOX_AREA);
int minx = (int)((bmin[0]-chf.bmin[0])/chf.cs);
int miny = (int)((bmin[1]-chf.bmin[1])/chf.ch);
int minz... | false | false | false | false | true | 1 |
CloseSocket()
{
if (m_s != INVALID_SOCKET)
{
#ifdef USE_WINDOWS_STYLE_SOCKETS
CancelIo((HANDLE) m_s);
CheckAndHandleError_int("closesocket", closesocket(m_s));
#else
CheckAndHandleError_int("close", close(m_s));
#endif
m_s = INVALID_SOCKET;
SocketChanged();
}
} | false | false | false | false | false | 0 |
fwrite_buffer(const void *ptr, size_t eltsize,
size_t nmemb, struct buffer *buffer)
{
size_t size = eltsize * nmemb;
if (size > buffer->size - buffer->posn) {
buffer->size = buffer->size * 3 / 2;
if (buffer->size < buffer->posn + size)
buffer->size = buffer->posn + size;
buffer->buffer = xrealloc(buff... | false | false | false | false | false | 0 |
DecipherUpdate(char* data, int len, unsigned char** out, int* out_len) {
if (!initialised_) return 0;
*out_len=len+EVP_CIPHER_CTX_block_size(&ctx);
*out= new unsigned char[*out_len];
EVP_CipherUpdate(&ctx, *out, out_len, (unsigned char*)data, len);
return 1;
} | false | false | false | false | false | 0 |
update_rows (NautilusQueryEditor *editor,
NautilusQuery *query)
{
NautilusQueryEditorRowType type;
/* if we were just created, set the rows from query,
* otherwise, re-use the query setting we have already.
*/
if (query != NULL && editor->details->query == NULL) {
for (type = 0; type < NAUTILUS_QU... | false | false | false | false | false | 0 |
rmcap(CAP *cap)
{
vsrm(cap->tbuf);
if (cap->abuf)
joe_free(cap->abuf);
if (cap->sort)
joe_free(cap->sort);
joe_free(cap);
} | false | false | false | false | false | 0 |
fm10k_tlv_attr_put_bool(u32 *msg, u16 attr_id)
{
/* verify pointers are not NULL */
if (!msg)
return FM10K_ERR_PARAM;
/* record attribute header */
msg[FM10K_TLV_DWORD_LEN(*msg)] = attr_id;
/* add header length to length */
*msg += FM10K_TLV_HDR_LEN << FM10K_TLV_LEN_SHIFT;
return 0;
} | false | false | false | false | false | 0 |
ParseRpcCoeffsMetaDataString(const char *psName, char **papszVal,
int& idx)
{
// separate one string with 20 coefficients into an array of 20 strings.
const char *psz20Vals = GetMetadataItem(psName, "RPC");
if (!psz20Vals)
return FALSE;
char** papsz... | false | false | false | false | false | 0 |
WHDR(const struct cirrusfb_info *cinfo, unsigned char val)
{
unsigned char dummy;
if (is_laguna(cinfo))
return;
if (cinfo->btype == BT_PICASSO) {
/* Klaus' hint for correct access to HDR on some boards */
/* first write 0 to pixel mask (3c6) */
WGen(cinfo, VGA_PEL_MSK, 0x00);
udelay(200);
/* next read d... | false | false | false | false | false | 0 |
__hwahc_op_wusbhc_stop(struct wusbhc *wusbhc, int delay)
{
struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc);
struct wahc *wa = &hwahc->wa;
u8 iface_no = wa->usb_iface->cur_altsetting->desc.bInterfaceNumber;
int ret;
ret = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0),
WUSB_... | false | false | false | false | false | 0 |
find_many_sub_basic_blocks (blocks)
sbitmap blocks;
{
basic_block bb, min, max;
FOR_EACH_BB (bb)
SET_STATE (bb,
TEST_BIT (blocks, bb->index) ? BLOCK_TO_SPLIT : BLOCK_ORIGINAL);
FOR_EACH_BB (bb)
if (STATE (bb) == BLOCK_TO_SPLIT)
find_bb_boundaries (bb);
FOR_EACH_BB (bb)
if (STAT... | false | false | false | false | false | 0 |
hostIpFailed (Host host)
{
if (host->ipAddrs)
if (host->ipAddrs[++host->nextIpAddr] == NULL)
host->nextIpAddr = 0 ;
} | false | false | false | false | false | 0 |
adf_ae_reset(struct adf_accel_dev *accel_dev, int ae)
{
struct adf_fw_loader_data *loader_data = accel_dev->fw_loader;
qat_hal_reset(loader_data->fw_loader);
if (qat_hal_clr_reset(loader_data->fw_loader))
return -EFAULT;
return 0;
} | false | false | false | false | false | 0 |
cast_raise_dead_spell(object *op, object *caster, object *spell, int dir, const char *arg) {
object *temp, *newob;
char name_to_resurrect[MAX_BUF];
int leveldead = 25, mflags, clevel;
sint16 sx, sy;
mapstruct *m;
clevel = caster_level(caster, spell);
if (spell->last_heal) {
if (!ar... | false | false | false | false | false | 0 |
fr_command_rar_handle_error (FrCommand *comm,
FrError *error)
{
GList *scan;
#if 0
{
GList *scan;
for (scan = g_list_last (comm->process->err.raw); scan; scan = scan->prev)
g_print ("%s\n", (char*)scan->data);
}
#endif
if (error->type == FR_ERROR_NONE)
return;
/* ignore warnings */
if (erro... | false | false | false | false | false | 0 |
sftp_message_free(sftp_message msg) {
if (msg == NULL) {
return;
}
ssh_buffer_free(msg->payload);
SAFE_FREE(msg);
} | false | false | false | false | false | 0 |
make_dosum_info_for_doacross(StripMining *sm, Loop *sm_loop)
{
List *li;
Dosum_info *p;
Dosum_info *head = NULL;
if (sm->flg_doacross) {
for (li = sm->loops; li != NULL; li = li->next) {
StripMiningInnerLoop *smil = li->data;
if (smil->org_kind == DOSUM) {
... | false | false | false | false | false | 0 |
NC_xlen_dim(dpp)
NC_dim **dpp ;
{
int len = 4 ;
if(*dpp!=NULL)
{
len += NC_xlen_string((*dpp)->name) ;
}
return(len) ;
} | false | false | false | false | false | 0 |
writestrp(const char *str)
{
unsigned char l = str ? strlen(str) : 0;
writex(&l, 1);
writex(str, l);
} | false | false | false | false | false | 0 |
check_special_flags(char *sfs, Node *e)
{
char *p = sfs;
int cont = 1;
/* special flags */
while (cont) {
switch (*p) {
case 'P':
pr_debug("register: flag: P (preserve argv0)\n");
p++;
e->flags |= MISC_FMT_PRESERVE_ARGV0;
break;
case 'O':
pr_debug("register: flag: O (open binary)\n");
p++;
... | false | false | false | false | false | 0 |
user_destroy(void *key, void *datum, void *p)
{
struct user_datum *usrdatum;
kfree(key);
if (datum) {
usrdatum = datum;
ebitmap_destroy(&usrdatum->roles);
ebitmap_destroy(&usrdatum->range.level[0].cat);
ebitmap_destroy(&usrdatum->range.level[1].cat);
ebitmap_destroy(&usrdatum->dfltlevel.cat);
}
kfree(da... | false | false | false | false | false | 0 |
sendbytes(struct l3_pins *adap, const u8 *buf,
int len)
{
int i;
for (i = 0; i < len; i++) {
if (i) {
udelay(adap->mode_hold);
adap->setmode(0);
udelay(adap->mode);
}
adap->setmode(1);
udelay(adap->mode_setup);
sendbyte(adap, buf[i]);
}
} | false | false | false | false | false | 0 |
decNumberCopy(decNumber *dest, const decNumber *src) {
#if DECCHECK
if (src==NULL) return decNumberZero(dest);
#endif
if (dest==src) return dest; /* no copy required */
/* Use explicit assignments here as structure assignment could copy */
/* more than just the lsu (for small DECDPUN). This would ... | false | false | false | false | true | 1 |
IDirectFBSurface_Layer_Destruct( IDirectFBSurface *thiz )
{
IDirectFBSurface_Layer_data *data = (IDirectFBSurface_Layer_data*) thiz->priv;
D_DEBUG_AT( Surface, "%s( %p )\n", __FUNCTION__, thiz );
dfb_layer_region_unref( data->region );
IDirectFBSurface_Destruct( thiz );
} | false | false | false | false | false | 0 |
getExps(int *maxl, int **bascnt, real (**aa)[2]) const
{
static const int lda = 1;
*maxl = 1;
*bascnt = (int*)calloc(lda*noOfAtoms, sizeof(int));
*aa = (real(*)[2])calloc(2*lda*noOfShells, sizeof(real));
for(int i=0; i<noOfAtoms; ++i) {
(*bascnt)[0 + i*lda] = 1; /* 1 s function */
... | false | false | false | false | true | 1 |
backsql_make_attr_query(
backsql_info *bi,
backsql_oc_map_rec *oc_map,
backsql_at_map_rec *at_map )
{
struct berbuf bb = BB_NULL;
backsql_strfcat_x( &bb, NULL, "lblbbbblblbcbl",
(ber_len_t)STRLENOF( "SELECT " ), "SELECT ",
&at_map->bam_sel_expr,
(ber_len_t)STRLENOF( " " ), " ",
&bi->sql_aliasin... | false | false | false | false | false | 0 |
grow_slab_list (const unsigned int id) {
slabclass_t *p = &slabclass[id];
if (p->slabs == p->list_size) {
size_t new_size = (p->list_size != 0) ? p->list_size * 2 : 16;
void *new_list = realloc(p->slab_list, new_size * sizeof(void *));
if (new_list == 0) return 0;
p->list_size =... | false | false | false | false | false | 0 |
remote_server_init(gchar *path, CollectionData *command_collection)
{
RemoteConnection *remote_connection = remote_server_open(path);
RemoteData *remote_data = g_new(RemoteData, 1);
remote_data->command_collection = command_collection;
remote_server_subscribe(remote_connection, remote_cb, remote_data);
return r... | false | false | false | false | false | 0 |
clear()
{
if ( action ) {
delete action;
action = NULL;
}
for ( Trigger::iterator i = trigger.begin(); i != trigger.end(); ++i )
delete *i;
trigger.clear();
} | false | false | false | false | false | 0 |
update_output_paths(struct hda_codec *codec, int num_outs,
const int *paths)
{
struct hda_gen_spec *spec = codec->spec;
struct nid_path *path;
int i;
for (i = 0; i < num_outs; i++) {
path = snd_hda_get_path_from_idx(codec, paths[i]);
if (path)
snd_hda_activate_path(codec, path, path->active,
... | false | false | false | false | false | 0 |
message(char *keys, char *fmt, ...)
{
char message[256];
va_list arg;
int k;
int timernoop;
int returnkey;
va_start(arg, fmt);
vnprintstring(message, 255, fmt, arg);
va_end(arg);
attrset(COLTAB(2));
mvhline(LINES - 1, 0, ' ', COLS);
mvprintw(LINES - 1, 1, "%s", message);
wrefresh(stdscr);
... | false | false | false | false | false | 0 |
handler_msn_joi (u_char *raw, int length, ip_address source,
u_short source_port, ip_address destination, u_short destination_port)
{
int rc, nt;
log_debug (4, "Entry into handler_msn_joi");
rc= get_new_line_malloc (&next_line, raw, length);
if (rc<0)
return rc;
log_debug (5, "Line read: %s", next_line);
... | false | false | false | false | false | 0 |
remove_disconnected_slots()
{
// Remove any disconnected slots
group_iterator g = groups.begin();
while (g != groups.end()) {
slot_pair_iterator s = g->second.begin();
while (s != g->second.end()) {
if (s->first.connected()) ++s;
else g->second.erase(s++);
}
// Clear out empty groups
... | false | false | false | false | false | 0 |
qed_int_igu_init_pure_rt(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt,
bool b_set,
bool b_slowpath)
{
u32 igu_base_sb = p_hwfn->hw_info.p_igu_info->igu_base_sb;
u32 igu_sb_cnt = p_hwfn->hw_info.p_igu_info->igu_sb_cnt;
u32 sb_id = 0;
u32 val = 0;
val = qed_rd(p_hwfn, p_ptt, IGU_REG_BLO... | false | false | false | false | false | 0 |
CreateExtent_GCIO (
double Xmin,
double Ymin,
double Xmax,
double Ymax
)
{
GCExtent* theEx... | false | false | false | false | false | 0 |
IRead(hsStream* S, plResManager* mgr) {
fOfferer = mgr->readKey(S);
fTargetAge = S->readInt();
fOfferee = S->readInt();
} | false | false | false | false | false | 0 |
network_store(NeuralTrainControls *controls)
{
GwyNeuralNetwork *network;
NeuralNetworkData *nndata;
GtkTreeModelFilter *filter;
GtkTreeModel *model, *imodel;
GtkTreeSelection *tselect;
GtkTreeIter iter, iiter;
const gchar *name;
nndata = &controls->args->nn->data;
name = gtk_entry_... | false | false | false | false | false | 0 |
dens_renorm(lf,des)
lfit *lf;
design *des;
{ INT i;
double sum;
sum = dens_integrate(lf,des,1);
if (sum==0.0) return;
sum = log(sum);
for (i=0; i<lf->nv; i++) lf->coef[i] -= sum;
} | false | false | false | false | false | 0 |
run(const rpt_expr::pointer &ep, size_t,
rpt_value::pointer *argv) const
{
//
// See if it looks like a number.
// Use that if so.
//
rpt_value::pointer tmp = rpt_value::integerize(argv[0]);
rpt_value_integer *rvip = dynamic_cast<rpt_value_integer *>(tmp.get());
if (rvip)
{
time_t t... | false | false | false | false | false | 0 |
rmmod_do_remove_module(struct kmod_module *mod)
{
const char *modname = kmod_module_get_name(mod);
int flags = 0, err;
SHOW("rmmod %s\n", kmod_module_get_name(mod));
if (dry_run)
return 0;
if (force)
flags |= KMOD_REMOVE_FORCE;
err = kmod_module_remove_module(mod, flags);
if (err == -EEXIST) {
if (!fir... | false | false | false | false | false | 0 |
_affectParticles(ParticleSystem* pSystem, Real timeElapsed)
{
// precalculate distance of plane from origin
Real planeDistance = - mPlaneNormal.dotProduct(mPlanePoint) / Math::Sqrt(mPlaneNormal.dotProduct(mPlaneNormal));
Vector3 directionPart;
ParticleIterator pi = pSystem->_getIter... | false | false | false | false | false | 0 |
clone_zero(const char *last_rsc_id)
{
int lpc = 0;
char *zero = NULL;
CRM_CHECK(last_rsc_id != NULL, return NULL);
if (last_rsc_id != NULL) {
lpc = strlen(last_rsc_id);
}
while (--lpc > 0) {
switch (last_rsc_id[lpc]) {
case 0:
return NULL;
... | false | false | false | false | false | 0 |
_wrap_new_lfc_direnrep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
struct lfc_direnrep *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)":new_lfc_direnrep")) SWIG_fail;
result = (struct lfc_direnrep *)calloc(1, sizeof(struct lfc_direnrep));
{
PyObject *myresult;
... | false | false | false | false | false | 0 |
operator=(const CompactDecimalFormat& rhs) {
if (this != &rhs) {
DecimalFormat::operator=(rhs);
_unitsByVariant = rhs._unitsByVariant;
_divisors = rhs._divisors;
delete _pluralRules;
_pluralRules = rhs._pluralRules->clone();
}
return *this;
} | false | false | false | false | false | 0 |
gap_fmct_save_GapFmacContext(GapFmacContext *fmacContext)
{
GapFmacRefEntry *fmref_entry;
FILE *fp;
fp = g_fopen(fmacContext->persistent_id_lookup_filename, "w");
if (fp == NULL)
{
printf("ERROR: could not open write file:%s\n", fmacContext->persistent_id_lookup_filename);
return;
}
... | false | false | false | false | false | 0 |
OUT_DXEAX(bxInstruction_c *i)
{
unsigned port = DX;
if (! allow_io(i, port, 4)) {
BX_DEBUG(("OUT_DXEAX: I/O access not allowed !"));
exception(BX_GP_EXCEPTION, 0, 0);
}
BX_OUTP(port, EAX, 4);
} | false | false | false | false | false | 0 |
gconf_database_unset (GConfDatabase *db,
const gchar *key,
const gchar *locale,
GError **err)
{
#ifdef HAVE_CORBA
ConfigValue* val;
#endif
GError* error = NULL;
GConfSources *modified_sources = NULL;
g_return_if_fail(... | false | false | false | false | false | 0 |
focus_query_grab_buttons(FvwmWindow *fw, Bool client_entered)
{
Bool flag;
Bool is_focused;
if (fw->Desk != Scr.CurrentDesk || IS_ICONIFIED(fw))
{
return False;
}
is_focused = focus_is_focused(fw);
if (!is_focused && FP_DO_FOCUS_CLICK_CLIENT(FW_FOCUS_POLICY(fw)))
{
return True;
}
if (is_on_top_of_layer_a... | false | false | false | false | false | 0 |
DateTimeSingleValueMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue )
// Date : July 15, 2002
// Author : Thomas Wilkens
// Task : This function performs a date time single value match and returns OFTrue if the data... | false | false | false | false | false | 0 |
NET_Config (qboolean multiplayer)
{
int i;
if (!multiplayer)
{ // shut down any existing sockets
for (i=0 ; i<2 ; i++)
{
if (ip_sockets[i])
{
close (ip_sockets[i]);
ip_sockets[i] = 0;
}
if (ipx_sockets[i])
{
close (ipx_sockets[i]);
ipx_sockets[i] = 0;
}
}
... | false | false | false | false | false | 0 |
WXMPMeta_GetArrayItem_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS,
XMP_StringPtr arrayName,
XMP_Index itemIndex,
XMP_StringPtr * itemValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options,
WXMP_Result * wResult ) /* const */
{
XMP_ENTER_WR... | false | false | false | false | false | 0 |
CopyRfmQuad(RfmStm to, RfmQuad prev, RfmStm from)
{
RfmQuad quad;
int i;
if ((to == NULL) || (from == NULL)) {
return;
}
for (quad = from->quad_list;
quad != NULL;
quad = quad->next) {
prev = MakeRfmQuad(to, prev, quad->node);
prev->operator = quad->ope... | false | false | false | false | false | 0 |
vga_8planes_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
u32 dx = rect->dx, width = rect->width;
char oldindex = getindex();
char oldmode = setmode(0x40);
char oldmask = selectmask();
int line_ofs, height;
char oldop, oldsr;
char __iomem *where;
... | false | false | false | false | false | 0 |
Load() {
// Return if debugger is already loaded.
if (IsLoaded()) return true;
Debugger* debugger = isolate_->debugger();
// Bail out if we're already in the process of compiling the native
// JavaScript source code for the debugger.
if (debugger->compiling_natives() ||
debugger->is_loading_debugger... | 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.