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 |
|---|---|---|---|---|---|---|
pbx_parseable_goto(struct ast_channel *chan, const char *goto_string, int async)
{
char *exten, *pri, *context;
char *stringp;
int ipri;
int mode = 0;
if (ast_strlen_zero(goto_string)) {
ast_log(LOG_WARNING, "Goto requires an argument ([[context,]extension,]priority)\n");
return -1;
}
stringp = ast_strdupa(... | false | false | false | false | false | 0 |
binary_search(char *front, char *back)
{
char *p;
p = front + (back - front) / 2;
SKIP_PAST_NEWLINE(p, back);
/*
* If the file changes underneath us, make sure we don't
* infinitely loop.
*/
while (p < back && back > front) {
if (compare(p, back) == GREATER)
front = p;
else
back = p;
p = front ... | false | false | false | false | false | 0 |
allocOBS(alOBS, aType, apData)
eOBS_t *alOBS;
char aType;
void *apData;
{
eOBS_t *pOBS;
pOBS = (eOBS_t*)malloc(sizeof(eOBS_t));
pOBS->Type = aType;
if (aType == C_OBSITEM_WIDTH)
pOBS->Data = (void*)(MBK2DEF_length ((long)apData));
else
pOBS->Data = apData;
/* Add ... | false | false | false | false | false | 0 |
GetBoomLength(Tube *tube) {
double max=0; /** Max x **/
double min=0; /** Min x **/
bool first; /** Is first elements? **/
first = true;
while(tube != NULL) {
if (first == true) {
if (tube->e1.x > tube->e2.x)
max = tube->e1.x;
else
ma... | false | false | false | false | false | 0 |
val_to_index( FL_OBJECT * ob,
int val )
{
int i;
FLI_MENU_SPEC *sp = ob->spec;
if ( ISPUP( sp ) )
return val;
for ( i = 1; i <= sp->numitems; i++ )
if ( val == sp->mval[ i ] )
return i;
return -1;
} | false | false | false | false | false | 0 |
SendFileCommand(CPartFile *file, ec_tagname_t cmd)
{
CECPacket req(cmd);
req.AddTag(CECTag(EC_TAG_PARTFILE, file->GetFileHash()));
m_conn->SendPacket(&req);
} | false | false | false | false | false | 0 |
xenvif_check_gop(struct xenvif *vif, int nr_meta_slots,
struct netrx_pending_operations *npo)
{
struct gnttab_copy *copy_op;
int status = XEN_NETIF_RSP_OKAY;
int i;
for (i = 0; i < nr_meta_slots; i++) {
copy_op = npo->copy + npo->copy_cons++;
if (copy_op->status != GNTST_okay) {
netdev_dbg(vif->d... | false | false | false | false | false | 0 |
ispartitioned(StackInfo *si)
{
Object subo;
if (si->inclass != CLASS_SERIES)
goto error;
subo = DXGetSeriesMember((Series)si->thisobj, 0, NULL);
if (!subo)
goto error;
if (DXGetObjectClass(subo) == CLASS_GROUP &&
DXGetGroupClass((Group)subo) == CLASS_COMPOSITEFIELD)
return OK;
... | false | false | false | false | false | 0 |
SbrCrcCheck (HANDLE_FDK_BITSTREAM hBs, /*!< handle to bit-buffer */
LONG NrBits) /*!< max. CRC length */
{
int crcResult = 1;
ULONG NrCrcBits;
ULONG crcCheckResult;
LONG NrBitsAvailable;
ULONG crcCheckSum;
crcCheckSum = FDKreadBits (hBs, 10);
NrBitsAvailable = FDKgetVali... | false | false | false | false | false | 0 |
step_gradient(trap_gradient *g, int num_components)
{
int i;
if (g->den == 0)
return;
for (i = 0; i < num_components; i++) {
int64_t fc = g->f[i] + (int64_t)g->num[i] * fixed_1;
int32_t fc32;
g->c[i] += (int32_t)(fc / g->den);
fc32 = (int32_t)(fc - fc / g->den * g-... | false | false | false | false | false | 0 |
first_phase (abfd, type, src)
bfd *abfd;
int type;
char *src;
{
asection *section = bfd_abs_section_ptr;
unsigned int len;
char sym[17]; /* A symbol can only be 16chars long */
switch (type)
{
case '6':
/* Data record - read it and store it */
{
bfd_vma addr = getvalue (&s... | false | false | false | false | false | 0 |
more_specialized_class (tree tmpl, tree pat1, tree pat2)
{
tree targs;
tree tmpl1, tmpl2;
int winner = 0;
bool any_deductions = false;
tmpl1 = TREE_TYPE (pat1);
tmpl2 = TREE_TYPE (pat2);
/* Just like what happens for functions, if we are ordering between
different class template specializations, we... | false | false | false | false | false | 0 |
setInitBuffer(const unsigned int* buffer, size_t size) {
fInitBufferLen = size;
delete[] fInitBuffer;
fInitBuffer = new unsigned int[size];
memcpy(fInitBuffer, buffer, size * sizeof(unsigned int));
} | false | false | false | false | false | 0 |
_PBOX(CTX ctx, ksfp_t *sfp, struct klr_PROBE_t *op)
{
size_t rtnidx = op->sfpidx;
klr_LDMTD_t *opP = (klr_LDMTD_t*)(((kopl_t*)op) - 2);
DBG_ASSERT(opP->opcode == OPCODE_LDMTD);
ktype_t rtype = knh_Param_rtype(DP(opP->mtdNC)->mp);
rtype = ktype_tocid(ctx, rtype, O_cid(sfp[rtnidx+K_CALLDELTA].o));
if(IS_Tunbox(rtyp... | false | false | false | false | false | 0 |
is_in_rect_area(int x, int y, SDL_Rect rect)
{
return ((x >= rect.x) && (x < rect.x + rect.w)
&& (y >= rect.y) && (y < rect.y + rect.h));
} | false | false | false | false | false | 0 |
GetEntity() const
{
if (entity == NULL)
{
// This is the part Stephen doesn't like..
const_cast<FCDEntityReference*>(this)->LoadEntity();
}
return entity;
} | false | false | false | false | false | 0 |
preErrSprintf (const char *fmt, ...)
{
char *preBuffer = NULL; /* Stores the prepended message. */
size_t preBuff_len = 0; /* Allocated length of preBuffer. */
va_list ap; /* Contains the data needed by fmt. */
myAssert (sizeof (char) == 1);
if (fmt == NULL) {
return;
}
va_start (a... | false | false | false | false | false | 0 |
gsb_account_delete ( void )
{
gint deleted_account;
gint page_number;
GSList *list_tmp;
gchar* tmpstr;
deleted_account = gsb_gui_navigation_get_current_account ();
tmpstr = g_strdup_printf (_("Delete account \"%s\"?"),
gsb_data_account_get_name ( deleted_account ) ) ;
if ( !question... | false | false | false | false | false | 0 |
createFieldFromDict (Object* obj, XRef *xrefA, const Ref& pref)
{
Object obj2;
FormField *field;
if (Form::fieldLookup(obj->getDict (), "FT", &obj2)->isName("Btn")) {
field = new FormFieldButton(xrefA, obj, pref);
} else if (obj2.isName("Tx")) {
field = new FormFieldText(xrefA, obj, pref);
... | false | false | false | false | false | 0 |
FindLayer( const char * pszModule )
{
int iLayer;
for( iLayer = 0; iLayer < nLayers; iLayer++ )
{
if( EQUAL(pszModule,
oCATD.GetEntryModule( panLayerCATDEntry[iLayer] ) ) )
{
return iLayer;
}
}
return -1;
} | false | false | false | false | false | 0 |
frequency_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
FrequencyToolState *state)
{
int the_n;
gboolean predetermined_bins;
GSList *input_range;
GnmValue *input_range_2 = NULL;
input_range = gnm_expr_entry_parse_as_list
(GNM_EXPR_ENTRY (state->base.input_entry), state->bas... | false | false | false | false | false | 0 |
copyGlobalVariableProto(TypeMapTy &TypeMap,
const GlobalVariable *SGVar) {
// No linking to be performed or linking from the source: simply create an
// identical version of the symbol over in the dest module... the
// initializer will be filled in later by LinkGlobalInits.
... | false | false | false | false | false | 0 |
glfwGetProcAddress(const char* procname)
{
_GLFWwindow* window;
assert(procname != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
window = _glfwPlatformGetTls(&_glfw.context);
if (!window)
{
_glfwInputError(GLFW_NO_CURRENT_CONTEXT, NULL);
return NULL;
}
return window->cont... | false | false | false | false | false | 0 |
nodelist_remove_routerinfo(routerinfo_t *ri)
{
node_t *node = node_get_mutable_by_id(ri->cache_info.identity_digest);
if (node && node->ri == ri) {
node->ri = NULL;
if (! node_is_usable(node)) {
nodelist_drop_node(node, 1);
node_free(node);
}
}
} | false | false | false | false | false | 0 |
do_pageup ()
{
int nowvalue =
((gint)
((GtkAdjustment *) wordlist_adjust)->value);
if (((selected_wordlist_item)>=nowvalue+6)||((selected_wordlist_item)<nowvalue))
{
nowvalue = selected_wordlist_item;
if (nowvalue > g_pReciteWord->now_zu_wordcount - 6)
nowvalue = g_pReciteWord->now_zu_wordcount - 6;
(... | false | false | false | false | false | 0 |
rhs (double *x, double *b, cs_long_t m)
{
cs_long_t i ;
for (i = 0 ; i < m ; i++) b [i] = 1 + ((double) i) / m ;
for (i = 0 ; i < m ; i++) x [i] = b [i] ;
} | false | false | false | false | false | 0 |
vl_scalespace_get_default_geometry (vl_size width, vl_size height)
{
VlScaleSpaceGeometry geom ;
assert(width >= 1) ;
assert(height >= 1) ;
geom.width = width ;
geom.height = height ;
geom.firstOctave = 0 ;
geom.lastOctave = VL_MAX(floor(vl_log2_d(VL_MIN(width, height))) - 3, 0) ;
geom.octaveResolution=... | false | false | false | false | false | 0 |
get_newsgroups(void)
{
char *buffer;
long status;
buffer = server_comm(main_server, "LIST\r\n", False);
if (!buffer)
return -1;
sscanf(buffer, "%ld", &status);
if (status != NNTP_OK_GROUPS)
return status;
global.no_groups = 0;
while ((buffer = server_read(main_server)) && !IS_DOT(buf... | false | false | false | false | false | 0 |
qlcnic_83xx_idc_check_state_validity(struct qlcnic_adapter *adapter,
u32 state)
{
u32 cur, prev, next;
cur = adapter->ahw->idc.curr_state;
prev = adapter->ahw->idc.prev_state;
next = state;
if ((next < QLC_83XX_IDC_DEV_COLD) ||
(next > QLC_83XX_IDC_DEV_QUISCENT)) {
dev_err(&adapter->pdev->dev,
"%... | false | false | false | false | false | 0 |
xmms_ringbuf_peek (xmms_ringbuf_t *ringbuf, gpointer data, guint len)
{
g_return_val_if_fail (ringbuf, 0);
g_return_val_if_fail (data, 0);
g_return_val_if_fail (len > 0, 0);
g_return_val_if_fail (len <= ringbuf->buffer_size_usable, 0);
return read_bytes (ringbuf, (guint8 *) data, len);
} | false | false | false | false | false | 0 |
_rsvg_handle_allow_load (RsvgHandle *handle,
const char *uri,
GError **error)
{
RsvgHandlePrivate *priv = handle->priv;
GFile *base;
char *path, *dir;
char *scheme = NULL, *cpath = NULL, *cdir = NULL;
g_assert (handle->priv->load_policy == RSVG_LOAD... | false | false | false | false | false | 0 |
GetLength(const byte* input, word32* inOutIdx, int* len)
{
int length = 0;
word32 i = *inOutIdx;
byte b = input[i++];
if (b >= ASN_LONG_LENGTH) {
word32 bytes = b & 0x7F;
while (bytes--) {
b = input[i++];
length = (length << 8) | b;
}
}
... | false | false | false | false | false | 0 |
new_folder_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
FolderItem *new_item;
gchar *new_folder;
gchar *name;
gchar *p;
gchar separator = '/';
if (!folderview->selected) return;
item = gtk_cmctree_n... | false | false | false | false | false | 0 |
pipeReadRecord(pstream_t *pstreamptr, double *data, int *nmiss)
{
char *pname = pstreamptr->name;
pipe_t *pipe = pstreamptr->pipe;
*nmiss = 0;
if ( PipeDebug ) Message("%s pstreamID %d", pname, pstreamptr->self);
// LOCK
pthread_mutex_lock(pipe->mutex);
while ( pipe->hasdata == 0 )
{
if ( Pipe... | false | false | false | false | false | 0 |
fe_recode_remove_cmd (const char *data, SERVER_REC *server, WI_ITEM_REC *witem)
{
const char *target;
void *free_arg;
if (! cmd_get_params(data, &free_arg, 1, &target))
return;
if (! *target) {
target = fe_recode_get_target(witem);
if (! target)
goto end;
}
if (iconfig_get_str("conversions", target, N... | false | false | false | false | false | 0 |
delete_line(AoBookmarkList *bm, gint line_nr)
{
AoBookmarkListPrivate *priv = AO_BOOKMARK_LIST_GET_PRIVATE(bm);
priv->search_line = line_nr + 1;
priv->search_iter = NULL;
gtk_tree_model_foreach(GTK_TREE_MODEL(priv->store), tree_model_foreach, bm);
if (priv->search_iter != NULL)
{
gtk_list_store_remove(priv->st... | false | false | false | false | false | 0 |
read_binary_period_entry(char *& data, period_entry_t * entry,
transaction_t *& xact_pool, bool& finalize)
{
read_binary_entry_base(data, entry, xact_pool, finalize);
read_binary_string(data, &entry->period_string);
std::istringstream stream(entry->period_string);
entry->period.parse(stream);
} | false | false | false | false | false | 0 |
tmpPath() {return settings()->path(Core::ISettings::ApplicationTempPath) + "/freeicd_downloads";} | false | false | false | false | false | 0 |
addInfoToLogPlain(const char *str)
{
myInfos.push_back(str);
} | false | false | false | false | false | 0 |
readin_version(dp)
at_read_desc *dp ;
{
unsigned long buffer_size ; /* size of buffer */
struct stat statbuf ; /* argument to fstat(2) */
unsigned long nbytes ; /* no of bytes already read */
unsigned long nread ; /* no of bytes read at one time */
char *newbuf ;
if (fstat(dp->ar_fd, &stat... | false | false | false | false | true | 1 |
FileSize() const
{
unsigned int Count = 0;
for (const char **I = FileList; I != 0 && *I != 0; I++)
Count++;
return Count;
} | false | false | false | false | false | 0 |
___device_process_close_raw_virt
___P((___device_stream *self,
int direction),
(self,
direction)
___device_stream *self;
int direction;)
{
___device_process *d = ___CAST(___device_process*,self);
___SCMOBJ e = ___device_pipe_close_raw_virt (self, direction);
if (e == ___FIX(___NO_ERR... | false | false | false | false | false | 0 |
chick_reslash(edict_t *self)
{
if (self->enemy->health > 0)
{
if (range (self, self->enemy) == RANGE_MELEE) {
if (random() <= 0.9)
{
self->monsterinfo.currentmove = &chick_move_slash;
return;
}
else
{
self->monsterinfo.currentmove = &chick_move_end_slash;
return;
}
}
}
self... | false | false | false | false | false | 0 |
getExpandInfo()
{
gint i;
gboolean* expandeds = NULL;
gint nNodes = 0;
gchar* pathString = NULL;
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeView));
nNodes = 0;
pathString = g_strdup_printf("%d", nNodes);
while (gtk_tree_model_get_iter_from_string (model, &iter, pathStri... | false | false | false | false | false | 0 |
scheduleRelayout(RenderObject *clippedObj)
{
if (!isCanvas()) return;
KHTMLView *view = static_cast<RenderCanvas *>(this)->view();
if ( view )
view->scheduleRelayout(clippedObj);
} | false | false | false | false | false | 0 |
ml_module_memory_initialization(mca_coll_ml_module_t *ml_module)
{
int ret;
int nbanks, nbuffers, buf_size;
mca_coll_ml_component_t *cs = &mca_coll_ml_component;
ml_module->payload_block = mca_coll_ml_allocate_block(cs,ml_module->payload_block);
if (NULL == ml_module->payload_block) {
ML_E... | false | false | false | false | false | 0 |
cavan_exec_redirect_stdio_main(const char *command, int lines, int columns, int ttyin, int ttyout)
{
int ret;
int ttyfd;
pid_t pid;
ttyfd = cavan_exec_redirect_stdio_popen(command, lines, columns, &pid);
if (ttyfd < 0)
{
pr_red_info("cavan_exec_redirect_stdio_popen");
return ttyfd;
}
if (ttyin < 0)
{
t... | false | false | false | false | false | 0 |
PriorityQueue_delete(PriorityQueue q){
int i;
if (q){
if (q->buckets){
for (i = 0; i < q->ngain+1; i++) DoubleLinkedList_delete((q->buckets)[i], free);
FREE(q->buckets);
}
if (q->where){
FREE(q->where);
}
FREE(q->gain);
FREE(q);
}
} | false | false | false | false | false | 0 |
mips64_tlb_raw_dump(cpu_gen_t *cpu)
{
cpu_mips_t *mcpu = CPU_MIPS64(cpu);
tlb_entry_t *entry;
u_int i;
printf("TLB dump:\n");
for(i=0;i<mcpu->cp0.tlb_entries;i++) {
entry = &mcpu->cp0.tlb[i];
printf(" %2d: mask=0x%16.16llx hi=0x%16.16llx "
"lo0=0x%16.16llx lo1=0x%16.16llx\n",
... | false | false | false | false | false | 0 |
highbank_initialize_phys(struct device *dev, void __iomem *addr)
{
struct device_node *sata_node = dev->of_node;
int phy_count = 0, phy, port = 0, i;
void __iomem *cphy_base[CPHY_PHY_COUNT] = {};
struct device_node *phy_nodes[CPHY_PHY_COUNT] = {};
u32 tx_atten[CPHY_PORT_COUNT] = {};
memset(port_data, 0, sizeof(s... | false | false | false | false | false | 0 |
determineASpellV6()
{
QString result;
FILE *fs = popen("aspell -v", "r");
if (fs)
{
// Close textstream before we close fs
{
QTextStream ts(fs, QIODevice::ReadOnly);
result = ts.readAll().trimmed();
}
pclose(fs);
}
QRegExp rx("Aspell (\\d.\\d)");
if (rx.indexIn(result) != -1)
... | false | false | false | false | false | 0 |
write_siz (GstJP2kDecimator * self, GstByteWriter * writer,
const ImageSize * siz)
{
gint i;
if (!gst_byte_writer_ensure_free_space (writer,
2 + 38 + 3 * siz->n_components)) {
GST_ERROR_OBJECT (self, "Could not ensure free space");
return GST_FLOW_ERROR;
}
gst_byte_writer_put_uint16_be_u... | false | false | false | false | false | 0 |
wiimod_no_mp_remove(const struct wiimod_ops *ops,
struct wiimote_data *wdata)
{
unsigned long flags;
spin_lock_irqsave(&wdata->state.lock, flags);
wdata->state.flags |= WIIPROTO_FLAG_NO_MP;
spin_unlock_irqrestore(&wdata->state.lock, flags);
} | false | false | false | false | false | 0 |
urf_device_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
UrfDevice *device = URF_DEVICE (object);
gboolean block;
switch (prop_id) {
case PROP_DEVICE_SOFT:
block = g_value_get_boolean (value);
urf_device_set_block (device, block);
break;
d... | false | false | false | false | false | 0 |
collect_statement(Pe_statement *pe_head, Statement *spt)
{
Statement *rpt = NULL, *tpt;
if (pe_head != NULL) {
for (rpt = pe_head->stm_head;
rpt != spt && rpt != NULL;
rpt = rpt->next);
if (rpt->prev == NULL) {
if (rpt->next == NULL) {
pe_head->stm_head = NULL;
} else {
rpt->next->... | false | false | false | true | false | 1 |
ptaaReadStream(FILE *fp)
{
l_int32 i, n, version;
PTA *pta;
PTAA *ptaa;
PROCNAME("ptaaReadStream");
if (!fp)
return (PTAA *)ERROR_PTR("stream not defined", procName, NULL);
if (fscanf(fp, "\nPtaa Version %d\n", &version) != 1)
return (PTAA *)ERROR_PTR("not a ptaa file", procName,... | false | false | false | false | false | 0 |
fc_fcp_abts_resp(struct fc_fcp_pkt *fsp, struct fc_frame *fp)
{
int ba_done = 1;
struct fc_ba_rjt *brp;
struct fc_frame_header *fh;
fh = fc_frame_header_get(fp);
switch (fh->fh_r_ctl) {
case FC_RCTL_BA_ACC:
break;
case FC_RCTL_BA_RJT:
brp = fc_frame_payload_get(fp, sizeof(*brp));
if (brp && brp->br_reason... | false | false | false | false | false | 0 |
Write32(unsigned long val, ostream& ofs)
{
char p[4];
for(int i=0; i<4; ++i)
{
p[3-i] = (char)val % 0x100;
val /= 0x100;
}
ofs.write(p, 4);
} | false | false | false | false | false | 0 |
canFlipVertical(ViewLayer::ViewID viewID) {
ViewImage * viewImage = m_viewImages.value(viewID);
if (viewImage == NULL) return false;
return viewImage->canFlipVertical;
} | false | false | false | false | false | 0 |
slotActivated() {
const QObject *snd;
snd=sender();
if (snd) {
GWEN_WIDGET *w;
const char *wname;
int rv=GWEN_DialogEvent_ResultNotHandled;
w=GWEN_Dialog_FindWidgetByImplData(_dialog->getCInterface(), QT4_DIALOG_WIDGET_REAL, snd);
if (w==NULL) {
DBG_INFO(0, "Widget not found");
r... | false | false | false | false | false | 0 |
clever_debug_(const char* file, long line, const char* format, ...) {
va_list vl;
std::ostringstream out;
va_start(vl, format);
out << "[DEBUG] " << file << ":" << line << ": ";
vsprintf(out, format, vl);
va_end(vl);
std::cerr << out.str() << std::endl;
} | false | false | false | false | false | 0 |
allocate_poly_list()
{
for (int i = 0; i < MAX_MODEL_TEXTURES; i++) {
polygon_list[i].allocate(tri_count[i]*3);
}
model_allocate_interp_data(Interp_num_verts, Interp_num_norms);
} | false | false | false | false | false | 0 |
windows_get_remote_entry (Private_Repl_Protocol *prp, const Slapi_DN* remote_dn,Slapi_Entry **remote_entry)
{
int retval = 0;
ConnResult cres = 0;
char *filter = "(objectclass=*)";
const char *searchbase = NULL;
Slapi_Entry *found_entry = NULL;
searchbase = slapi_sdn_get_dn(remote_dn);
cres = windows_search_ent... | false | false | false | false | false | 0 |
dockedWindows() {
QList<Window> windows;
QListIterator<TrayItem*> ti(m_trayItems);
while (ti.hasNext()) {
windows.append(ti.next()->dockedWindow());
}
return windows;
} | false | false | false | false | false | 0 |
write(hsStream* S, plResManager* mgr) {
S->writeInt(fAnimPathFlags);
bool useTM = S->getVer().isUruSP();
if (S->getVer().isUniversal()) {
useTM = (fTMController != NULL);
S->writeBool(useTM);
}
if (useTM) {
plTMController* controller = fTMController;
if (controller ... | false | false | false | false | false | 0 |
construct_get_dest_keyring(struct key **_dest_keyring)
{
struct request_key_auth *rka;
const struct cred *cred = current_cred();
struct key *dest_keyring = *_dest_keyring, *authkey;
int ret;
kenter("%p", dest_keyring);
/* find the appropriate keyring */
if (dest_keyring) {
/* the caller supplied one */
key... | false | false | false | false | false | 0 |
knh_String_checkASCII(kString *o)
{
unsigned char ch = 0;
long len = S_size(o);
const kchar_t *p = (const kchar_t *) S_totext(o);
#ifdef K_USING_FASTESTFASTMODE /* written by ide */
int len = S_size(o), n = (len + 3) / 4;
/* Duff's device */
switch(len%4){
case 0: do{ ch |= *p++;
case 3: ch |= *p++;
case 2... | false | false | false | false | false | 0 |
get_location(struct scsi_tape *STp, unsigned int *block, int *partition,
int logical)
{
int result;
unsigned char scmd[MAX_COMMAND_SIZE];
struct st_request *SRpnt;
if (STp->ready != ST_READY)
return (-EIO);
memset(scmd, 0, MAX_COMMAND_SIZE);
if ((STp->device)->scsi_level < SCSI_2) {
scmd[0] = QFA_REQUEST... | false | false | false | false | false | 0 |
est_size(struct mail_address *a)
{
int cnt = 0;
for(; a; a = a->next){
/* two times personal for possible quoting */
cnt += 2 * (a->personal ? (strlen(a->personal)+1) : 0);
cnt += 2 * (a->mailbox ? (strlen(a->mailbox)+1) : 0);
cnt += (a->adl ? strlen(a->adl) : 0);
cnt += (a->host ... | false | false | false | false | false | 0 |
host_addr_to_name(host_addr_t addr)
{
socket_addr_t sa;
if (host_addr_can_convert(addr, NET_TYPE_IPV4)) {
(void) host_addr_convert(addr, &addr, NET_TYPE_IPV4);
}
if (0 == socket_addr_set(&sa, addr, 0)) {
return NULL;
}
#ifdef HAS_GETNAMEINFO
{
static char host[1025];
int error;
error = getnameinfo(so... | false | false | false | false | false | 0 |
imap_cram_md5(struct mailbox *mp, char *xuser, const char *xpass)
{
char o[LINESIZE];
const char *user, *pass;
char *cp;
FILE *queuefp = NULL;
enum okay ok = STOP;
retry: if (xuser == NULL) {
if ((user = getuser()) == NULL)
return STOP;
} else
user = xuser;
if (xpass == NULL) {
if ((pass = getpassword(... | false | false | false | false | false | 0 |
udbg_enumString(UDebugEnumType type, int32_t field) {
if(strs == NULL ) {
udbg_setup();
}
if(type<0||type>=UDBG_ENUM_COUNT) {
// use UDBG_ENUM_COUNT,0 to mean an empty string
//fprintf(stderr, "** returning out of range on %d\n",type);
//fflush(stderr);
return strs[U... | false | false | false | false | false | 0 |
tomoyo_update_mount_acl(struct tomoyo_acl_param *param)
{
struct tomoyo_mount_acl e = { .head.type = TOMOYO_TYPE_MOUNT_ACL };
int error;
if (!tomoyo_parse_name_union(param, &e.dev_name) ||
!tomoyo_parse_name_union(param, &e.dir_name) ||
!tomoyo_parse_name_union(param, &e.fs_type) ||
!tomoyo_parse_numb... | false | false | false | false | false | 0 |
f(const Vector &woW, const Vector &wiW,
BxDFType flags) const {
PBRT_STARTED_BSDF_EVAL();
Vector wi = WorldToLocal(wiW), wo = WorldToLocal(woW);
if (Dot(wiW, ng) * Dot(woW, ng) > 0) // ignore BTDFs
flags = BxDFType(flags & ~BSDF_TRANSMISSION);
else // ignore BRDFs
flags ... | false | false | false | false | false | 0 |
gdata_gc_contact_website_from_attribute (EVCardAttribute *attr,
gboolean *have_primary)
{
GDataGContactWebsite *website = NULL;
GList *values;
values = e_vcard_attribute_get_values (attr);
if (values) {
GList *types;
gchar *rel;
const gchar *label;
gboolean primary;... | false | false | false | false | false | 0 |
gretl_VAR_get_forecast_matrix (GRETL_VAR *var, int t1, int t2,
DATASET *dset, gretlopt opt,
int *err)
{
if (var->F != NULL) {
/* there's a forecast attached, but it may not be what we want */
gretl_matrix_free(var->F);
var->F = NULL;
}
if (var->ci == VECM) {
*err = VECM_add_forecas... | false | false | false | false | false | 0 |
lpfc_reg_rpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t did,
uint8_t *param, LPFC_MBOXQ_t *pmb, uint16_t rpi)
{
MAILBOX_t *mb = &pmb->u.mb;
uint8_t *sparam;
struct lpfc_dmabuf *mp;
memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
mb->un.varRegLogin.rpi = 0;
if (phba->sli_rev == LPFC_SLI_REV4)
mb->un.varRegLogi... | false | true | false | false | false | 1 |
removeReadsFromIndices(const std::string& allReadsPrefix, const std::string& readsToRemove,
const std::string& outPrefix, const std::string& bwt_extension,
const std::string& sai_extension, bool doReverse, int numThreads)
{
std::string bwt_filename = makeFi... | false | false | false | false | false | 0 |
kmo_rotate_x_y_cal (const float rot_ang, const int ifu_nr, /*const gridDefinition *gd,*/
cpl_image *xcal, cpl_image *ycal, cpl_image *lcal) {
cpl_error_code return_code = CPL_ERROR_NONE;
cpl_size ix = 0,
nx = 0,
ny = 0,
size =... | false | false | false | false | false | 0 |
tpm_bios_log_teardown(struct dentry **lst)
{
int i;
for (i = 0; i < 3; i++)
securityfs_remove(lst[i]);
} | false | false | false | false | false | 0 |
as_expires(Request& r, MethodParams& params,
int index, time_t now) {
time_t result;
if(Value* vdate=params[index].as(VDATE_TYPE))
result=static_cast<VDate*>(vdate)->get_time();
else
result=now+(time_t)params.as_double(index, "lifespan must be date or number", r);
return result;
} | false | false | false | false | false | 0 |
quota_link_helper (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
loc_t *newloc, dict_t *xdata)
{
quota_local_t *local = NULL;
int32_t op_errno = EINVAL;
local = frame->local;
if (local == NULL) {
gf_log (this->name, GF_LOG_WARNING, "loc... | false | false | false | false | false | 0 |
reduce_print (void)
{
if (nuseless_nonterminals > 0)
complain (NULL, Wother, ngettext ("%d nonterminal useless in grammar",
"%d nonterminals useless in grammar",
nuseless_nonterminals),
nuseless_nonterminals);
if (nuseless... | false | false | false | false | false | 0 |
findSource(NodeId head) {
assert(unfounded_.empty());
enqueueUnfounded(head); // unfounded, unless we find a new source
VarVec noSourceYet;
bool changed = false;
const NodeId* bodyIt, *bodyEnd;
while (!unfounded_.empty()) {
head = unfounded_.front();
if (!atoms_[head].hasSource()) { // no source
unfounded_... | false | false | false | false | false | 0 |
il_read_char(message, options, flags)
char *message;
char *options;
int flags;
{
char *help;
tty_key_t *ks;
int key, repeat_count;
command_t *command;
input_line_t *saved_il = NULL;
if (flags & IL_SAVE)
saved_il = il_save();
il_reset_line();
if (message)
{
char *text... | false | false | false | false | false | 0 |
gtk_source_buffer_real_delete_range (GtkTextBuffer *buffer,
GtkTextIter *start,
GtkTextIter *end)
{
gint offset, length;
GtkTextMark *mark;
GtkTextIter iter;
GtkSourceBuffer *source_buffer = GTK_SOURCE_BUFFER (buffer);
g_return_if_fail (GTK_SOURCE_IS_BUFFER (buffer));
g_return_if_fail (star... | false | false | false | false | false | 0 |
up_device_hid_is_ups (UpDeviceHid *hid)
{
guint i;
int retval;
gboolean ret = FALSE;
struct hiddev_devinfo device_info;
/* get device info */
retval = ioctl (hid->priv->fd, HIDIOCGDEVINFO, &device_info);
if (retval < 0) {
g_debug ("HIDIOCGDEVINFO failed: %s", strerror (errno));
goto out;
}
/* can we use ... | false | false | false | false | false | 0 |
XML_SetBase(XML_Parser parser, const XML_Char *p)
{
if (p) {
p = poolCopyString(&dtd.pool, p);
if (!p)
return 0;
dtd.base = p;
} else
dtd.base = 0;
return 1;
} | false | false | false | false | false | 0 |
Apply(VersionEdit* edit) {
// Update compaction pointers
for (size_t i = 0; i < edit->compact_pointers_.size(); i++) {
const int level = edit->compact_pointers_[i].first;
vset_->compact_pointer_[level] =
edit->compact_pointers_[i].second.Encode().ToString();
}
// Delete files
... | false | false | false | false | false | 0 |
one_utf8_to_utf16 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp,
uchar **outbufp, size_t *outbytesleftp)
{
int rval;
cppchar_t s = 0;
const uchar *save_inbuf = *inbufp;
size_t save_inbytesleft = *inbytesleftp;
uchar *outbuf = *outbufp;
rval = one_utf8_to_cppchar (inbufp, inbytesleftp, &s... | false | false | false | false | false | 0 |
satisfies(const NodePtr &nd, MatchContext &context) const
{
GroveString ndType;
nd->getGi(ndType);
NodePtr tem;
if (nd->firstSibling(tem) != accessOK)
return 1; // must be document element
unsigned count = 0;
do {
GroveString temType;
if (tem->getGi(temType) == accessOK && temType == ndType) {
... | false | false | false | false | false | 0 |
fzseek(adv_fz* f, long offset, int mode)
{
if (f->type == fz_file) {
switch (mode) {
case SEEK_SET :
return fseek(f->f, f->real_offset + offset, SEEK_SET);
case SEEK_CUR :
return fseek(f->f, offset, SEEK_CUR);
case SEEK_END :
if (f->real_size)
return fseek(f->f, f->real_size - offset, SEEK_... | false | false | false | false | false | 0 |
unity_webapps_action_info_unref (UnityWebappsActionInfo *info)
{
UnityWebappsActionInfo *parent;
info->ref_count = info->ref_count - 1;
UNITY_WEBAPPS_NOTE (ACTION, "Unreferenced action (%s) new count is %u",
info->path, info->ref_count);
parent = info->parent;
if (info->ref_count == 0)
{
... | false | false | false | false | false | 0 |
get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
NMDHCP4Config *self = NM_DHCP4_CONFIG (object);
_nm_object_ensure_inited (NM_OBJECT (object));
switch (prop_id) {
case PROP_OPTIONS:
g_value_set_boxed (value, nm_dhcp4_config_get_options (... | false | false | false | false | false | 0 |
ComposeWindow_get_header_list(clawsmail_ComposeWindowObject *self, PyObject *args)
{
GSList *walk;
PyObject *retval;
retval = Py_BuildValue("[]");
for(walk = self->compose->header_list; walk; walk = walk->next) {
ComposeHeaderEntry *headerentry = walk->data;
const gchar *header;
const gchar *text;
... | false | false | false | false | false | 0 |
cmain_menu ()
{
nnumbers = 1;
nmenu = 4;
menu[0].text = "REGISTER PLAYERS";
menu[0].func = register_players;
menu[1].text = playertext;
menu[1].func = nplayerchange;
minim[0].x = XPOSITION (1);
minim[0].y = YPOSITION (1);
minim[0].line = 1;
minim[0].number = &nplayers;
minim[0].max = maxnplayers;
... | false | false | false | false | false | 0 |
write_tm_cut_list(tm_prob *tm, char *file, char append)
{
FILE *f;
int i, j;
if (!(f = fopen(file, append ? "a" : "w"))){
printf("\nError opening cut file\n\n");
return(0);
}
fprintf(f, "CUTNUM: %i %i\n", tm->cut_num, tm->allocated_cut_num);
for (i = 0; i < tm->cut_num; i++){
fprin... | false | false | false | false | false | 0 |
changeFontSize( float newFontPointSize )
{
mLanguageTextEdit->setFontPointSize( newFontPointSize );
QSettings("grame.fr", "FaustWorks").setValue( FONT_SIZE_SETTING , mLanguageTextEdit->fontPointSize() );
reloadTextEdits();
} | false | false | false | false | false | 0 |
ompi_btl_usnic_proc_lookup_endpoint(ompi_btl_usnic_module_t *receiver,
uint64_t sender_hashed_rte_name)
{
size_t i;
uint32_t mynet, peernet;
ompi_btl_usnic_proc_t *proc;
ompi_btl_usnic_endpoint_t *endpoint;
for (proc = (ompi_btl_usnic_proc_t*)
op... | true | true | false | false | false | 1 |
ipmi_sdr_get_sensor_hysteresis(struct ipmi_intf *intf, uint8_t sensor,
uint8_t target, uint8_t lun, uint8_t channel)
{
struct ipmi_rq req;
uint8_t rqdata[2];
struct ipmi_rs *rsp;
uint32_t save_addr = 0;
uint32_t save_channel;
if ( BRIDGE_TO_SENSOR(intf, target, channel) ) {
save_addr = intf->target_addr;
... | 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.