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
init_hash_table() { hashentries = 0; tablesize = 64; hashmask = tablesize-1; maxload = 48; while ( maxload < web.skel[EDGE].count ) { hashmask += tablesize; tablesize *= 2; maxload *= 2; } simhashtable = (struct entry *)mycalloc(tablesize,sizeof(struct entry)); }
false
false
false
false
false
0
iscsit_dataout_update_r2t(struct iscsi_cmd *cmd, u32 offset, u32 length) { struct iscsi_r2t *r2t; if (cmd->unsolicited_data) return 0; r2t = iscsit_get_r2t_for_eos(cmd, offset, length); if (!r2t) return -1; spin_lock_bh(&cmd->r2t_lock); r2t->seq_complete = 1; cmd->outstanding_r2ts--; spin_unlock_bh(&cmd-...
false
false
false
false
false
0
write_jigdo_file(struct libjte_env *o) { unsigned char template_md5sum[16]; entry_t *entry = o->entry_list; int i = 0; struct checksum_info *info = NULL; FILE *j_file = o->j_file; char *b64, dec[40]; checksum_final(o->template_context); checksum_copy(o->template_context, CHECK_MD5, &tem...
true
true
false
false
false
1
free_unknown_block_list (GList *list) { UnknownBlock *unknown; GList *l; for (l = list; l; l = g_list_next (l)) { unknown = l->data; g_assert (unknown); egg_buffer_uninit (&unknown->buffer); g_slice_free (UnknownBlock, unknown); } g_list_free (list); }
false
false
false
false
false
0
tcp_listen(char *addr, int port) { struct sockaddr_in serv; int sock, optval = 1; if (!fill_sockaddr(&serv, addr, port)) return -1; sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { LOGL(0, "tcp_listen failed: socket(): %s", strerror(errno)); return -1; } if (setsockopt(sock, SOL_SOCKET, SO_REUSEA...
false
false
false
false
false
0
nfsd4_umh_cltrack_check(struct nfs4_client *clp) { int ret; char *hexid, *has_session, *legacy; if (test_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags)) return 0; hexid = bin_to_hex_dup(clp->cl_name.data, clp->cl_name.len); if (!hexid) { dprintk("%s: can't allocate memory for upcall!\n", __func__); return -ENOME...
false
false
false
false
false
0
my_copyright (fp, with_short_license) FILE *fp; const Bool with_short_license; /* Prints the program-id and copyright text to file `fp' using the central output function `print_text()', and uses the global text buffer `s1' internally. */ { sprintf (s1, "%s (GNU cal) %s", prgr_name, PACKAGE_VERS...
false
false
false
false
false
0
kmo_copy_vector_F3I_z(cpl_imagelist *data, int x, int y, int z1, int z2) { kmclipm_vector *vec = NULL; cpl_image *img = NULL; double *pvecd = NULL,...
false
false
false
false
false
0
cb_validate_program_body (struct cb_program *prog) { /* resolve all labels */ cb_tree l; cb_tree x; cb_tree v; for (l = cb_list_reverse (prog->label_list); l; l = CB_CHAIN (l)) { x = CB_VALUE (l); v = cb_ref (x); if (CB_LABEL_P (v)) { CB_LABEL (v)->need_begin = 1; if (CB_REFERENCE (x)->length) { C...
false
false
false
true
false
1
request( const QHttpRequestHeader& header, QIODevice* data, QIODevice* to ) { m_mode = REQUESTIO; m_data = QByteArray(); m_device = data; m_header = header; m_to = to; m_lastRequest = QHttp::request( header, data, to ); return m_lastRequest; }
false
false
false
false
false
0
get_op() { switch (arglex_token) { case arglex_token_le: arglex(); return le; case arglex_token_lt: arglex(); return lt; case arglex_token_ge: arglex(); return ge; case arglex_token_gt: arglex(); return gt; case arglex_token...
false
false
false
false
false
0
rleIt(char *buf, char *bufto, int len) { char *p, *q, *cfoll, *clead; char *begp; int i; p = buf; cfoll = bufto; /* place to copy to */ clead = cfoll + 1; begp = p; while (len > 0) { /* encode stuff until gone */ q = p + 1; i = len - 1; ...
false
false
false
false
false
0
node_more_store() { int i; node_block next_node = 0; next_node = (node_block) malloc(sizeof(struct node_block_t)); if (next_node == 0) { #ifdef LOG_PRINT fprintf(stderr, "malloc failing in node_more_store\n") #endif ; return FALSE; } next_node->next = Node_Store; Node_Store = next_node;...
false
false
false
false
false
0
stopCGI(const string &filespec) { // GNASH_REPORT_FUNCTION; log_debug("Stopping \"%s\"", filespec); boost::mutex::scoped_lock lock(_mutex); pid_t pid = _pids[filespec]; if (kill (pid, SIGQUIT) == -1) { return (false); } else { return (true); } }
false
false
false
false
false
0
CommonContext_free(CTX ctx, kcontext_t *ctxo) { KNH_FREE(ctx, ctxo->stack, sizeof(ksfp_t) * ctxo->stacksize); ctxo->stack = NULL; ctxo->esp = NULL; ctxo->stack_uplimit = NULL; ctxo->stacksize = 0; KNH_FREE(ctx, ctxo->mtdcache, K_MTDCACHE_SIZE * sizeof(knh_mtdcache_t)); KNH_FREE(ctx, ctxo->tmrcache, K_TMAPCACHE_...
false
false
false
false
false
0
get_light_position(gint num) { gint i; gchar** t = g_malloc(3*sizeof(gchar*)); switch(num) { case 0 : for(i=0;i<3;i++) t[i] = g_strdup_printf("%lf",light0_position[i]); break; case 1 : for(i=0;i<3;i++) t[i] = g_strdup_printf("%lf",light1_position[i]); break; case 2 : for(i=0;i<3;...
false
false
false
false
false
0
vxge_hw_mrpcim_stats_access(struct __vxge_hw_device *hldev, u32 operation, u32 location, u32 offset, u64 *stat) { u64 val64; enum vxge_hw_status status = VXGE_HW_OK; status = __vxge_hw_device_is_privilaged(hldev->host_type, hldev->func_id); if (status != VXGE_HW_OK) goto exit; val64 = VXGE_HW_XMAC_ST...
false
false
false
false
false
0
worker_run_server_threads(worker_t *worker, int threads) { apr_status_t status; apr_threadattr_t *tattr; apr_thread_t *threadl; apr_table_t *servers; apr_table_entry_t *e; worker_t *clone; int i = 0; if ((status = apr_threadattr_create(&tattr, worker->pbody)) != APR_SUCCESS) { return status; } ...
false
false
false
false
false
0
setHueSatVal(FXfloat h,FXfloat s,FXfloat v){ // Clamp h=FXCLAMP(0.0f,h,360.0f); s=FXCLAMP(0.0f,s,1.0f); v=FXCLAMP(0.0f,v,1.0f); // Changed after clamping? if(hsv[0]!=h || hsv[1]!=s || hsv[2]!=v){ // Cheap case: just move the ball if(hsv[0]!=h || hsv[1]!=s){ hsv[0]=h; hsv[1]=s; u...
false
false
false
false
false
0
addr_policy_free(addr_policy_t *p) { if (!p) return; if (--p->refcnt <= 0) { if (p->is_canonical) { policy_map_ent_t search, *found; search.policy = p; found = HT_REMOVE(policy_map, &policy_root, &search); if (found) { tor_assert(p == found->policy); tor_free(found);...
false
false
false
false
false
0
Do() { unsigned int frameSize = BackendBufferSize(); unsigned int numInPorts = mConfig.GetNumberOfInPorts(); TData normConstant = (TData)1.0 /TData(numInPorts); TData * output = mOutputPort.GetAudio().GetBuffer().GetPtr(); TData * inputs[numInPorts]; TControlData controls[numInPorts]; for (unsigned int i = 0;...
false
false
false
false
false
0
__repmgr_new_site(env, sitep, host, port) ENV *env; REPMGR_SITE **sitep; const char *host; u_int port; { DB_REP *db_rep; REPMGR_CONNECTION *conn; REPMGR_SITE *site, *sites; char *p; u_int i, new_site_max; int ret; db_rep = env->rep_handle; if (db_rep->site_cnt >= db_rep->site_max) { new_site_max = db_rep...
false
false
false
false
false
0
int42mi(PG_FUNCTION_ARGS) { int32 arg1 = PG_GETARG_INT32(0); int16 arg2 = PG_GETARG_INT16(1); int32 result; result = arg1 - arg2; /* * Overflow check. If the inputs are of the same sign then their * difference cannot overflow. If they are of different signs then the * result should be of the same sign a...
false
false
false
false
false
0
bSave( SimnGnuCap & roSimn ) { m_osErrMsg.Empty( ); // Set the sweep values roSimn.m_oCmdDC.m_osStart = m_oPnlStart.rosGetValue( ); roSimn.m_oCmdDC.m_osStop = m_oPnlStop .rosGetValue( ); roSimn.m_oCmdDC.m_osStep = m_oPnlStep .rosGetValue( ); // Set the step scale roSimn.m_oCmdDC.m_eScale = (eScaleType...
false
false
false
false
false
0
orte_iof_orted_recv(int status, orte_process_name_t* sender, opal_buffer_t* buffer, orte_rml_tag_t tag, void* cbdata) { unsigned char data[ORTE_IOF_BASE_MSG_MAX]; orte_iof_tag_t stream; int32_t count, numbytes; orte_process_name_t target; opal_list_i...
true
true
false
false
false
1
CRYPTO_realloc(void *str, int num, const char *file, int line) { void *ret = NULL; if (str == NULL) return CRYPTO_malloc(num, file, line); if (num <= 0) return NULL; if (realloc_debug_func != NULL) realloc_debug_func(str, NULL, num, file, line, 0); ret = realloc_ex_func(str,num,file,line); #ifdef LEVITTE_D...
false
false
false
false
false
0
_isValidTradeDate(const MSDate& date_, MSHolidaySet& set_, const MSResourceCodeSet& rCodeSet_) { if(date_.isSet()==MSFalse) return MSFalse; MSDay day=date_.weekDay(); if (day==MSDate::Saturday||day==MSDate::Sunday) return MSFalse; else return (_isHoliday(date_,set_,rCodeSet_)==MSTrue)?MSFalse:MSTrue; }
false
false
false
false
false
0
cg_window_validate_go (CgWindow *window) { CgWindowPrivate *priv; priv = CG_WINDOW_PRIVATE (window); if (priv->validator != NULL) g_object_unref (G_OBJECT (priv->validator)); priv->validator = cg_validator_new ( GTK_WIDGET (gtk_builder_get_object (priv->bxml, "create_button")), GTK_ENTRY (gtk_builder_get_obje...
false
false
false
false
false
0
local_variable_p_walkfn (tree *tp, int *walk_subtrees, void * /*data*/) { if (local_variable_p (*tp) && (!DECL_ARTIFICIAL (*tp) || DECL_NAME (*tp) == this_identifier)) return *tp; else if (TYPE_P (*tp)) *walk_subtrees = 0; return NULL_TREE; }
false
false
false
false
false
0
SetNoDataValue( double dfNewNoDataValue ) { if( dfNewNoDataValue == VRT_NODATA_UNSET ) { bNoDataSet = FALSE; dfNoDataValue = VRT_NODATA_UNSET; } else { bNoDataSet = TRUE; dfNoDataValue = dfNewNoDataValue; } }
false
false
false
false
false
0
update_keyword_args(PyObject *orig_kwdict, int nk, PyObject ***pp_stack, PyObject *func) { PyObject *kwdict = NULL; if (orig_kwdict == NULL) kwdict = PyDict_New(); else { kwdict = PyDict_Copy(orig_kwdict); Py_DECREF(orig_kwdict); } if (kwdict == NULL) ...
false
false
false
false
false
0
GetNextSequence(string& sequence) { // validate input stream if ( !IsOpen || feof(Stream) ) return false; // read in sequence char buffer[1024]; ostringstream seqBuffer(""); while(true) { char ch = fgetc(Stream); ungetc(ch, Stream); if( (ch == ...
false
false
false
false
false
0
ajStrIsAlpha(const AjPStr str) { const char* cp; if(!str) return ajFalse; if(!str->Len) return ajFalse; cp = str->Ptr; while(*cp) if(!isalpha((ajint)*cp++)) return ajFalse; return ajTrue; }
false
false
false
false
false
0
proxy_retry_request(server *srv, handler_ctx *hctx) { plugin_data *p; connection *con; data_proxy *host = hctx->host; p = hctx->plugin_data; con = hctx->remote_conn; /* disable this server */ host->is_disabled = 1; host->disable_ts = srv->cur_ts; log_error_write(srv, __FILE__, __LINE__, "sbdsbsb", ...
false
false
false
false
false
0
rtl818x_poll(struct net80211_device *dev) { struct rtl818x_priv *priv = dev->priv; u16 reg = rtl818x_ioread16(priv, &priv->map->INT_STATUS); if (reg == 0xFFFF) return; rtl818x_iowrite16(priv, &priv->map->INT_STATUS, reg); if (reg & (RTL818X_INT_TXN_OK | RTL818X_INT_TXN_ERR)) rtl818x_handle_tx(dev); if (re...
false
false
false
false
false
0
gwy_app_get_brick_title(GwyContainer *data, gint id) { const guchar *title = NULL; static gchar buf[40]; g_return_val_if_fail(GWY_IS_CONTAINER(data), NULL); g_return_val_if_fail(id >= 0, NULL); g_snprintf(buf, sizeof(buf), BRICK_PREFIX "/%d/title", id); gwy_container_gi...
false
false
false
false
false
0
PicSpinDrawFunc (void *_self, FNT_font_t font) { int x, y; menulist_s *self = (menulist_s *)_self; x = Item_GetX (*self); y = Item_GetY (*self); x += self->generic.localints[2]; if (strlen(self->itemnames[self->curvalue]) > 0) Draw_StretchPic (x, y,font->size*self->generic.localints[0], font->size...
false
false
false
false
false
0
drm_dp_msg_data_crc4(const uint8_t *data, u8 number_of_bytes) { u8 bitmask = 0x80; u8 bitshift = 7; u8 array_index = 0; int number_of_bits = number_of_bytes * 8; u16 remainder = 0; while (number_of_bits != 0) { number_of_bits--; remainder <<= 1; remainder |= (data[array_index] & bitmask) >> bitshift; bit...
false
false
false
false
false
0
addImage(DL_CreationInterface* creationInterface) { DL_ImageData id(// pass ref insead of name we don't have yet values[340], // ins point: toReal(values[10], 0.0), toReal(values[20], 0.0), toReal(values[30], 0.0), // u vector: toReal(values[11], 1.0), ...
false
false
false
false
false
0
find_significant_positions(int sig, int like_A, int like_C, int like_G, int like_TU, int *sumPtr) { // result == 0 -> no base-char has a significant likelihood (>=sig) // result == 1, 2, 4, 8 -> A, C, G, T/U has a significant likelihood // else -> the sum two of the likelihoods >= sig (...
false
false
false
false
false
0
maxValue(unsigned short colval) { return colval == 65535 ? 0xFF : static_cast<unsigned char>(colval/0xFF); } }
false
false
false
false
false
0
Visit(CameraMapType& m) { for (CameraMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { Player* owner = iter->getSource()->GetOwner(); if (owner == i_skipped_receiver) { continue; } if (WorldSession* session = owner->GetSession()) { session->SendPack...
false
false
false
false
false
0
boxaEqual(BOXA *boxa1, BOXA *boxa2, l_int32 maxdist, NUMA **pnaindex, l_int32 *psame) { l_int32 i, j, n, jstart, jend, found, samebox; l_int32 *countarray; BOX *box1, *box2; NUMA *na; PROCNAME("boxaEqual"); if (pnaindex) *pnaindex = NULL; i...
false
false
false
false
false
0
video_mux(struct bttv *btv, unsigned int input) { int mux,mask2; if (input >= bttv_tvcards[btv->c.type].video_inputs) return -EINVAL; /* needed by RemoteVideo MX */ mask2 = bttv_tvcards[btv->c.type].gpiomask2; if (mask2) gpio_inout(mask2,mask2); if (input == btv->svhs) { btor(BT848_CONTROL_COMP, BT848_E...
false
false
false
false
false
0
xmlparse_message(guint32 connectid, xmlDocPtr doc, xmlNodePtr cur) { gchar *type, *text, *author, *value; (void)connectid; (void)doc; type = (gchar*)xmlGetProp(cur, (xmlChar*)"type"); if(! g_ascii_strncasecmp(type, "chat", 4) ) { author = (gchar*)xmlGetProp(cur, (xmlChar*)"author"); value = (gchar*)xmlGe...
false
false
false
true
false
1
bulk_out (ccid_driver_t handle, unsigned char *msg, size_t msglen, int no_debug) { int rc; /* No need to continue and clutter the log with USB write error messages after we got the first ENODEV. */ if (handle->enodev_seen) return CCID_DRIVER_ERR_NO_READER; if (debug_level && (!no_debug || ...
false
false
false
false
false
0
spawn_prog(const char *pgm, const char **arg) { pid_t pid; int status; fflush(NULL); pid = fork(); if (pid < 0) die("unable to fork"); if (!pid) { execvp(pgm, (char *const*) arg); exit(255); } while (waitpid(pid, &status, 0) < 0) { if (errno == EINTR) continue; return -1; } /* Earlier we did n...
false
false
false
false
true
1
ProcessClassList(RefAST ast, RefAST * pastNext) { if (ast->getType() == IDENT) { *pastNext = ast->getNextSibling(); // If only one class in the list, just return its name. if (!*pastNext) return ast->getText(); int nextNodeTyp = ast->getNextSibling()->getType(); if (nextNodeTyp != IDENT && nextNodeTyp !=...
false
false
false
false
false
0
lineeditor_under_emacs ___PVOID { static ___UCS_2 emacs_env_name[] = { 'E', 'M', 'A', 'C', 'S', '\0' }; ___UCS_2STRING cvalue; if (___getenv_UCS_2 (emacs_env_name, &cvalue) == ___FIX(___NO_ERR)) { if (cvalue != 0) { ___free_mem (cvalue); return 1; } } return 0...
false
false
false
false
false
0
e_bg_default_set(const char *file) { E_Event_Bg_Update *ev; Eina_Bool changed; file = eina_stringshare_add(file); changed = file != e_config->desktop_default_background; if (!changed) { eina_stringshare_del(file); return; } if (e_config->desktop_default_background) { ...
false
false
false
false
false
0
setStatusVisibility(bool visible) { // Add/remove tab if necessary int index = ui_.tabwidget->indexOf(ui_.tab_status); if(index==-1) { if(visible) ui_.tabwidget->addTab(ui_.tab_status,tr("Status")); } else if(!visible) { ui_.tabwidget->removeTab(index); } }
false
false
false
false
false
0
pet_type() { if (urole.petnum != NON_PM) return (urole.petnum); else if (preferred_pet == 'c') return (PM_KITTEN); else if (preferred_pet == 'd') return (PM_LITTLE_DOG); else return (rn2(2) ? PM_KITTEN : PM_LITTLE_DOG); }
false
false
false
false
false
0
recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) { recv_vec4(port, reduce4(bit), 0); }
false
false
false
false
false
0
glade_gtk_color_button_set_property (GladeWidgetAdaptor * adaptor, GObject * object, const gchar * id, const GValue * value) { GladeProperty *property; GladeWidget *gwidget = glade_widget_get_from_gobject (object); if (!strcmp (id, "color"...
false
false
false
false
false
0
dfb_input_detach_global( CoreInputDevice *device, GlobalReaction *reaction ) { D_DEBUG_AT( Core_Input, "%s( %p, %p )\n", __FUNCTION__, device, reaction ); D_MAGIC_ASSERT( device, CoreInputDevice ); D_ASSERT( core_input != NULL ); D_ASSERT( device != NULL ); D_ASSERT(...
false
false
false
false
false
0
main (int argc, char **argv, char **env) { char username[__LEN_USERNAME__+1]=""; char password[__LEN_PASSWORD__+1]=""; char errormsg[__MAX_STR_LEN__]; char * rmthost = NULL; int preserve=FALSE; int i; int cntwrong = 0; struct passwd *user=NULL; install_handlers (); init_conf(); if (get_intro_s...
false
false
false
false
false
0
change_parent_ptr(ldns_rbtree_t* rbtree, ldns_rbnode_t* parent, ldns_rbnode_t* old, ldns_rbnode_t* new) { if(parent == LDNS_RBTREE_NULL) { if(rbtree->root == old) rbtree->root = new; return; } if(parent->left == old) parent->left = new; if(parent->right == old) parent->right = new; }
false
false
false
false
false
0
__ntfs_debug(const char *file, int line, const char *function, const char *fmt, ...) { struct va_format vaf; va_list args; int flen = 0; if (!debug_msgs) return; if (function) flen = strlen(function); va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; pr_debug("(%s, %d): %s(): %pV", file, line, flen ? ...
false
false
false
false
false
0
pciehp_power_off_slot(struct slot *slot) { struct controller *ctrl = slot->ctrl; pcie_write_cmd(ctrl, PCI_EXP_SLTCTL_PWR_OFF, PCI_EXP_SLTCTL_PCC); ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__, pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, PCI_EXP_SLTCTL_PWR_OFF); }
false
false
false
false
false
0
CheckFormat(BYTE * buffer, DWORD size, DWORD imagetype) { if (buffer==NULL || size==NULL){ strcpy(info.szLastError,"invalid or empty buffer"); return false; } CxMemFile file(buffer,size); return CheckFormat(&file,imagetype); }
false
false
false
false
false
0
_gda_mysql_meta_routines (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection *cnc, GdaMetaStore *store, GdaMetaContext *context, GError **error, G_GNUC_UNUSED const GValue *routine_catalog, const GValue *routine_schema, const GValue *ro...
false
false
false
false
false
0
mini_cm_accelerated(struct nes_cm_core *cm_core, struct nes_cm_node *cm_node) { cm_node->accelerated = 1; if (cm_node->accept_pend) { BUG_ON(!cm_node->listener); atomic_dec(&cm_node->listener->pend_accepts_cnt); cm_node->accept_pend = 0; BUG_ON(atomic_read(&cm_node->listener->pend_accepts_cnt) < 0)...
false
false
false
false
false
0
gsql_workspace_get_details (GSQLWorkspace *workspace) { GSQL_TRACE_FUNC; GtkTreeView *ret; g_return_val_if_fail (GSQL_IS_WORKSPACE (workspace), NULL); ret = GTK_TREE_VIEW (workspace->private->details_page); return ret; }
false
false
false
false
false
0
iwpm_remote_info_cb(struct sk_buff *skb, struct netlink_callback *cb) { struct nlattr *nltb[IWPM_NLA_RQUERY_MAPPING_MAX]; struct sockaddr_storage *local_sockaddr, *remote_sockaddr; struct sockaddr_storage *mapped_loc_sockaddr, *mapped_rem_sockaddr; struct iwpm_remote_info *rem_info; const char *msg_type; u8 nl_cl...
false
true
false
false
false
1
ft_loglcs(fits, m11, m12, m21, m22, v1, v2) FITSHead fits; double m11, m12, m21, m22; double v1, v2; { if ( m11 != 1.0 ) ft_headsetr(fits, "LTM1_1", 0, m11, 7, NULL, 1); if ( m12 != 0.0 ) ft_headsetr(fits, "LTM1_2", 0, m12, 7, NULL, 1); if ( m21 != 0.0 ) ft_headsetr(fits, "LTM2_1", 0, m21, 7, NULL, 1); if ( m2...
false
false
false
false
false
0
ItclFreeClass(cdata) char *cdata; /* class definition to be destroyed */ { ItclClass *cdefnPtr = (ItclClass*)cdata; Itcl_ListElem *elem; Tcl_HashSearch place; Tcl_HashEntry *entry; ItclVarDefn *vdefn; ItclVarLookup *vlookup; VarInHash *varPtr; /* * Tear down the list of deri...
false
false
false
false
false
0
resize(size_type l) { if (l == length()) return; realloc_array(cells_, Cell, l); for (size_type x = length(); x < l; x++) cells_[x].clear(); length_ = l; }
false
false
false
false
false
0
mgs_hook_authz(request_rec * r) { int rv; mgs_handle_t *ctxt; mgs_dirconf_rec *dc; if (r == NULL) return DECLINED; dc = ap_get_module_config(r->per_dir_config, &gnutls_module); _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__); ctxt = ap_get_module_config(r->connection->conn_config, &gnutl...
false
false
false
false
false
0
SharedDtor() { if (name_ != &_default_name_) { delete name_; } if (insertion_point_ != &_default_insertion_point_) { delete insertion_point_; } if (content_ != &_default_content_) { delete content_; } if (this != default_instance_) { } }
false
false
false
false
false
0
qlcnic_get_bios_version(struct qlcnic_adapter *adapter) { const struct firmware *fw = adapter->fw; u32 bios_ver, prd_off = adapter->file_prd_off; u8 *version_offset; __le32 temp; if (adapter->ahw->fw_type != QLCNIC_UNIFIED_ROMIMAGE) { version_offset = (u8 *)&fw->data[QLCNIC_BIOS_VERSION_OFFSET]; return le32_t...
false
false
false
false
false
0
coalesce_spill_slots (ira_allocno_t *spilled_coalesced_allocnos, int num) { int i, j, n, last_coalesced_allocno_num; ira_allocno_t allocno, a; bool merged_p = false; bitmap set_jump_crosses = regstat_get_setjmp_crosses (); slot_coalesced_allocnos_live_ranges = (live_range_t *) ira_allocate (sizeof (live_...
false
false
false
false
false
0
s_PNGP_reinit(stream_state * st) { stream_PNGP_state *const ss = (stream_PNGP_state *) st; if (ss->prev_row != 0) memset(ss->prev_row + ss->bpp, 0, ss->row_count); ss->row_left = 0; return 0; }
false
false
false
false
false
0
probe_chip_type(struct legacy_probe *probe) { int mask = 1 << probe->slot; if (winbond && (probe->port == 0x1F0 || probe->port == 0x170)) { u8 reg = winbond_readcfg(winbond, 0x81); reg |= 0x80; /* jumpered mode off */ winbond_writecfg(winbond, 0x81, reg); reg = winbond_readcfg(winbond, 0x83); reg |= 0xF0; ...
false
false
false
false
false
0
Handle(Arc::Message* msg) const { pdp_container_t::const_iterator it; bool r = false; for(it=pdps_.begin();it!=pdps_.end();it++){ r = it->pdp->isPermitted(msg); if((r == true) && (it->action == PDPDesc::breakOnAllow)) break; if((r == false) && (it->action == PDPDesc::breakOnDeny)) break; if(it->ac...
false
false
false
false
false
0
Create( CHMHMapNodePtr &from, CHMHMapNodePtr &to, const THypothesisIDSet &hyps, CHierarchicalMHMap *parent) { CHMHMapArcPtr obj = CHMHMapArcPtr(new CHMHMapArc(from,to,hyps,parent)); if (parent) { // To the graph: parent->onArcAddition(obj); // To the nodes: if (from) from->onArcAddition(obj); if ...
false
false
false
false
false
0
ast_module_ref(struct ast_module *mod) { if (!mod) { return NULL; } ast_atomic_fetchadd_int(&mod->usecount, +1); ast_update_use_count(); return mod; }
false
false
false
false
false
0
parseString (vString *const string, const int delimiter) { boolean end = FALSE; while (!end) { int c = fileGetc (); if (c == EOF) end = TRUE; else if (c == '\\' && delimiter != '`') { c = fileGetc (); /* This maybe a ' or ". */ vStringPut (string, c); } else if (c == delimiter) end = TRUE; ...
false
false
false
false
false
0
update(struct command *cmd) { const char *name = cmd->ref_name; unsigned char *old_sha1 = cmd->old_sha1; unsigned char *new_sha1 = cmd->new_sha1; struct ref_lock *lock; /* only refs/... are allowed */ if (prefixcmp(name, "refs/") || check_ref_format(name + 5)) { error("refusing to create funny ref '%s' remotel...
false
false
false
false
false
0
refill_buffer(void* userdata, void* buffer, unsigned int offset, unsigned int n) { fitstable_t* tab = userdata; //logverb("fitstable.c:refill_buffer: offset %i, n %i\n", offset, n); if (fitstable_read_structs(tab, buffer, tab->br->elementsize, offset, n)) { ERROR("Error refilling FITS table read buf...
false
false
false
false
false
0
wacom_led_control(struct wacom *wacom) { unsigned char *buf; int retval; unsigned char report_id = WAC_CMD_LED_CONTROL; int buf_size = 9; if (wacom->wacom_wac.pid) { /* wireless connected */ report_id = WAC_CMD_WL_LED_CONTROL; buf_size = 13; } buf = kzalloc(buf_size, GFP_KERNEL); if (!buf) return -ENOMEM...
false
false
false
false
false
0
upgradedb_core(Slapi_PBlock *pb, ldbm_instance *inst) { backend *be = NULL; int task_flags = 0; int run_from_cmdline = 0; slapi_pblock_get(pb, SLAPI_TASK_FLAGS, &task_flags); run_from_cmdline = (task_flags & SLAPI_TASK_RUNNING_FROM_COMMANDLINE); be = inst->inst_be; slapi_log_error(SLAPI_LO...
false
false
false
false
false
0
gst_mms_base_init (gpointer g_class) { GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); gst_element_class_add_static_pad_template (element_class, &src_factory); gst_element_class_set_details_simple (element_class, "MMS streaming source", "Source/Network", "Receive data streamed via MSFT ...
false
false
false
false
false
0
roll_down(arg) CONST char *arg; { int n, p, old; old = filepos; if (!arg || (n = Xatoi(arg)) <= 0) n = 1; p = FILEPERPAGE; filepos = (filepos / p - n) * p; if (filepos < 0) { filepos = old; return(warning_bell(arg)); } return(FNC_UPDATE); }
false
false
false
false
false
0
writeFormatted(const Geometry *geometry) { Writer sw; writeFormatted(geometry, true, &sw); return sw.toString(); }
false
false
false
false
false
0
webx_preview_zoom_in (WebxPreview *preview) { gint zoomlevel; gdouble value; zoomlevel = webx_preview_closest_zoomlevel (preview); zoomlevel++; value = webx_zoomlevels[MIN (zoomlevel, G_N_ELEMENTS (webx_zoomlevels) - 1)]; webx_preview_zoom (preview, value); }
false
false
false
false
false
0
group_move_window (rp_group *to, rp_window *win) { rp_group *cur, *from = NULL; rp_window_elem *we = NULL; /* Find the group that the window belongs to. FIXME: If the window exists in multiple groups, then we're going to find the first group with this window in it. */ list_for_each_entry (cur, &rp_gr...
false
false
false
false
false
0
bignum_pospos_bitwise_op(int op, bignum_type arg1, bignum_type arg2) { bignum_type result; bignum_length_type max_length; bignum_digit_type *scan1, *end1, digit1; bignum_digit_type *scan2, *end2, digit2; bignum_digit_type *scanr, *endr; max_length = (BIGNUM_LENGTH(arg1) > BIGNUM_LENGTH(arg2)) ...
false
false
false
false
false
0
transfer_attributes(AttrTable *at_container) { AttrTable *at = at_container->get_attr_table(name()); DBG(cerr << "In BaseType::transfer_attributes; processing " << name() << endl); if (at) { at->set_is_global_attribute(false); DBG(cerr << "Processing AttrTable: " << at->get_name() << endl); AttrTable::Attr_...
false
false
false
false
false
0
unescape_url(const char *from, char *to) { char c; int x1, x2; while ((c = *from++) != 0) if (c == '%') { x1 = *from++; if (!isxdigit(x1)) return -1; x2 = *from++; if (!isxdigit(x2)) return -1; *to++ = (HEXDIGIT(x1) << 4) + HEXDIGIT(x2); } else *to++ = c; *to = 0; return 0; }
false
false
false
false
false
0
toss_wsegs(struct wseg *curr, bool display_update) { struct wseg *seg; while (curr) { seg = curr->nseg; /* remove from level.monsters[][]; need to check curr->wx for * genocided while migrating_mon */ if (curr->wx) { remove_monster(curr->wx, curr->wy); ...
false
false
false
false
false
0
config_empty_free(struct list_head *head) { struct ptoken *t, *n; list_for_each_entry_safe(t, n, head, list) { if(t->d.len) continue; list_del(&t->list); config_ptoken_free(t); } }
false
false
false
false
false
0
BM_ParseNodeReplace(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list) { u32 NodeID; GF_Command *com; GF_Node *node; GF_CommandField *inf; NodeID = 1 + gf_bs_read_int(bs, codec->info->config.NodeIDBits); /*this is delete / new on a DEF node: replace ALL instances*/ node = gf_sg_find_node(codec->curren...
false
false
false
false
false
0
create_krb5_invalidCertificates(krb5_context context, pkinit_plg_crypto_context plg_cryptoctx, pkinit_req_crypto_context req_cryptoctx, pkinit_identity_crypto_context id_cryptoctx, krb5_extern...
false
false
false
false
false
0
defaultUserAgentFromPreferredService() { QString agentStr; // Check if the default COMPONENT contains a custom default UA string... KService::Ptr service = KMimeTypeTrader::self()->preferredService(QL1S("text/html"), QL1S("KParts/ReadOnlyPart")); if (servic...
false
false
false
false
false
0
crashGround (Uint32 dt) { if (id >= MOVING_GROUND) return; float height = tl->y - l->getExactHeight (tl->x, tl->z); if (height < zoom) { tl->y -= (height - zoom); gamma += 10; if (shield > 0) { if (id >= MISSILE1 && id <= MISSILE2) { setExplosion (1.2, 30 * t...
false
false
false
false
false
0
on_window_state_event(GtkWidget *widget, GdkEventWindowState *event, gpointer user_data) { if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { static GtkWidget *menuitem = NULL; if (menuitem == NULL) menuitem = ui_lookup_widget(widget, "menu_fullscreen1"); ignore_callback = TRUE; ui_prefs.fullscre...
false
false
false
false
false
0
start_chat_with (std::string uri, std::string name) { (void)open_chat_with (uri, name, true); }
false
false
false
false
false
0
InputString(szPrompt, sz) byte *szPrompt, *sz; { FILE *file; int cch; file = is.S; is.S = stdout; PrintSz(szPrompt); AnsiColor(kYellow); PrintSz(" > "); AnsiColor(kDefault); if (fgets(sz, cchSzMax, stdin) == NULL) /* Pressing control-D terminates */ Terminate(tcForce); /* the pr...
false
false
false
false
false
0
nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence) { int ret = RING_SPACE(chan, 8); if (ret == 0) { BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1); OUT_RING (chan, chan->vram.handle); BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 5); OUT_RING (chan, upper_32_bits(virtu...
false
false
false
false
false
0
legal_P1_reduction(EDGE *e) /* checks whether the edge e characterizes a legal P1-reduction. Returns 1 if yes, 0 otherwise. It is assumed that edge->start has degree 3, and that both the side vertices edge->next->end and edge->prev->end have degree at least 4. */ { EDGE *run, *last; int v,w,w1,w2, buffer; ...
false
false
false
false
false
0