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 |
|---|---|---|---|---|---|---|
render_color_dots (GstBaseAudioVisualizer * base, guint32 * vdata,
gint16 * adata, guint num_samples)
{
GstSpaceScope *scope = (GstSpaceScope *) base;
guint i, s;
gint x, y, ox, oy;
gfloat dx, dy;
gint w = base->width, w1 = w - 2;
gint h = base->height, h1 = h - 2;
gdouble il, ir;
gdouble f1l_l = sc... | false | false | false | false | false | 0 |
NotifySavePoint(bool isSavePoint) {
SCNotification scn = {0};
if (isSavePoint) {
scn.nmhdr.code = SCN_SAVEPOINTREACHED;
} else {
scn.nmhdr.code = SCN_SAVEPOINTLEFT;
}
NotifyParent(scn);
} | false | false | false | false | false | 0 |
eb_jabber_login(eb_local_account *account)
{
eb_jabber_local_account_data *jlad;
char buff[1024];
if (account->connected || account->connecting)
return;
jlad = (eb_jabber_local_account_data *)account->
protocol_local_account_data;
if (jlad->prompt_password || !jlad->password || !strlen(jlad->password)) {
s... | true | true | false | false | false | 1 |
free_launcher (gpointer data)
{
Launcher *launcher = data;
if (launcher->key_file)
g_key_file_free (launcher->key_file);
launcher->key_file = NULL;
if (launcher->location != NULL)
g_free (launcher->location);
launcher->location = NULL;
g_free (launcher);
} | false | false | false | false | false | 0 |
DoAddFileToProject(const wxString& filename, cbProject* project, wxArrayInt& targets)
{
if (!project)
return 0;
// do we have to ask for target?
if (targets.GetCount() == 0)
{
// if project has only one target, use this
if (project->GetBuildTargetsCount() == 1)
targe... | false | false | false | false | false | 0 |
invoke_smalltalk_closure (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
{
SmalltalkClosure *stc = (SmalltalkClosure *) closure;
OOP *args = alloca (sizeof (OOP) * stc->n... | false | false | false | false | false | 0 |
create_file_names (const char *file_name)
{
char *cptr;
char *name;
int length = strlen (file_name);
int base;
/* Free previous file names. */
if (bbg_file_name)
free (bbg_file_name);
if (da_file_name)
free (da_file_name);
da_file_name = bbg_file_name = NULL;
bbg_file_time = 0;
bbg_stamp =... | false | true | false | false | false | 1 |
__update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_stateid, const nfs4_stateid *deleg_stateid, fmode_t fmode)
{
/*
* Protect the call to nfs4_state_set_mode_locked and
* serialise the stateid update
*/
spin_lock(&state->owner->so_lock);
write_seqlock(&state->seqlock);
if (deleg_stateid != NULL... | false | false | false | false | false | 0 |
setValue(const QString &key, const QVariant &value)
{
if (m_UserSettings->value(key, QVariant()) == value)
return;
m_UserSettings->setValue(key, value);
m_NeedsSync=true;
} | false | false | false | false | false | 0 |
create_mainwindow()
{
GtkWidget * child_ptr;
GtkListStore * list_store_ptr;
GtkTreeViewColumn * column_ptr;
GtkCellRenderer * text_renderer_ptr;
GError * error;
gchar * ui_filename;
ui_filename = path_get_data_filename("gmidimonitor.ui");
if (ui_filename == NULL)
{
g_warning("Cannot find UI descr... | false | false | false | false | false | 0 |
cli_server_import (cli_infos_t *infos, command_context_t *ctx)
{
xmmsc_result_t *res;
gint i, count;
const gchar *path;
gboolean norecurs;
gboolean retval = TRUE;
if (!command_flag_boolean_get (ctx, "non-recursive", &norecurs)) {
norecurs = FALSE;
}
for (i = 0, count = command_arg_count (ctx); i < count; +... | false | false | false | false | false | 0 |
process_classful_routes (GHashTable *options, NMIP4Config *ip4_config)
{
const char *str;
char **searches, **s;
str = g_hash_table_lookup (options, "new_static_routes");
if (!str)
return;
searches = g_strsplit (str, " ", 0);
if ((g_strv_length (searches) % 2)) {
nm_log_info (LOGD_DHCP, " static routes prov... | false | false | false | false | false | 0 |
read_whole_file (const char *filename)
{
char *r = NULL;
size_t alloc = 0, size = 0;
int fd;
fd = open (filename, O_RDONLY|O_CLOEXEC);
if (fd == -1) {
perror (filename);
return NULL;
}
while (1) {
alloc += 256;
char *r2 = realloc (r, alloc);
if (r2 == NULL) {
perror ("realloc")... | false | false | false | false | false | 0 |
_fsys_remote( char *device, int type )
{
if (( type == NETSNMP_FS_TYPE_NFS) ||
( type == NETSNMP_FS_TYPE_AFS))
return 1;
else
return 0;
} | false | false | false | false | false | 0 |
vxge_hw_vpath_mtu_set(struct __vxge_hw_vpath_handle *vp, u32 new_mtu)
{
u64 val64;
enum vxge_hw_status status = VXGE_HW_OK;
struct __vxge_hw_virtualpath *vpath;
if (vp == NULL) {
status = VXGE_HW_ERR_INVALID_HANDLE;
goto exit;
}
vpath = vp->vpath;
new_mtu += VXGE_HW_MAC_HEADER_MAX_SIZE;
if ((new_mtu < VX... | false | true | false | false | false | 1 |
axis_distance (int p, int axis_start, int axis_size)
{
if (p >= axis_start && p < axis_start + axis_size)
return 0;
else if (p < axis_start)
return (axis_start - p);
else
return (p - (axis_start + axis_size - 1));
} | false | false | false | false | false | 0 |
camlidl_ml2c_dim_struct_ap_dimchange2_t(value _v1, struct ap_dimchange2_t * _c2, camlidl_ctx _ctx)
{
value _v3;
value _v4;
value _v5;
value _v6;
_v3 = Field(_v1, 0);
if (_v3 == Val_int(0)) {
(*_c2).add = NULL;
} else {
_v4 = Field(_v3, 0);
(*_c2).add = (ap_dimchange_t *) camlidl_malloc(sizeof... | false | false | false | false | false | 0 |
readable_pt_servername(int index, int maxlength) {
char *fullname = GBS_ptserver_id_to_choice(index, 0);
if (!fullname) {
#ifdef DEBUG
printf("awar given to awt_create_selection_list_on_pt_servers() does not contain a valid index\n");
#endif
// awt_assert(0); // awar given to awt_create_selec... | false | false | false | false | false | 0 |
Normalize() {
for (size_t i=0; i<folder_.length(); ++i) {
if (IsFolderDelimiter(folder_[i])) {
folder_[i] = folder_delimiter_;
}
}
} | false | false | false | false | false | 0 |
event_kill(IRC_SERVER_REC *server, const char *data,
const char *nick, const char *addr)
{
if (addr != NULL && !server->nick_collision) {
/* don't reconnect if we were killed by an oper (not server) */
server->no_reconnect = TRUE;
}
} | false | false | false | false | false | 0 |
rtsx_pci_remove(struct pci_dev *pcidev)
{
struct pcr_handle *handle = pci_get_drvdata(pcidev);
struct rtsx_pcr *pcr = handle->pcr;
pcr->remove_pci = true;
/* Disable interrupts at the pcr level */
spin_lock_irq(&pcr->lock);
rtsx_pci_writel(pcr, RTSX_BIER, 0);
pcr->bier = 0;
spin_unlock_irq(&pcr->lock);
canc... | false | false | false | false | false | 0 |
rd_stores(void)
{
int i;
u16b tmp16u;
/* Read the stores */
rd_u16b(&tmp16u);
for (i = 0; i < tmp16u; i++)
{
store_type *st_ptr = &store[i];
int j;
byte own, num;
/* XXX */
strip_bytes(6);
/* Read the basic info */
rd_byte(&own);
rd_byte(&num);
/* XXs */
strip_bytes(4);
/* P... | false | false | false | false | false | 0 |
gt_typecheck_info_register_options(GtTypecheckInfo *tci,
GtOptionParser *op)
{
GtOption *typecheck_option, *built_in_option;
gt_assert(tci && op);
gt_assert(!tci->typecheck_option); /* can only called once */
/* -typecheck */
typecheck_option =
gt_option_new_string... | false | false | false | false | false | 0 |
Forward(real lon0, real lat, real lon,
real& x, real& y, real& gamma, real& k)
const throw() {
if (lon - lon0 >= 180)
lon -= lon0 + 360;
else if (lon - lon0 < -180)
lon -= lon0 - 360;
else
lon -= lon0;
lat *= _sign;
// From Snyder, we have
... | false | false | false | false | false | 0 |
setRunTogether(bool b)
{
bruntogether=b;
if(cb2)
cb2->setChecked(b);
} | false | false | false | false | false | 0 |
idl_format(IDL *idl, int isfirsttime, int *done)
{
static char *buf = NULL;
static ID i = 0;
if (buf == NULL) {
buf = (char *)malloc(MAX_BUFFER);
if (buf == NULL)
return "?";
}
buf[0] = 0;
if (0 != isfirsttime) {
i = 0;
}
for (; i < idl->used; i+... | false | false | false | false | false | 0 |
createLine(const FloatPoint& start, const FloatPoint& end)
{
Path path;
if (start.x() == end.x() && start.y() == end.y())
return path;
path.moveTo(start);
path.addLineTo(end);
return path;
} | false | false | false | false | false | 0 |
stk8ba50_read_accel(struct stk8ba50_data *data, u8 reg)
{
int ret;
struct i2c_client *client = data->client;
ret = i2c_smbus_read_word_data(client, reg);
if (ret < 0) {
dev_err(&client->dev, "register read failed\n");
return ret;
}
return ret;
} | false | false | false | false | false | 0 |
folderview_set_folders(FolderView *folderview)
{
GList *list;
list = folder_get_list();
for (; list != NULL; list = list->next) {
folderview_append_folder(folderview, FOLDER(list->data));
}
} | false | false | false | false | false | 0 |
setupExternalType1Font(GooString *fileName, GooString *psName) {
static const char hexChar[17] = "0123456789abcdef";
FILE *fontFile;
int c;
if (fontNames->lookupInt(psName)) {
return;
}
fontNames->add(psName->copy(), 1);
// beginning comment
writePSFmt("%%BeginResource: font {0:t}\n", psName);
e... | false | false | false | false | false | 0 |
load_statistics (void)
{
GSList *raw_list;
AisleriotStatistic *new_stats;
guint64 value;
raw_list = gconf_client_get_list (gconf_client, statistics_key,
GCONF_VALUE_STRING, NULL);
while (raw_list) {
new_stats = g_hash_table_lookup (stats, raw_list->data);
if (!new_stats) {
new_stats =... | false | false | false | false | false | 0 |
gst_ogg_mux_buffer_from_page (GstOggMux * mux, ogg_page * page, gboolean delta)
{
GstBuffer *buffer;
/* allocate space for header and body */
buffer = gst_buffer_new_and_alloc (page->header_len + page->body_len);
gst_buffer_fill (buffer, 0, page->header, page->header_len);
gst_buffer_fill (buffer, page->head... | false | false | false | false | false | 0 |
iscsi_tcp_recv_skb(struct iscsi_conn *conn, struct sk_buff *skb,
unsigned int offset, bool offloaded, int *status)
{
struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
struct iscsi_segment *segment = &tcp_conn->in.segment;
struct skb_seq_state seq;
unsigned int consumed = 0;
int rc = 0;
ISCSI_DBG_TCP(conn... | false | false | false | false | false | 0 |
long_from_operand( x86_op_t *op ) {
if (! IS_IMM(op) ) {
return 0L;
}
switch ( op->datatype ) {
case op_byte:
return (int32_t) op->data.sbyte;
case op_word:
return (int32_t) op->data.sword;
case op_qword:
return (int32_t) op->data.sqword;
case op_dword:
return op->data.sdword;
default:
/... | false | false | false | false | false | 0 |
compile_info(const void *ctx, const char *dir)
{
char *info_c_file, *info, *ccandir, *compiled, *output;
size_t len;
int fd;
/* Copy it to a file with proper .c suffix. */
info = grab_file(ctx, talloc_asprintf(ctx, "%s/_info", dir), &len);
if (!info)
return NULL;
info_c_file = temp_file(ctx, ".c", "_info");
... | false | false | false | false | false | 0 |
AcquireRealTime()
{
return (fThread != (jack_native_thread_t)NULL) ? AcquireRealTimeImp(fThread, fPriority) : -1;
} | false | false | false | false | false | 0 |
rtrim_c(char * pos, short keepcomment) {
char * value = pos;
while (*pos && *pos != '\r' && *pos != '\n' && (keepcomment || *pos != '#')) ++pos;
while (pos > value && isspace(pos[-1])) --pos;
*pos = 0;
return value;
} | false | false | false | false | false | 0 |
FScreenSetState(Bool do_enable)
{
is_xinerama_enabled = do_enable;
if (do_enable && total_screens > 0)
{
num_screens = total_screens;
first_to_check = 1;
last_to_check = total_screens;
}
else
{
num_screens = 0;
first_to_check = 0;
last_to_check = 0;
}
FScreenUpdateEmulationMapState();
} | false | false | false | false | false | 0 |
hartley_r2hc(INT n, const R *xr, INT xs, E *o, R *pr)
{
INT i;
E sr;
o[0] = sr = xr[0]; o += 1;
for (i = 1; i + i < n; ++i) {
R a, b;
a = xr[i * xs];
b = xr[(n - i) * xs];
sr += (o[0] = a + b);
#if FFT_SIGN == -1
o[1] = b - a;
#else
o[1] = a - b;
#endif
o += 2;
}
*pr ... | false | false | false | false | false | 0 |
read_table(Table *tb, char *file, char *keyword)
{
char line[MAXLINE];
// open file
FILE *fp = fopen(file,"r");
if (fp == NULL) {
char str[128];
sprintf(str,"Cannot open file %s",file);
error->one(FLERR,str);
}
// loop until section found with matching keyword
while (1) {
if (fgets(lin... | false | false | false | false | false | 0 |
createRuntimeDyldELF(RuntimeDyld::MemoryManager &MM,
RuntimeDyld::SymbolResolver &Resolver,
bool ProcessAllSections, RuntimeDyldCheckerImpl *Checker) {
std::unique_ptr<RuntimeDyldELF> Dyld(new RuntimeDyldELF(MM, Resolver));
Dyld->setProcessAllSections(ProcessAllSections);
... | false | false | false | false | false | 0 |
enqueueUsers(Instruction &I) {
for (Use &U : I.uses()) {
if (VisitedUses.insert(&U).second) {
UseToVisit NewU = {
UseToVisit::UseAndIsOffsetKnownPair(&U, IsOffsetKnown),
Offset
};
Worklist.push_back(std::move(NewU));
}
}
} | false | false | false | false | false | 0 |
get_bgbot_tile_info(int tile_index)
{
int tileno;
tileno = angelkds_bgbotvideoram[tile_index];
tileno += angelkds_bgbotbank * 0x100 ;
SET_TILE_INFO(1,tileno,1,0)
} | false | false | false | false | false | 0 |
operator==(const COMMON_COMPONENT& x)const
{
const COMMON_BUILT_IN_DIODE* p = dynamic_cast<const COMMON_BUILT_IN_DIODE*>(&x);
return (p
&& area == p->area
&& perim == p->perim
&& off == p->off
&& ic == p->ic
&& is_raw == p->is_raw
&& rs_raw == p->rs_raw
&& cj_raw == p->cj_raw
&& cjsw... | false | false | false | false | false | 0 |
id3_replacetag(FILE *fout, id3tag_t *id3tag)
{
if (NULL == fout || NULL == id3tag) {
return (-1);
}
fseek (fout, 0, SEEK_END);
fseek (fout, ftell(fout) - 128, SEEK_SET);
fwrite (id3tag, 128, 1, fout);
return (0);
} | false | false | false | false | false | 0 |
irmo_arraylist_sort_internal(IrmoArrayListValue *list_data,
unsigned int list_length,
IrmoArrayListCompareFunc compare_func)
{
IrmoArrayListValue pivot;
IrmoArrayListValue tmp;
unsigned int i;
unsigned int list1_length;
unsigned int list2_leng... | false | false | false | false | false | 0 |
log_group_calc_lsn_offset(
/*======================*/
ib_uint64_t lsn, /*!< in: lsn, must be within 4 GB of
group->lsn */
const log_group_t* group) /*!< in: log group */
{
ib_uint64_t gr_lsn;
ib_int64_t gr_lsn_size_offset;
ib_int64_t difference;
ib_int64_t group_size;
ib_int64_t offset;
ut_ad(mutex_own(&... | false | false | false | false | false | 0 |
cifs_get_spnego_key(struct cifs_ses *sesInfo)
{
struct TCP_Server_Info *server = sesInfo->server;
struct sockaddr_in *sa = (struct sockaddr_in *) &server->dstaddr;
struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *) &server->dstaddr;
char *description, *dp;
size_t desc_len;
struct key *spnego_key;
const char *hos... | false | false | false | false | false | 0 |
str_insert_str(String *str, ssize_t index, const String *src)
{
String *ret;
int err;
if (!str || !src)
return set_errnull(EINVAL);
if ((err = str_rdlock(src)))
return set_errnull(err);
if ((err = str_wrlock(str)))
{
str_unlock(src);
return set_errnull(err);
}
ret = str_insert_str_unlocked(str, inde... | false | false | false | false | false | 0 |
e1000_set_rx_mode(struct net_device *netdev)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
struct netdev_hw_addr *ha;
bool use_uc = false;
u32 rctl;
u32 hash_value;
int i, rar_entries = E1000_RAR_ENTRIES;
int mta_reg_count = E1000_NUM_MTA_REGISTERS;
u32 *mcarray = k... | false | false | false | false | false | 0 |
claro_dig_source_put(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{
struct oxygen *chip = ctl->private_data;
u16 old_reg, new_reg;
int changed;
mutex_lock(&chip->mutex);
old_reg = oxygen_read16(chip, OXYGEN_GPIO_DATA);
new_reg = old_reg & ~GPIO_CLARO_DIG_COAX;
if (value->value.enumerated.item... | false | false | false | false | false | 0 |
clk_register_fixed_rate_with_accuracy(struct device *dev,
const char *name, const char *parent_name, unsigned long flags,
unsigned long fixed_rate, unsigned long fixed_accuracy)
{
struct clk_fixed_rate *fixed;
struct clk *clk;
struct clk_init_data init;
/* allocate fixed-rate clock */
fixed = kzalloc(sizeof(*... | false | false | false | false | false | 0 |
mark_limbo_die_list (ptr)
void *ptr ATTRIBUTE_UNUSED;
{
limbo_die_node *node;
for (node = limbo_die_list; node; node = node->next)
ggc_mark_tree (node->created_for);
} | false | false | false | false | false | 0 |
text_allocate_arrays(void)
{ abbreviations_at = my_malloc(MAX_ABBREVS*MAX_ABBREV_LENGTH,
"abbreviations");
abbrev_values = my_calloc(sizeof(int), MAX_ABBREVS, "abbrev values");
abbrev_quality = my_calloc(sizeof(int), MAX_ABBREVS, "abbrev quality");
abbrev_freqs = my_calloc(sizeof(int), ... | false | false | false | false | false | 0 |
scripts_argv (const char *file, char *const argv[], int argc, char **new_argv)
{
/* Construct an argument list for the shell. */
new_argv[0] = (char *) _PATH_BSHELL;
new_argv[1] = (char *) file;
while (argc > 1)
{
new_argv[argc] = argv[argc - 1];
--argc;
}
} | false | false | false | false | false | 0 |
Trspi_UnloadBlob_PUBKEY(UINT64 *offset, BYTE *blob, TCPA_PUBKEY *pubKey)
{
TSS_RESULT result;
if (!pubKey) {
(void)Trspi_UnloadBlob_KEY_PARMS(offset, blob, NULL);
(void)Trspi_UnloadBlob_STORE_PUBKEY(offset, blob, NULL);
return TSS_SUCCESS;
}
if ((result = Trspi_UnloadBlob_KEY_PARMS(offset, blob, &pubKey->a... | false | false | false | false | false | 0 |
DrawList(struct XObj *xobj, XEvent *evp)
{
int NbVisCell,NbCell;
int HeightCell;
XRectangle r;
/* Dessin du contour / */
DrawReliefRect(0, 0, xobj->width, xobj->height, xobj, hili, shad);
/* Dessin du contour de la liste */
r.x = 2 + BdWidth;
r.y = r.x;
r.width = xobj->width - r.x - 4 - 2*BdWidth - ... | false | false | false | false | false | 0 |
brcms_c_japan_ccode(const char *ccode)
{
return (ccode[0] == 'J' &&
(ccode[1] == 'P' || (ccode[1] >= '1' && ccode[1] <= '9')));
} | false | false | false | false | false | 0 |
create_message_body_text(struct mail_bodystruct *b, int flow_it)
{
set_mime_type_by_grope(b);
if(F_OFF(F_QUELL_FLOWED_TEXT, ps_global)
&& F_OFF(F_STRIP_WS_BEFORE_SEND, ps_global)
&& flow_it)
set_parameter(b ? &b->parameter : NULL, "format", "flowed");
set_body_size(b);
} | false | false | false | false | false | 0 |
mprCreateSocketService()
{
MprSocketService *ss;
char hostName[MPR_MAX_IP_NAME], serverName[MPR_MAX_IP_NAME], domainName[MPR_MAX_IP_NAME], *dp;
ss = mprAllocObj(MprSocketService, manageSocketService);
if (ss == 0) {
return 0;
}
ss->maxAccept = MAXINT;
ss->numAccept... | false | false | false | false | false | 0 |
read_ushort(const unsigned char *map, size_t length, size_t *position, unsigned short *ret)
{
if (*position + 2 > length) return 0;
// FIXME: need to check order
*ret = (map[(*position) + 0] << 8) | map[(*position) + 1];
*position += 2;
return 1;
} | false | false | false | false | false | 0 |
get_next_property( zword_t prop_addr )
{
zbyte_t value;
/* Load the current property id */
value = get_byte( prop_addr );
prop_addr++;
/* Calculate the length of this property */
if ( h_type <= V3 )
value >>= 5;
else if ( !( value & 0x80 ) )
value >>= 6;
else
{
value = ge... | false | false | false | false | false | 0 |
domoveup(list<Filter::editScreen::Button *>::iterator
p)
{
if ( (*p)->isAddButton || p == buttons.begin())
return;
list<Filter::editScreen::Button *>::iterator q=p;
--q;
Button *r= *p;
*p=*q;
*q=r;
(*p)->myPos=p;
(*q)->myPos=q;
(*q)->setRow( (*q)->getRow()-1);
(*p)->setRow( (*p)->getRow()+1);
... | false | false | false | false | false | 0 |
send_pulse_homebrew(unsigned long length)
{
if (length <= 0)
return 0;
if (softcarrier)
return send_pulse_homebrew_softcarrier(length);
on();
safe_udelay(length);
return 0;
} | false | false | false | false | false | 0 |
printLogFileEntryUDX(
FLMBYTE * pucLog,
FLMUINT uiOffset)
{
if (pucLog)
{
fnPrintf( m_pHRequest, "<td>0x%04X</td>", FB2UD( &pucLog[uiOffset]));
}
else
{
fnPrintf( m_pHRequest, "<td>-</td>");
}
} | false | false | false | false | false | 0 |
ftio_set_streaming(struct ftio *ftio, int flag)
{
ftio->fth.fields |= FT_FIELD_HEADER_FLAGS;
if (flag)
ftio->fth.flags |= FT_HEADER_FLAG_STREAMING;
else
ftio->fth.flags &= ~FT_HEADER_FLAG_STREAMING;
} | false | false | false | false | false | 0 |
eraseModRefInfoForGlobal(const GlobalValue &GV) {
if (AlignedMap *P = Info.getPointer())
P->Map.erase(&GV);
} | false | false | false | false | false | 0 |
AddNameConstraints(void *extHandle)
{
PLArenaPool *arena = NULL;
CERTNameConstraints *constraints = NULL;
CERTNameConstraint *current = NULL;
CERTNameConstraint *last_permited = NULL;
CERTNameConstraint *last_excluded = NULL;
SECStatus rv = SEC... | true | true | false | false | false | 1 |
normOrient(aOrient)
char aOrient;
{
char normOrient;
switch (aOrient) {
default:
case DEF_N: normOrient = DEF_N; break;
case DEF_FN: normOrient = DEF_N; break;
case DEF_FS: normOrient = DEF_FS; break;
case DEF_S: normOrient = DEF_FS; break;
case DEF_W: normOrient = DEF_W; break;
... | false | false | false | false | false | 0 |
NC4_inq_attid(int ncid, int varid, const char *name, int *attnump)
{
NC_FILE_INFO_T *nc;
LOG((2, "nc_inq_attid: ncid 0x%x varid %d name %s", ncid, varid, name));
/* Find metadata. */
if (!(nc = nc4_find_nc_file(ncid)))
return NC_EBADID;
#ifdef USE_PNETCDF
/* Take care of files created/opened wit... | false | false | false | false | false | 0 |
apply_disenchant(int mode)
{
int t = 0;
object_type *o_ptr;
char o_name[80];
/* Unused parameter */
(void)mode;
/* Pick a random slot */
switch (randint1(8))
{
case 1: t = INVEN_WIELD; break;
case 2: t = INVEN_BOW; break;
case 3: t = INVEN_BODY; break;
case 4: t = INVEN_OUTER; break;
case 5: t = ... | true | true | false | false | false | 1 |
extract(void *index, ulong from, ulong to, uchar **snippet, ulong *snippet_length){
CSA *SA=(CSA *) index;
ulong n = SA->n;
int pos;
if (to >= n) to=n-1;
if (from > to) {
*snippet = NULL;
*snippet_length=0;
} else {
ulong j;
ulong len =to-from+1;
*snippet = (uchar *) malloc((len)*s... | false | true | false | false | false | 1 |
set_symbol_sizeCmd()
{
if (_nword < 3) {
err("`set symbol' what?");
return false;
}
if (!strcmp(_word[2], "size")) {
if (!strcmp(_word[3], "default")) {
tmp = SYMBOLSIZE_DEFAULT;
PUT_VAR("..symbolsize..", tmp);
gr_setsymbolsize_cm(SYMBOLSIZE_DEFAULT);
return true;
}
if (!getdnum(_word[3], &tmp)... | false | false | false | false | false | 0 |
imProcessBitwiseOp(const imImage* src_image1, const imImage* src_image2, imImage* dst_image, int op)
{
int count = src_image1->count*src_image1->depth;
switch(src_image1->data_type)
{
case IM_BYTE:
DoBitwiseOp((imbyte*)src_image1->data[0], (imbyte*)src_image2->data[0], (imbyte*)dst_image->data[0], count, o... | false | false | false | false | false | 0 |
acpi_button_add(struct acpi_device *device)
{
struct acpi_button *button;
struct input_dev *input;
const char *hid = acpi_device_hid(device);
char *name, *class;
int error;
button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL);
if (!button)
return -ENOMEM;
device->driver_data = button;
button->input = ... | false | false | false | false | false | 0 |
InsertText(const std::string& c) {
my_allowHiddenCursor = false;
if (my_mark != -1 && my_mark != my_cursorPosition) {
DeleteSelection();
}
PG_Application::BulkModeActivator bulk;
for ( unsigned int i = 0; i < c.length(); ++i )
PG_LineEdit::InsertChar(c[i]);
bulk.disable();
my_mark = -1;
CreateTextVe... | false | false | false | false | false | 0 |
dbgaufs_plink_open(struct inode *inode, struct file *file)
{
int err, i, limit;
unsigned long n, sum;
struct dbgaufs_plink_arg *p;
struct au_sbinfo *sbinfo;
struct super_block *sb;
struct au_sphlhead *sphl;
err = -ENOMEM;
p = (void *)get_zeroed_page(GFP_NOFS);
if (unlikely(!p))
goto out;
err = -EFBIG;
sb... | false | false | false | false | false | 0 |
initialize_GMM(Jconf *jconf)
{
HTK_HMM_INFO *gmm;
jlog("STAT: reading GMM: %s\n", jconf->reject.gmm_filename);
if (jconf->gmm == NULL) {
/* no acoustic parameter setting was given for GMM using -AM_GMM,
copy the first AM setting */
jlog("STAT: -AM_GMM not used, use parameter of the first AM\n"... | false | false | false | false | false | 0 |
newstr( const char *string )
{
STRING str, *s = &str;
if( !strhash )
strhash = hashinit( sizeof( STRING ), "strings" );
*s = string;
if( hashenter( strhash, (HASHDATA **)&s ) )
{
int l = strlen( string );
#if 1
if (!stralloc)
stralloc = alloc2_init(4096);
char *m = alloc2_enter(stralloc, l + 1)... | false | false | false | false | false | 0 |
__ecereMethod_GDBDialog_TrimEscapedNewLineChar(struct __ecereNameSpace__ecere__com__Instance * this, char * s)
{
struct GDBDialog * __ecerePointer_GDBDialog = (struct GDBDialog *)(this ? (((char *)this) + __ecereClass_GDBDialog->offset) : 0);
int len = strlen(s);
if(s[len - 1] == 'n' && s[len - 2] == '\\')
{
s[len - 2... | false | false | false | false | false | 0 |
conf_connect_allowed(struct irc_ssaddr *addr, int aftype)
{
struct ip_entry *ip_found;
struct AccessItem *aconf = find_dline_conf(addr, aftype);
/* DLINE exempt also gets you out of static limits/pacing... */
if (aconf && (aconf->status & CONF_EXEMPTDLINE))
return 0;
if (aconf != NULL)
return BANNED... | false | false | false | false | false | 0 |
cmaes_ReadSignals(cmaes_t *t, char const *filename)
{
const char *s = "signals.par";
FILE *fp;
if (filename == 0)
filename = s;
fp = fopen( filename, "r");
if(fp == 0) {
return;
}
cmaes_ReadFromFilePtr( t, fp);
fclose(fp);
} | false | false | false | false | false | 0 |
replace_temp_operand_in_nodelink(RfmNodeLink cur,
RfmOperand before,
RfmOperand after)
{
RfmNodeLink link;
RfmOperand operand;
for (link = cur; link; link = link->next) {
operand = link->operand;
if (is_same_temp_operand(oper... | false | false | false | false | false | 0 |
deparse_binaryop( char *buffer, size_t length,
const struct binaryop_type *binaryop )
{
char *operand1_buffer, *operand2_buffer; const char *operation_string = NULL;
int brackets_necessary1, brackets_necessary2;
int error;
operand1_buffer = malloc( 2 * length );
if( !operand1_buffer ) {
ui_error( UI... | false | false | false | false | false | 0 |
async_mult(struct page *dest, struct page *src, u8 coef, size_t len,
struct async_submit_ctl *submit)
{
struct dma_chan *chan = async_tx_find_channel(submit, DMA_PQ,
&dest, 1, &src, 1, len);
struct dma_device *dma = chan ? chan->device : NULL;
struct dmaengine_unmap_data *unmap = NULL;
const u8 *qmu... | false | false | false | false | false | 0 |
utf8_width(const char **start, size_t *remainder_p)
{
ucs_char_t ch = pick_one_utf8_char(start, remainder_p);
if (!*start)
return 0;
return git_wcwidth(ch);
} | false | false | false | false | false | 0 |
test_cgroup_compare_cgroup(int ctl1, int ctl2, int i)
{
int retval;
struct cntl_val_t cval;
cval.val_int64 = 0;
cval.val_uint64 = 0;
cval.val_bool = 0;
strcpy(cval.val_string, "5000");
struct cgroup *cgroup1 = NULL, *cgroup2 = NULL;
struct cgroup_controller *controller = NULL;
char controller_name[FILENAME_M... | true | true | false | false | false | 1 |
SORT_LIST (
Obj list )
{
UInt len; /* length of the list */
UInt h; /* gap width in the shellsort */
Obj v, w; /* two element of the list */
UInt i, k; /... | false | false | false | false | false | 0 |
type (options_p *optsp, bool nested)
{
const char *s;
*optsp = 0;
switch (token ())
{
case SCALAR:
s = advance ();
return create_scalar_type (s);
case ID:
case VEC_TOKEN:
s = typedef_name ();
return resolve_typedef (s, &lexer_line);
case STRUCT:
case UNION:
... | false | false | false | false | false | 0 |
GetFailure(const GMConfig& config) const {
std::string reason = job_failed_mark_read(job_id,config);
if(!failure_reason.empty()) {
reason+=failure_reason; reason+="\n";
};
return reason;
} | false | false | false | false | false | 0 |
on_name_changed(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer user_data)
{
gchar *oldvalue, *striped;
GtkTreeIter iter;
GtkTreePath *tree_path = gtk_tree_path_new_from_string (path);
GtkTreePath *empty_path = gtk_tree_row_reference_get_path(empty_row);
gboolean empty = !gtk_tree_path_compa... | false | false | false | false | false | 0 |
action_dup_lock_2 (Unit *unit, dpacket packet, uae_u32 uniq)
{
uaecptr out;
a_inode *a;
a = lookup_aino (unit, uniq);
if (a == 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, ERROR_OBJECT_NOT_AROUND);
return 0;
}
/* DupLock()ing exclusive locks isn't possible, says the Autodoc, but
* at least... | false | false | false | false | false | 0 |
GetCopyConstraints(struct Promise *pp)
{ struct FileCopy f;
char *value;
long min,max;
f.source = (char *)GetConstraint("source",pp,CF_SCALAR);
value = (char *)GetConstraint("compare",pp,CF_SCALAR);
if (value == NULL)
{
value = DEFAULT_COPYTYPE;
}
f.compare = String2Comparison(value);
value = (char *... | false | false | false | false | false | 0 |
HasTranslucentPolygonalGeometry()
{
int result;
// Check if the selected index is in range
if ( this->SelectedLODIndex < 0 ||
this->SelectedLODIndex >= this->NumberOfEntries )
{
vtkErrorMacro( << "Index out of range!" );
return 0;
}
// Check if the selected index is valid
if ( this->L... | false | false | false | false | false | 0 |
hesiod_init(void **context)
{
struct hesiod_p *ctx;
const char *p, *configname;
ctx = malloc(sizeof(struct hesiod_p));
if (ctx)
{
*context = ctx;
configname = ((getuid() == geteuid()) && (getgid() == getegid())) ? getenv("HESIOD_CONFIG") : NULL;
if (!configname)
configname = SYSCONFDIR "... | false | false | false | true | false | 1 |
dParseIntFormat(char *buf, int *num, int *size)
{
char *tmp;
tmp = buf;
while (*tmp++ != '(') ;
sscanf(tmp, "%d", num);
while (*tmp != 'I' && *tmp != 'i') ++tmp;
++tmp;
sscanf(tmp, "%d", size);
return 0;
} | false | false | false | false | false | 0 |
Java_ncsa_hdf_hdf5lib_H5_H5Tenum_1nameof_1int
(JNIEnv *env, jclass clss, jint type, jintArray value, jobjectArray name,
jint size)
{
hid_t status;
jint *intP;
char *nameP;
jboolean isCopy;
jstring str;
if (size <= 0) {
h5badArgument( env, "H5Tenum_nameof: name size < 0");
... | false | false | false | false | false | 0 |
qpnp_tm_probe(struct platform_device *pdev)
{
struct qpnp_tm_chip *chip;
struct device_node *node;
u8 type, subtype;
u32 res[2];
int ret, irq;
node = pdev->dev.of_node;
chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
dev_set_drvdata(&pdev->dev, chip);
chip->map = d... | false | false | false | false | false | 0 |
ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id,
const struct ce_attr *attr)
{
struct ath10k_ce_ring *dest_ring;
u32 nentries;
dma_addr_t base_addr;
nentries = roundup_pow_of_two(attr->dest_nentries);
dest_ring = kzalloc(sizeof(*dest_ring) +
(nentries *
sizeof(*dest_ring->per_... | false | false | false | false | false | 0 |
lockd(void *vrqstp)
{
int err = 0;
struct svc_rqst *rqstp = vrqstp;
/* try_to_freeze() is called from svc_recv() */
set_freezable();
/* Allow SIGKILL to tell lockd to drop all of its locks */
allow_signal(SIGKILL);
dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");
/*
* The main request l... | 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.