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 |
|---|---|---|---|---|---|---|
want_ancestry(struct rev_info *revs)
{
return (revs->rewrite_parents || revs->children.name);
} | false | false | false | false | false | 0 |
buildTakethisBuffers (Connection cxn, Buffer checkBuffer)
{
size_t lenArray = 0 ;
ArtHolder p, q ;
Buffer *rval = NULL ;
const char *peerName = hostPeerName (cxn->myHost) ;
if (checkBuffer != NULL)
lenArray++ ;
if (cxn->takeHead != NULL) /* some TAKETHIS commands to be done. */
{
Buffer t... | false | false | false | false | false | 0 |
gee_tree_set_iterator_real_has_previous (GeeBidirIterator* base) {
GeeTreeSetIterator * self;
gboolean result = FALSE;
gint _tmp0_ = 0;
GeeTreeSet* _tmp1_ = NULL;
gint _tmp2_ = 0;
gboolean _tmp3_ = FALSE;
gboolean _tmp4_ = FALSE;
GeeTreeSetNode* _tmp5_ = NULL;
gboolean _tmp7_ = FALSE;
gboolean _tmp13_ = FALSE... | false | false | false | false | false | 0 |
SearchDirs (const char* path) {
Directory dir(path);
if (_verbose) {
printf("recursively searching directory %s\n", path);
}
for (int i = 0; i < dir.Count(); ++i) {
const char* file = dir.File(i);
if (!DotOrDotDot(file)) {
char filePath[MAXPATHLEN+1];
strcpy(f... | false | false | false | false | false | 0 |
EyeboxOne_get_key (Driver *drvthis)
{
PrivateData * p = drvthis->private_data;
char in = 0;
// POLL For data or return
struct pollfd fds[1];
fds[0].fd = p->fd;
fds[0].events = POLLIN;
fds[0].revents = 0;
poll(fds,1,0);
if (fds[0].revents == 0)
return NULL;
(void) read(p->fd, &in, 1);
report(RPT_DEBUG, "... | false | false | false | false | false | 0 |
ali_check_atapi_dma(struct ata_queued_cmd *qc)
{
if (!ali_atapi_dma) {
/* FIXME: pata_ali can't do ATAPI DMA reliably but the
* IDE alim15x3 driver can. I tried lots of things
* but couldn't find what the actual difference was.
* If you got an idea, please write it to
* linux-ide@vger.kernel.org and cc ... | false | false | false | false | false | 0 |
otp_authorize(void *instance, REQUEST *request)
{
otp_option_t *inst = (otp_option_t *) instance;
char challenge[OTP_MAX_CHALLENGE_LEN + 1]; /* +1 for '\0' terminator */
int auth_type_found;
/* Early exit if Auth-Type != inst->name */
{
VALUE_PAIR *vp;
auth_type_found = 0;
if ((vp = pairfind(re... | true | true | false | false | true | 1 |
PF_Configstring (int index, char *val)
{
if (index < 0 || index >= MAX_CONFIGSTRINGS)
Com_Error (ERR_DROP, "configstring: bad index %i\n", index);
if (!val)
val = "";
// change the string in sv
strcpy (sv.configstrings[index], val);
if (sv.state != ss_loading)
{ // send the update to everyone... | false | false | false | false | false | 0 |
stk500v2_command(PROGRAMMER * pgm, unsigned char * buf,
size_t len, size_t maxlen) {
int i;
int tries = 0;
int status;
DEBUG("STK500V2: stk500v2_command(");
for (i=0;i<len;i++) DEBUG("0x%02x ",buf[i]);
DEBUG(", %d)\n",len);
retry:
tries++;
// send the command to the progra... | false | false | false | false | false | 0 |
scsi_sdev_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int i)
{
struct device *dev = container_of(kobj, struct device, kobj);
struct scsi_device *sdev = to_scsi_device(dev);
if (attr == &dev_attr_queue_depth.attr &&
!sdev->host->hostt->change_queue_depth)
return S_IRUGO;
if (attr ==... | false | false | false | false | false | 0 |
tp_process_repeating_action(Gpm_Event *state, int feature, int last_feature, int *last_action,
touchpad_action_type *action_list,int feature_mask)
{
if (feature) {
if (!(last_feature && *last_action == GPM_B_NOT_SET)) {
*last_action = tp_process_action(action_list, feature_mask);
if (*last_act... | false | false | false | false | false | 0 |
hns_init_mac_addr(struct net_device *ndev)
{
struct hns_nic_priv *priv = netdev_priv(ndev);
struct device_node *node = priv->dev->of_node;
const void *mac_addr_temp;
mac_addr_temp = of_get_mac_address(node);
if (mac_addr_temp && is_valid_ether_addr(mac_addr_temp)) {
memcpy(ndev->dev_addr, mac_addr_temp, ndev->a... | false | false | false | false | false | 0 |
step_size(g726_state_t *s)
{
int y;
int dif;
int al;
if (s->ap >= 256)
return s->yu;
y = s->yl >> 6;
dif = s->yu - y;
al = s->ap >> 2;
if (dif > 0)
y += (dif*al) >> 6;
else if (dif < 0)
y += (dif*al + 0x3F) >> 6;
return y;
} | false | false | false | false | false | 0 |
isPredetermined(int symb_id) const throw (UnknownSymbolIDException)
{
if (symb_id < 0 || symb_id >= size)
throw UnknownSymbolIDException(symb_id);
return (predetermined_variables.find(symb_id) != predetermined_variables.end());
} | false | false | false | false | false | 0 |
convert_string_to_number_scratch(char_t (&buffer)[32], const char_t* begin, const char_t* end, double* out_result)
{
size_t length = static_cast<size_t>(end - begin);
char_t* scratch = buffer;
if (length >= sizeof(buffer) / sizeof(buffer[0]))
{
// need to make dummy on-heap copy
scratch = static... | false | false | false | false | false | 0 |
rb_string_value(volatile VALUE *ptr)
{
VALUE s = *ptr;
if (TYPE(s) != T_STRING) {
s = rb_str_to_str(s);
*ptr = s;
}
return s;
} | false | false | false | false | false | 0 |
climate_change(bool warming, int effect)
{
int k = map_num_tiles();
bool used[k];
memset(used, 0, sizeof(used));
log_verbose("Climate change: %s (%d)",
warming ? "Global warming" : "Nuclear winter", effect);
while (effect > 0 && (k--) > 0) {
struct terrain *old, *candidates[2], *new;
s... | false | false | false | false | false | 0 |
print_xml_row(FILE *xml_file, const char *row_name,
MYSQL_RES *tableRes, MYSQL_ROW *row,
const char *str_create)
{
uint i;
my_bool body_found= 0;
char *create_stmt_ptr= NULL;
ulong create_stmt_len= 0;
MYSQL_FIELD *field;
ulong *lengths= mysql_fetch_lengths... | false | false | false | false | false | 0 |
gedit_app_show_help_impl (GeditApp *app,
GtkWindow *parent,
const gchar *name,
const gchar *link_id)
{
GError *error = NULL;
gboolean ret;
gchar *link;
if (name == NULL)
{
name = "gedit";
}
else if (strcmp (name, "gedit.xml") =... | false | false | false | false | false | 0 |
pdp_get_passphrase(const pdp_ctx_t *ctx, char *passwd, size_t len)
{
char *passwd2 = NULL;
char *tmp = NULL;
int status = -1;
int interactive = 1;
int got_password = 0;
if (!ctx || !passwd || !len)
return -1;
interactive = (ctx->opts & PDP_PW_NOINPUT) ? 0 : 1;
if ((passwd2 ... | false | true | false | false | true | 1 |
sender_table_insert (EDataCal *data_cal,
const gchar *sender,
GCancellable *cancellable)
{
GHashTable *sender_table;
GPtrArray *array;
g_return_if_fail (sender != NULL);
g_mutex_lock (&data_cal->priv->sender_lock);
sender_table = data_cal->priv->sender_table;
array = g... | false | false | false | false | false | 0 |
mdb_read_catalog (MdbHandle *mdb, int objtype)
{
MdbCatalogEntry *entry, msysobj;
MdbTableDef *table;
char obj_id[256];
char obj_name[MDB_MAX_OBJ_NAME];
char obj_type[256];
char obj_flags[256];
char obj_props[MDB_BIND_SIZE];
int type;
unsigned int i;
MdbColumn *col_props;
int kkd_size_ole;
if (!mdb) return... | false | false | false | false | false | 0 |
Fd_Create_C_Frame(long (*cstr_fct) (), WamWord *AF, WamWord *fdv_adr,
Bool optim2)
{
WamWord *CF = CS;
AF_Pointer(CF) = AF;
Optim_Pointer(CF) = (optim2 && fdv_adr) ? &FD_INT_Date(fdv_adr)
: (WamWord *) &always_date;
Cstr_Address(CF) = cstr_fct;
/* if ground Nb_Cstr not allocated (Fd_Int_Frame) */
... | false | false | false | false | false | 0 |
free_spec_colors(SPEC_COLOR_S **colors)
{
if(colors && *colors){
free_spec_colors(&(*colors)->next);
if((*colors)->spec)
fs_give((void **)&(*colors)->spec);
if((*colors)->fg)
fs_give((void **)&(*colors)->fg);
if((*colors)->bg)
fs_give((void **)&(*colors)->bg);
if((*colors)->val)
free_pattern(&(*col... | false | false | false | false | false | 0 |
_step_complete(slurmdbd_conn_t *slurmdbd_conn,
Buf in_buffer, Buf *out_buffer, uint32_t *uid)
{
dbd_step_comp_msg_t *step_comp_msg = NULL;
struct step_record step;
struct job_record job;
struct job_details details;
int rc = SLURM_SUCCESS;
char *comment = NULL;
if (*uid != slurmdbd_conf->slurm_user_id && *... | false | false | false | false | false | 0 |
slapi_rdn_compare(Slapi_RDN *rdn1, Slapi_RDN *rdn2)
{
int r= 1;
int n1= slapi_rdn_get_num_components(rdn1);
int n2= slapi_rdn_get_num_components(rdn2);
if (n1==n2)
{
char *type, *value;
int i= slapi_rdn_get_first(rdn1, &type, &value);
while(r==1 && i!=-1)
{
r= slapi_rdn_contains(rdn2, type, value, strle... | false | false | false | false | false | 0 |
bg_send_pidfile(void)
{
bg_comm_t message;
message.comm_type = BG_COMM_TRANSFERPF;
message.comm_data.transferpf.len = strlen(pid_file);
/* Send type message. */
if (write(bg.comm_send, &message, sizeof(message)) < 0)
goto error;
/* Send data. */
if (write(bg.comm_send, pid_file, message.comm_data.tr... | false | false | false | false | false | 0 |
xpath_test(const xmlpp::Node* node, const xmlpp::string& xpath)
{
std::cout << std::endl; //Separate tests by an empty line.
std::cout << "searching with xpath '" << xpath << "' in root node: " << std::endl;
xmlpp::NodeSet set = node->find(xpath);
std::cout << set.size() << " nodes have been found:" << std:... | false | false | false | false | false | 0 |
compute_grids(void)
{
#if GRID_OPT
/* element: . X O x o , a ! */
static const unsigned int and_mask[] = { 3, 3, 3, 1, 2, 3, 3, 3 };
static const unsigned int val_mask[] = { 0, 2, 1, 0, 0, 0, 0, 0 };
int ll; /* iterate over rotations */
int k; /* iterate over elements *... | false | false | false | false | false | 0 |
evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx)
{
Eina_Bool ret;
MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
return EINA_FALSE;
MAGIC_CHECK_END();
if ((surf) && (ctx))
ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.o... | false | false | false | false | false | 0 |
usb6fire_chip_probe(struct usb_interface *intf,
const struct usb_device_id *usb_id)
{
int ret;
int i;
struct sfire_chip *chip = NULL;
struct usb_device *device = interface_to_usbdev(intf);
int regidx = -1; /* index in module parameter array */
struct snd_card *card = NULL;
/* look if we already serve ... | false | true | false | false | false | 1 |
T_VerticalDoor (vldoor_t* door)
{
result_e res;
switch(door->direction)
{
case 0:
// WAITING
if (!--door->topcountdown)
{
switch(door->type)
{
case blazeRaise:
door->direction = -1; // time to go back down
S_StartSound(&door->sector->soundorg, sfx_bdcls);
break;
c... | false | false | false | false | true | 1 |
rndis_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
bool enabled, int timeout)
{
struct rndis_wlan_private *priv = wiphy_priv(wiphy);
struct usbnet *usbdev = priv->usbdev;
int power_mode;
__le32 mode;
int ret;
if (priv->device_type != RNDIS_BCM4320B)
return -ENOTSUPP;
netdev_dbg(usbdev->net... | false | false | false | false | false | 0 |
on_menu_keyboard_shortcuts_activate(GtkMenuItem *unused_menuitem,
gpointer unused_udata)
{
(void) unused_menuitem;
(void) unused_udata;
g_carp("%s(): this is a stub", G_STRFUNC);
} | false | false | false | false | false | 0 |
mailimap_capability_data_dup(struct mailimap_capability_data * orig_cap_data)
{
struct mailimap_capability_data * cap_data;
struct mailimap_capability * cap_dup;
clist * list;
clistiter * cur;
int r;
list = clist_new();
if (list == NULL)
goto err;
for(cur = clist_begin(orig_cap_data->cap_list) ;
... | false | false | false | false | false | 0 |
gkm_secret_collection_load (GkmSecretCollection *self)
{
g_return_val_if_fail (GKM_IS_SECRET_COLLECTION (self), GKM_DATA_FAILURE);
if (!self->filename)
return GKM_DATA_SUCCESS;
return load_collection_and_secret_data (self, self->sdata, self->filename);
} | false | false | false | false | false | 0 |
socks_handshake (socket_descriptor_t sd, volatile int *signal_received)
{
char buf[2];
int len = 0;
const int timeout_sec = 5;
/* VER = 5, NMETHODS = 1, METHODS = [0] */
const ssize_t size = send (sd, "\x05\x01\x00", 3, MSG_NOSIGNAL);
if (size != 3)
{
msg (D_LINK_ERRORS | M_ERRNO_SOCK, "socks_han... | true | true | false | false | false | 1 |
setup_proc_interface(void)
{
if (!read_proc_data && !_GK.client_mode && gkrellm_sys_proc_init())
{
read_proc_data = gkrellm_sys_proc_read_data;
read_user_data = gkrellm_sys_proc_read_users;
}
return read_proc_data ? TRUE : FALSE;
} | false | false | false | false | false | 0 |
xcan_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct xcan_priv *priv = netdev_priv(ndev);
if (set_reset_mode(ndev) < 0)
netdev_err(ndev, "mode resetting failed!\n");
unregister_candev(ndev);
netif_napi_del(&priv->napi);
free_candev(ndev);
return 0;
} | false | false | false | false | false | 0 |
Preset(int BoxLen)
{ int i;
if(ReallocArray(&Tap,BoxLen)) return -1;
for(i=0; i<BoxLen; i++) Tap[i]=0;
Len=BoxLen; TapPtr=0; Sum=0; return 0; } | false | false | false | false | false | 0 |
make_pathkey_from_sortinfo(PlannerInfo *root,
Expr *expr,
Oid opfamily,
Oid opcintype,
bool reverse_sort,
bool nulls_first,
Index sortref,
bool create_it,
bool canonicalize)
{
int16 strategy;
Oid equality_op;
List *opfamilies;
Equivalence... | false | false | false | false | false | 0 |
H5MF_aggr_try_extend(H5F_t *f, H5F_blk_aggr_t *aggr, H5FD_mem_t type,
haddr_t blk_end, hsize_t extra_requested)
{
htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(H5MF_aggr_try_extend, FAIL)
/* Check args */
HDassert(f);
HDassert(aggr);
HDassert(aggr->feature_flag ==... | false | false | false | false | false | 0 |
ccbaRead(const char *filename)
{
FILE *fp;
CCBORDA *ccba;
PROCNAME("ccbaRead");
if (!filename)
return (CCBORDA *)ERROR_PTR("filename not defined", procName, NULL);
if ((fp = fopenReadStream(filename)) == NULL)
return (CCBORDA *)ERROR_PTR("stream not opened", procName, NULL);
ccb... | false | false | false | false | false | 0 |
GetAttr(const std::string& name)
{
if ( arg_list.find(name) != arg_list.end() )
return arg_list[name];
return empty_str;
} | false | false | false | false | false | 0 |
netlink_request(nl_handle_t *nl, int family, int type)
{
int status;
struct sockaddr_nl snl;
struct {
struct nlmsghdr nlh;
struct rtgenmsg g;
} req;
/* Cleanup the room */
memset(&snl, 0, sizeof (snl));
snl.nl_family = AF_NETLINK;
req.nlh.nlmsg_len = sizeof (req);
req.nlh.nlmsg_type = type;
req.nlh.nlms... | false | false | false | false | false | 0 |
Term_Math_Loading(WamWord l_word, WamWord r_word)
{
WamWord word, tag_mask;
WamWord *adr, *fdv_adr;
if (delay_sp != delay_cstr_stack)
{
#ifdef DEBUG
DBGPRINTF("\nnon Linear part\n");
#endif
if (!Load_Delay_Cstr_Part())
return FALSE;
}
while (--vars_sp >= vars_tbl)
{
DEREF(*vars_... | false | false | false | false | false | 0 |
brcmf_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
u64 cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_cfg80211_vif *vif;
int err = 0;
brcmf_dbg(TRACE, "Enter p2p listen cancel\n");
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
if ... | false | false | false | false | false | 0 |
ObjectBound() const {
float minz = z[0], maxz = z[0];
for (int i = 1; i < nx*ny; ++i) {
if (z[i] < minz) minz = z[i];
if (z[i] > maxz) maxz = z[i];
}
return BBox(Point(0,0,minz), Point(1,1,maxz));
} | false | false | false | false | false | 0 |
handle_signal (int signum_)
{
trace_with_mask("ChildStatusHandler::handle_signal", FORK);
DL((FORK, "Caught signal # %d\n", signum_));
if (signum_ == SIGCHLD) {
int status;
m_caught = true;
pid_t ret = ::wait (&status);
DL((FORK,"wait() = %d (PID)\n", ret));
if (ret > 0 && (WIFEXITED (status))) {
m_ex... | false | false | false | false | false | 0 |
AlphaMultiplyY(WebPPicture* const pic, int inverse) {
const uint8_t* ptr_a = pic->a;
if (ptr_a != NULL) {
uint8_t* ptr_y = pic->y;
int y;
for (y = 0; y < pic->height; ++y) {
WebPMultRow(ptr_y, ptr_a, pic->width, inverse);
ptr_y += pic->y_stride;
ptr_a += pic->a_stride;
}
}
} | false | false | false | false | false | 0 |
icon( const QString& name )
{
QIcon icon;
const int sizes[ 4 ] = { 16, 22, 32, 48 };
for ( int i = 0; i < 4; i++ ) {
QString path = QString( ":/icons/%1-%2.png" ).arg( name ).arg( sizes[ i ] );
if ( QFile::exists( path ) )
icon.addFile( path, QSize( sizes[ i ], sizes[ i ] ) );... | false | false | false | false | false | 0 |
make_one_sided_pentomino(void)
{
int i,j,t,u;
j=0;
for (i=0;i<countof(pentomino);i++) {
one_sided_pentomino[j] = pentomino[i];
for (t=0;t<8;t++)
if (one_sided_pentomino[j].transform_list[t]>=4) {
one_sided_pentomino[j].transform_len = t;
j++;
one_sided_pentomino[j] = pentomi... | false | false | false | false | false | 0 |
aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id)
{
aeTimeEvent *te, *prev = NULL;
te = eventLoop->timeEventHead;
while(te) {
if (te->id == id) {
if (prev == NULL)
eventLoop->timeEventHead = te->next;
else
prev->next = te->next;
... | false | false | false | false | false | 0 |
git_ignore__pop_dir(git_ignores *ign)
{
if (ign->ign_path.length > 0) {
git_attr_file *file = git_vector_last(&ign->ign_path);
if (git__suffixcmp(ign->dir.ptr, file->key + 2) == 0)
git_vector_pop(&ign->ign_path);
git_buf_rtruncate_at_char(&ign->dir, '/');
}
return 0;
} | false | false | false | false | false | 0 |
turmite(pix *p, int *x, int *y,
int x0, int x1, int y0, int y1, int cs, int rw, int rb) {
int r;
if (outbounds(p, x0, y0)) // out of pixmap
return;
while (*x >= x0 && *y >= y0 && *x <= x1 && *y <= y1) {
r = ((getpixel(p, *x, *y) < cs) ? rb : rw); // select rule
switch (r) {
case UP: (*y)-... | false | false | false | false | false | 0 |
callback_get_first_frame_security_info (StackFrameInfo *frame, MonoContext *ctx, gpointer data)
{
MonoFrameSecurityInfo *si = (MonoFrameSecurityInfo*) data;
MonoJitInfo *ji = frame->ji;
MonoMethod *method;
if (!ji)
return FALSE;
/* FIXME: skip all wrappers ?? probably not - case by case testing is required */
... | false | false | false | false | false | 0 |
renamecmd(char *from, char *to)
{
LOGCMD2("rename", from, to);
if (rename(from, to) < 0)
perror_reply(550, "rename");
else
ack("RNTO");
} | false | false | false | false | false | 0 |
nrrdDescribe(FILE *file, const Nrrd *nrrd) {
unsigned int ai;
char stmp[AIR_STRLEN_SMALL];
if (file && nrrd) {
fprintf(file, "Nrrd at 0x%p:\n", AIR_CVOIDP(nrrd));
fprintf(file, "Data at 0x%p is %s elements of type %s.\n", nrrd->data,
airSprintSize_t(stmp, nrrdElementNumber(nrrd)),
... | false | false | false | false | false | 0 |
v_unpack_t_text_set(const char *buf, size_t buffer_length)
{
unsigned int i, buffer_pos = 0;
VOrderedStorage *s;
VTempText l, *line, *past = NULL;
char text[1500];
if(buffer_length < 12)
return -1;
buffer_pos += vnp_raw_unpack_uint32(&buf[buffer_pos], &l.node_id);
buffer_pos += vnp_raw_unpack_uint16(&buf[buff... | false | false | false | false | false | 0 |
role_addhdr_tool(struct pine *ps, int cmd, CONF_S **cl, unsigned int flags)
{
int rv;
switch(cmd){
case MC_ADDHDR:
case MC_EXIT:
rv = role_text_tool(ps, cmd, cl, flags);
break;
default:
rv = -1;
break;
}
return rv;
} | false | false | false | false | false | 0 |
sprintRight(char*& dest, const char*& src, unsigned width) {
while (std::isspace(*src)) ++src;
const char* s = src;
while (std::isgraph(*s)) ++s;
unsigned w = s - src;
while (w++ < width) *dest++ = ' ';
while (std::isgraph(*src)) *dest++ = *src++;
++dest;
} | false | false | false | false | false | 0 |
Curl_unencode_deflate_write(struct connectdata *conn,
struct SingleRequest *k,
ssize_t nread)
{
z_stream *z = &k->z; /* zlib state structure */
/* Initialize zlib? */
if(k->zlib_init == ZLIB_UNINIT) {
memset(z, 0, sizeof(z_stream));
z->zall... | false | false | false | false | false | 0 |
EmitModifiedString(const vector<ModifierAndValue>& modifiers,
const char* in, size_t inlen,
const PerExpandData* data,
ExpandEmitter* outbuf) {
string result;
string value_string;
if (modifiers.size() > 1) {
// If the... | false | false | false | false | false | 0 |
SetProp(vtkProp* prop)
{
VTK_LEGACY_REPLACED_BODY(vtkImageTracerWidget::SetProp, "VTK 5.0",
vtkImageTracerWidget::SetViewProp);
this->SetViewProp(prop);
} | false | false | false | false | false | 0 |
ftdi_sio_probe(struct usb_serial *serial,
const struct usb_device_id *id)
{
struct ftdi_sio_quirk *quirk =
(struct ftdi_sio_quirk *)id->driver_info;
if (quirk && quirk->probe) {
int ret = quirk->probe(serial);
if (ret != 0)
return ret;
}
usb_set_serial_data(serial, (void *)id->driver_info);
retu... | false | false | false | false | false | 0 |
getContainedRegions( URegionType type ) const {
loadRegionData();
UErrorCode status = U_ZERO_ERROR;
UVector *result = new UVector(NULL, uhash_compareChars, status);
StringEnumeration *cr = getContainedRegions();
for ( int32_t i = 0 ; i < cr->count(status) ; i++ ) {
const char *id = cr->ne... | false | false | false | false | false | 0 |
appendValue(const string& value) {
if (m_Value == "") {
m_Value = value;
if (m_Unquote) str_remove_quote(m_Value);
} else {
string temp = value;
if (m_Unquote) str_remove_quote(temp);
m_Value += string(" ") + temp;
}
m_Card++;
return true;
} | false | false | false | false | false | 0 |
__ecereConstructor_CompilerConfig(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct CompilerConfig * __ecerePointer_CompilerConfig = (struct CompilerConfig *)(this ? (((char *)this) + __ecereClass_CompilerConfig->offset) : 0);
__ecerePointer_CompilerConfig->includeDirs = __ecereNameSpace__ecere__com__eIns... | false | false | false | true | false | 1 |
get_nonnull_operand (tree arg_num_expr, unsigned HOST_WIDE_INT *valp)
{
/* Verify the arg number is a constant. */
if (TREE_CODE (arg_num_expr) != INTEGER_CST
|| TREE_INT_CST_HIGH (arg_num_expr) != 0)
return false;
*valp = TREE_INT_CST_LOW (arg_num_expr);
return true;
} | false | false | false | false | false | 0 |
xmms_volume_map_equal (xmms_volume_map_t *a, xmms_volume_map_t *b)
{
guint i;
g_assert (a);
g_assert (b);
if (a->num_channels != b->num_channels) {
return FALSE;
}
for (i = 0; i < a->num_channels; i++) {
gint j;
j = xmms_volume_map_lookup (b, a->names[i]);
if (j == -1 || b->values[j] != a->values[i]) ... | false | false | false | false | false | 0 |
via_config(int which, const struct via6522_interface *intf)
{
if (which >= MAX_VIA) return;
via[which].intf = intf;
via[which].t1ll = 0xf3; /* via at 0x9110 in vic20 show these values */
via[which].t1lh = 0xb5; /* ports are not written by kernel! */
via[which].t2ll = 0xff; /* taken from vice */
via[which].... | false | false | false | false | false | 0 |
HandleBraceObjectClassifier(char *id) /* Record LHS item in braced object */
{
Debug1("HandleClassifier(%s) in action %s\n",id,ACTIONTEXT[ACTION]);
switch (ACTION)
{
case acls:
AddACE(CURRENTOBJECT,id,CLASSBUFF);
break;
case filters:
case strategies:
strcpy(CURRENTITEM... | false | false | false | false | false | 0 |
get_next_token(char *data, int term)
{
int i = 0, j, anti_comma = False;
switch(term) {
case TERM_END:
// while(!IS_END_OR_COMMENT(data[i])) i++; Problems with 2. operand == ';'
while( ((data[i] != ',') || anti_comma) && !(((data[i] == ';') && !anti_comma) || IS_ENDLINE(data[i])) ) {
if((data[i] == '\'') ... | false | false | false | false | true | 1 |
OnADUMaxUpNonKaduChanged( wxSpinEvent& event )
{
#if !defined(CLIENT_GUI)
// std::cout << "(Mr Hyde DBG) OnADUMaxUpNonKaduChanged" << std::endl;
// uint theMin;
// uint theMax;
// ADU_ComputeMaxUpNonKaduSpinRange(theMin, theMax);
wxSpinCtrl* pSpin = CastChild(IDC_ADU_MAXUPNONKADU, wxSpinCtrl);
if (pSpin) {
uin... | false | false | false | false | false | 0 |
makeStream(const std::string& url, const std::string& postdata,
const std::string& cachefile)
{
#ifdef GNASH_CURL_VERBOSE
log_debug("making curl stream for %s", url);
#endif
std::auto_ptr<IOChannel> stream;
try {
stream.reset(new CurlStreamFile(url, postdata, cachefile));
}
catch (... | false | false | false | false | false | 0 |
HexStringToBytes(const char* hexstring,
size_t expected_length) {
const char* src = hexstring;
size_t actual_length = 0;
uint8_t* const raw_data = (uint8_t*)malloc(expected_length);
uint8_t* dst;
if (raw_data == NULL) return NULL;
for (dst = raw_data; actual_length < expec... | false | false | false | false | false | 0 |
ExecEvalNullIf(FuncExprState *nullIfExpr,
ExprContext *econtext,
bool *isNull, ExprDoneCond *isDone)
{
Datum result;
FunctionCallInfo fcinfo;
ExprDoneCond argDone;
if (isDone)
*isDone = ExprSingleResult;
/*
* Initialize function cache if first time through
*/
if (nullIfExpr->func.fn_oid == In... | false | false | false | false | false | 0 |
fatReadSector(Fs_t *This, int sector, int slot,
int bit, int dupe, fatBitMask bitmap)
{
int fat_start, ret;
int nr_sectors;
dupe = (dupe + This->primaryFat) % This->num_fat;
fat_start = This->fat_start + This->fat_len * dupe;
if(bitmap == 0) {
nr_sectors = SECT_PER_ENTRY - bit%SECT_PER_ENTRY;
} e... | false | false | false | false | false | 0 |
ValidateOrReset() {
bool valid_node;
bool valid_domain;
bool valid_resource;
node_name_ = PrepNode(node_name_, &valid_node);
domain_name_ = PrepDomain(domain_name_, &valid_domain);
resource_name_ = PrepResource(resource_name_, &valid_resource);
if (!valid_node || !valid_domain || !valid_resource) {
... | false | false | false | false | false | 0 |
refreshCalibrationMarkers()
{
foreach(QwtPlotMarker *mrk, cal_mrk) {
mrk->detach();
delete mrk;
}
cal_mrk.clear();
if (rideItem->ride()) {
foreach(const RideFileCalibration &calibration, rideItem->ride()->calibrations()) {
QwtPlotMarker *mrk = new QwtPlotMarker;
... | false | false | false | false | false | 0 |
key_reject_and_link(struct key *key,
unsigned timeout,
unsigned error,
struct key *keyring,
struct key *authkey)
{
struct assoc_array_edit *edit;
struct timespec now;
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
if (keyring)
link_ret = __key_link_... | false | false | false | false | false | 0 |
addToStore(const Path & _srcPath,
bool recursive, HashType hashAlgo, PathFilter & filter)
{
Path srcPath(absPath(_srcPath));
debug(format("adding `%1%' to the store") % srcPath);
/* Read the whole path into memory. This is not a very scalable
method for very large paths, but `copyPath' is mainly... | false | false | false | false | false | 0 |
cyapa_pip_bl_exit(struct cyapa *cyapa)
{
u8 bl_gen5_bl_exit[] = { 0x04, 0x00,
0x0B, 0x00, 0x40, 0x00, 0x01, 0x3b, 0x00, 0x00,
0x20, 0xc7, 0x17
};
u8 resp_data[11];
int resp_len;
int error;
resp_len = sizeof(resp_data);
error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
bl_gen5_bl_exit, sizeof(bl_gen5_bl_exit),
... | false | false | false | false | false | 0 |
_tenAnisoEval_Clpmin1_d(const double eval[3]) {
double cl, cp, sum = eval[0] + eval[1] + eval[2];
sum = AIR_MAX(0, sum);
cl = sum ? (eval[0] - eval[1])/sum : 0.0;
cp = sum ? 2*(eval[1] - eval[2])/sum : 0.0;
return AIR_MIN(cl, cp);
} | false | false | false | false | false | 0 |
change_label_var_entry_next_main (Module_table *mpt,
Block *block_head,
Label_table **tpt,
int entry,
int *flg)
{
Block *bpt;
bpt = block_head;
while (bpt != NULL) {... | false | false | false | false | false | 0 |
ensGvsourceMatch(const EnsPGvsource gvs1, const EnsPGvsource gvs2)
{
if (ajDebugTest("ensGvsourceMatch"))
{
ajDebug("ensGvsourceMatch\n"
" gvs1 %p\n"
" gvs2 %p\n",
gvs1,
gvs2);
ensGvsourceTrace(gvs1, 1);
ensGvsourceTrace(... | false | false | false | false | false | 0 |
GetSize(vtkViewport* viewport, int *size)
{
// Check for multiline
if (this->NumberOfLines > 1)
{
this->GetMultiLineSize(viewport, size);
return;
}
// Check for input
if (this->Input == NULL || this->Input[0] == '\0')
{
size[0] = size[1] = 0;
return;
}
vtkTextProperty *tpro... | false | false | false | false | false | 0 |
kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req)
{
int i, cpu, me;
cpumask_var_t cpus;
bool called = true;
struct kvm_vcpu *vcpu;
zalloc_cpumask_var(&cpus, GFP_ATOMIC);
me = get_cpu();
kvm_for_each_vcpu(i, vcpu, kvm) {
kvm_make_request(req, vcpu);
cpu = vcpu->cpu;
/* Set ->requests bit befor... | false | false | false | false | false | 0 |
tracker_needle_icon_item_activated (TrackerNeedle* self, GtkIconView* view, GtkTreePath* path) {
GtkTreeModel* model = NULL;
GtkIconView* _tmp0_ = NULL;
GtkTreeModel* _tmp1_ = NULL;
GtkTreeModel* _tmp2_ = NULL;
GtkTreePath* _tmp3_ = NULL;
g_return_if_fail (self != NULL);
g_return_if_fail (view != NULL);
g_retur... | false | false | false | false | false | 0 |
set_fixed_range(int msr, bool *changed, unsigned int *msrwords)
{
unsigned lo, hi;
rdmsr(msr, lo, hi);
if (lo != msrwords[0] || hi != msrwords[1]) {
mtrr_wrmsr(msr, msrwords[0], msrwords[1]);
*changed = true;
}
} | false | false | false | false | false | 0 |
obj_desc_pval(const object_type *o_ptr, char *buf, size_t max, size_t end)
{
bitflag f[OF_SIZE];
object_flags(o_ptr, f);
if (!flags_test(f, OF_SIZE, OF_PVAL_MASK, FLAG_END)) return end;
strnfcat(buf, max, &end, " (%+d", o_ptr->pval);
if (!of_has(f, OF_HIDE_TYPE))
{
if (of_has(f, OF_STEALTH))
strnfcat(buf... | false | false | false | false | false | 0 |
jack_midi_get_event_count(void* port_buffer)
{
JackMidiBuffer *buf = (JackMidiBuffer*)port_buffer;
if (!buf || !buf->IsValid()) {
return 0;
}
return buf->event_count;
} | false | false | false | false | false | 0 |
mindex_retrieve_first(Term t, Mindex mdx, Querytype qtype,
Context query_subst, Context found_subst,
BOOL partial_match,
Mindex_pos *ppos)
{
Mindex_pos pos;
if ((mdx->index_type == DISCRIM_WILD || mdx->index_type == DISCRIM_BIND) &&
qtype != GENERALIZATION)
return NULL;
else {
po... | false | false | false | false | false | 0 |
get_alpha_tile_info(int tile_index)
{
UINT16 data = atarigen_alpha[tile_index];
int code = data & 0x3ff;
int color = ((data >> 10) & 0x0f) | ((data >> 9) & 0x20);
int opaque = data & 0x8000;
SET_TILE_INFO(1, code, color, opaque ? TILE_IGNORE_TRANSPARENCY : 0);
} | false | false | false | false | false | 0 |
kg_queue_externalize(kcontext, arg, buffer, lenremain)
krb5_context kcontext;
krb5_pointer arg;
krb5_octet **buffer;
size_t *lenremain;
{
krb5_error_code err;
err = krb5_ser_pack_int32(KV5M_GSS_QUEUE, buffer, lenremain);
if (err == 0)
err = g_queue... | false | false | false | false | false | 0 |
alloc_equal_val_array(int count)
{
equal_val_array *p;
int i;
p = (equal_val_array *) G_calloc(1, sizeof(equal_val_array));
p->count = count;
p->values = (equal_val **) G_calloc(p->count, sizeof(equal_val *));
for (i = 0; i < p->count; i++)
p->values[i] = (equal_val *) G_calloc(1, sizeof(eq... | false | false | false | false | false | 0 |
retrieve_file(char * arg,int fd, int silent,
struct stat *stat, unsigned long long * amount_written)
{
int flags=O_RDONLY;
int ret=0;
struct afp_file_info * fp;
char path[PATH_MAX];
off_t offset = 0;
#define BUF_SIZE 102400
size_t size = BUF_SIZE;
char buf[BUF_SIZE];
int eof;
unsigned long long total=0;
str... | true | true | false | false | false | 1 |
emitOUT(const Instruction *i)
{
code[0] = 0x00000006;
code[1] = 0x1c000000;
emitPredicate(i);
defId(i->def(0), 14); // new secret address
srcId(i->src(0), 20); // old secret address, should be 0 initially
assert(i->src(0).getFile() == FILE_GPR);
if (i->op == OP_EMIT)
code[0] |= 1 << 5;
... | false | false | false | false | false | 0 |
restore_game(saveref, warn)
frefid_t saveref;
int warn;
{
struct integer_type *current_integer = integer_table;
struct function_type *current_function = function_table;
struct string_type *current_string = string_table;
int index, counter;
int file_objects,
... | false | false | false | false | false | 0 |
cs_next_array_decoded(shade_coord_stream_t * cs, int num_bits,
const float decode[2], float *pvalue)
{
float value;
uint read;
if (sgets(cs->s, (byte *)&value, sizeof(float), &read) < 0 ||
read != sizeof(float)
) {
cs->ds_EOF = true;
return_error(gs_error_r... | false | true | false | false | true | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.