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
chirp_global_putfile(const char *host, const char *path, FILE * stream, INT64_T mode, INT64_T length, time_t stoptime) { if(is_multi_path(host)) { char mhost[CHIRP_PATH_MAX]; char mpath[CHIRP_PATH_MAX]; parse_multi_path(path, mhost, mpath); return chirp_multi_putfile(mhost, mpath, stream, mode, length, stoptim...
false
false
false
false
false
0
fill_labels (void) { gint i, pos; const gchar *origs[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS; const struct { const gchar *given; const gchar *wanted; } cases[] = { /* Note: this list is simply ripped from soundcard.h. For * some people, some values might be missing (3D surround, *...
false
false
false
false
false
0
get_revision_1(struct rev_info *revs) { if (!revs->commits) return NULL; do { struct commit_list *entry = revs->commits; struct commit *commit = entry->item; revs->commits = entry->next; free(entry); if (revs->reflog_info) fake_reflog_parent(revs->reflog_info, commit); /* * If we haven't done ...
false
false
false
false
false
0
isDefault(const IPRoute &r) const { return !r.isDirect() && r.getNetmask().getLength() == 0 && r.getDestination() == InetAddr("0.0.0.0"); }
false
false
false
false
false
0
atl1c_update_hw_stats(struct atl1c_adapter *adapter) { u16 hw_reg_addr = 0; unsigned long *stats_item = NULL; u32 data; /* update rx status */ hw_reg_addr = REG_MAC_RX_STATUS_BIN; stats_item = &adapter->hw_stats.rx_ok; while (hw_reg_addr <= REG_MAC_RX_STATUS_END) { AT_READ_REG(&adapter->hw, hw_reg_addr, &dat...
false
false
false
false
false
0
xhci_dbg_ep_rings(struct xhci_hcd *xhci, unsigned int slot_id, unsigned int ep_index, struct xhci_virt_ep *ep) { int i; struct xhci_ring *ring; if (ep->ep_state & EP_HAS_STREAMS) { for (i = 1; i < ep->stream_info->num_streams; i++) { ring = ep->stream_info->stream_rings[i]; xhci_dbg(xhci, "Dev %d endpoi...
false
false
false
false
false
0
WriteBlock( int block_index, void *buffer ) { if( !file->GetUpdatable() ) throw PCIDSKException( "File not open for update in WriteBlock()" ); InvalidateOverviews(); int pixel_size = DataTypeSize(GetType()); int pixel_count = GetBlockWidth() * GetBlockHeight(); if( block_index < 0 || blo...
false
false
false
false
false
0
_get_image_deltas ( Object image, float *deltas, int *set ) { DXASSERTGOTO ( image && deltas && set ); switch ( DXGetObjectClass ( image ) ) { case CLASS_FIELD: { float Origin[2]; float Delta[4]; int count[2]; Pointer ptr; ...
false
true
false
false
false
1
plugin_hook_load_subclass (GType type, GHashTable *hash_table) { EPluginHookClass *hook_class; EPluginHookClass *dupe_class; gpointer key; hook_class = g_type_class_ref (type); /* Sanity check the hook class. */ if (hook_class->id == NULL || *hook_class->id == '\0') { g_warning ( ...
false
false
false
false
false
0
_ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * buf, int num) { u32 aligned_addr = addr & IPW_INDIRECT_ADDR_MASK; /* dword align */ u32 dif_len = addr - aligned_addr; u32 i; IPW_DEBUG_IO("addr = %i, buf = %p, num = %i\n", addr, buf, num); if (num <= 0) { return; } /* Write the first dword (or ...
false
false
false
false
false
0
getAtomic(unsigned Opcode, DebugLoc dl, EVT MemVT, SDValue Chain, SDValue Ptr, SDValue Val, const Value* PtrVal, unsigned Alignment) { if (Alignment == 0) // Ensure that codegen never sees ...
false
false
false
false
false
0
lang_find_relro_sections (void) { bfd_boolean has_relro_section = FALSE; /* Check all sections in the link script. */ lang_find_relro_sections_1 (expld.dataseg.relro_start_stat, &has_relro_section); if (!has_relro_section) link_info.relro = FALSE; }
false
false
false
false
false
0
get_sub_conflicts (wp, size_word) struct web_part *wp; unsigned int size_word; { bitmap b = find_sub_conflicts (wp, size_word); if (!b) { struct tagged_conflict *cl = (struct tagged_conflict *) ra_alloc (sizeof *cl); cl->conflicts = BITMAP_XMALLOC (); cl->size_word = size_word; ...
false
false
false
false
false
0
pk_load_introspection (const gchar *filename, GError **error) { gboolean ret; gchar *data = NULL; GDBusNodeInfo *info = NULL; GFile *file; /* load file */ file = g_file_new_for_path (filename); ret = g_file_load_contents (file, NULL, &data, NULL, NULL, error); if (!ret) goto out; /* build introspec...
false
false
false
false
false
0
__e1000_vlan_mode(struct e1000_adapter *adapter, netdev_features_t features) { struct e1000_hw *hw = &adapter->hw; u32 ctrl; ctrl = er32(CTRL); if (features & NETIF_F_HW_VLAN_CTAG_RX) { /* enable VLAN tag insert/strip */ ctrl |= E1000_CTRL_VME; } else { /* disable VLAN tag insert/strip */ ctrl &=...
false
false
false
false
false
0
devfreq_powersave_handler(struct devfreq *devfreq, unsigned int event, void *data) { int ret = 0; if (event == DEVFREQ_GOV_START) { mutex_lock(&devfreq->lock); ret = update_devfreq(devfreq); mutex_unlock(&devfreq->lock); } return ret; }
false
false
false
false
false
0
nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) { struct nvkm_subdev *subdev = &clk->subdev; struct nvkm_device *device = subdev->device; struct nvkm_therm *therm = device->therm; struct nvkm_volt *volt = device->volt; struct nvkm_cstate *cstate; int ret; if (!list_empty(&pstate-...
false
false
false
false
false
0
add_communication_unit(gm_gps_comm_unit& C) { if (comm_loops.find(C) != comm_loops.end()) // already added return; comm_loops.insert(C); std::list<gm_gps_communication_symbol_info> new_list; comm_symbol_info[C] = new_list; // create empty list by copying. gm_gps_communication_size_info...
false
false
false
false
false
0
client_get_shaped(ObClient *self) { self->shaped = FALSE; #ifdef SHAPE if (obt_display_extension_shape) { gint foo; guint ufoo; gint s; XShapeSelectInput(obt_display, self->window, ShapeNotifyMask); XShapeQueryExtents(obt_display, self->window, &s, &foo, ...
false
false
false
false
false
0
create_circumcircle(void) { _point *A, *B, *C; double a, d, e, f, s1, s2, s3; _circle *val; C = POP(_point); B = POP(_point); A = POP(_point); get_mem(val, _circle); s1 = A->x*A->x + A->y*A->y; s2 = B->x*B->x + B->y*B->y; s3 = C->x*C->x + C->y*C->y; a = det3(A->x, B->x, C->x...
false
false
false
false
false
0
cdffile_validate_vars(const NetCDF *cdffile, GError **error) { NetCDFDim *dim; NetCDFVar *var; gint i, j, size; for (i = 0; i < cdffile->nvars; i++) { var = cdffile->vars + i; size = cdffile_type_size(var->type); for (j = 0; j < var->ndims; j++) { ...
false
false
false
false
false
0
iterate() { int score; int alpha = -INFTY; int beta = INFTY; for (rootdepth = 1; rootdepth <= maxdepth; rootdepth++) { maxplyreached = 0; maxplyreached_quiesce = 0; /* Search the root node. */ score = search_root(0, rootdepth, alpha, beta); if (stop) { break; } /* If search failed low, re-sea...
false
false
false
false
false
0
save_ips(IPADDR *ip4, IPADDR *ip6, IPADDR **save_ip4, IPADDR **save_ip6) { if (ip4->family == 0) g_free_and_null(*save_ip4); else { if (*save_ip4 == NULL) *save_ip4 = g_new(IPADDR, 1); memcpy(*save_ip4, ip4, sizeof(IPADDR)); } if (ip6->family == 0) g_free_and_null(*save_ip6); else ...
false
true
false
false
false
1
listRecvQFile(FILE* fd, const SpoolDir& dir, const char* filename, const struct stat& sb) { RecvInfo* rip = getRecvInfo(fxStr::format("%s%s", dir.pathname, filename), sb); if (rip) Rprintf(fd, recvFormat, *rip, sb); else listUnixFile(fd, dir, filename, sb); }
false
false
false
false
false
0
radeon_bo_init(struct radeon_device *rdev) { /* Add an MTRR for the VRAM */ if (!rdev->fastfb_working) { rdev->mc.vram_mtrr = arch_phys_wc_add(rdev->mc.aper_base, rdev->mc.aper_size); } DRM_INFO("Detected VRAM RAM=%lluM, BAR=%lluM\n", rdev->mc.mc_vram_size >> 20, (unsigned long long)rdev->mc.aper_...
false
false
false
false
false
0
ipmi_lan_close_session (ipmi_ctx_t ctx) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t authentication_type; unsigned int internal_workaround_flags = 0; int ret, rv = -1; /* Do not use ipmi_cmd_close_session(), we use a close session retransmit workaround */ assert (ctx &...
false
false
false
false
false
0
SocketBindStd(int s,int af,const char *hostname,int port) { sockaddr_u bind_addr; if(bind_addr.set_defaults(af,hostname,port)) { if(bind_addr.bind_to(s)==-1) ProtoLog::LogError(0,"bind(%s): %s",bind_addr.to_string(),strerror(errno)); } }
false
false
false
false
false
0
format_network_rate(guint64 rate, guint64 max_rate) { return procman::format_rate(rate, max_rate, ProcmanApp::get()->config.network_in_bits); } }
false
false
false
false
false
0
hit_test_stretch_handle (NemoIconCanvasItem *item, EelIRect probe_canvas_rect, GtkCornerType *corner) { EelIRect icon_rect; GdkPixbuf *knob_pixbuf; int knob_width, knob_height; int hit_corner; g_assert (NEMO_IS_ICON_CANVAS_ITEM (item)); /* Make sure there are handles to hit. */ if (!item->details->sho...
false
false
false
false
false
0
gtr_notebook_remove_all_pages (GtrNotebook *notebook) { g_return_if_fail (GTR_IS_NOTEBOOK (notebook)); gtk_container_foreach (GTK_CONTAINER (notebook), (GtkCallback)remove_tab, notebook); }
false
false
false
false
false
0
macvlan_port_create(struct net_device *dev) { struct macvlan_port *port; unsigned int i; int err; if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK) return -EINVAL; if (netif_is_ipvlan_port(dev)) return -EBUSY; port = kzalloc(sizeof(*port), GFP_KERNEL); if (port == NULL) return -ENOMEM; port-...
false
false
false
false
false
0
__list_lookup_parent(struct list_head *lh, struct aa_profile *profile) { const char *base = basename(profile->base.hname); long len = base - profile->base.hname; struct aa_load_ent *ent; /* parent won't have trailing // so remove from len */ if (len <= 2) return NULL; len -= 2; list_for_each_entr...
false
false
false
false
false
0
packetHandler(ArRobotPacket *packet) { if (packet->getID() != 0xC0) return false; myHeading = ArMath::fixAngle(packet->bufToByte2() / 10.0); myPitch = ArMath::fixAngle(packet->bufToByte2() / 10.0); myRoll = ArMath::fixAngle(packet->bufToByte2() / 10.0); myXMag = packet->bufToByte2() / 100.0; myYMag...
false
false
false
false
false
0
r300_emit_vpu(drm_radeon_private_t *dev_priv, drm_radeon_kcmd_buffer_t *cmdbuf, drm_r300_cmd_header_t header) { int sz; int addr; RING_LOCALS; sz = header.vpu.count; addr = (header.vpu.adrhi << 8) | header.vpu.adrlo; if (!sz) return 0; if (sz * 16 > drm_buffer_unprocessed(cmdbuf->buffer)) r...
false
false
false
false
false
0
hold_save_command(dword Id, PLCI *plci, byte Rc) { byte SS_Ind[] = "\x05\x02\x00\x02\x00\x00"; /* Hold_Ind struct*/ word Info; word internal_command; dbug(1, dprintf("[%06lx] %s,%d: hold_save_command %02x %04x", UnMapId(Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command)); Info = GOOD; internal_comma...
false
false
false
false
false
0
mono_reflection_bind_generic_parameters (MonoReflectionType *type, int type_argc, MonoType **types) { MonoClass *klass; MonoReflectionTypeBuilder *tb = NULL; gboolean is_dynamic = FALSE; MonoClass *geninst; mono_loader_lock (); if (is_sre_type_builder (mono_object_class (type))) { tb = (MonoReflectionTypeBuil...
false
false
false
false
false
0
strio_get_lineno(VALUE self) { return LONG2NUM(StringIO(self)->lineno); }
false
false
false
false
false
0
dlmc_lockspace_info(char *name, struct dlmc_lockspace *lockspace) { struct dlmc_header h, *rh; char reply[sizeof(struct dlmc_header) + sizeof(struct dlmc_lockspace)]; int fd, rv; init_header(&h, DLMC_CMD_LOCKSPACE_INFO, name, 0); memset(reply, 0, sizeof(reply)); fd = do_connect(DLMC_QUERY_SOCK_PATH); if (fd <...
true
true
false
false
false
1
posix_file_stuff(s48_call_t call, s48_ref_t op, s48_ref_t arg0, s48_ref_t arg1) { int status; switch (s48_extract_long_2(call, op)) { /* umask(new_mask) */ case 0: return enter_mode(call, umask(s48_extract_mode(call, arg0))); /* link(existing, new) */ case 1: RETRY_OR_RAISE_NEG(status, link(s...
false
false
false
false
true
1
find_method_in_superclasses (tree searched_class, int flags, tree method_name, tree signature, tree (*signature_builder) (tree)) { tree klass; for (klass = CLASSTYPE_SUPER (searched_class); klass != NULL_TREE; klass = CLASSTYPE_SUPER (klass)) { ...
false
false
false
false
false
0
detect_field_duplicates (tree fieldlist) { tree x, y; int timeout = 10; /* If the struct is the list of instance variables of an Objective-C class, then we need to add all the instance variables of superclasses before checking for duplicates (since you can't have an instance variable in a subclass...
false
false
false
false
false
0
vxml_parser_handle_uppername(vxml_parser_t *vp, struct vxml_output *vo) { uint32 uc; vxml_output_check(vo); g_assert(0 == vxml_output_size(vo)); while (0 != (uc = vxml_next_char(vp))) { if (!vxml_is_ascii_upper_letter_char(uc)) { vxml_unread_char(vp, uc); break; } vxml_output_append(vo, uc); /* The AS...
false
false
false
false
false
0
toJSON(int spc, bool skip_initial) const { std::string spcs; for (int i = 0; i < spc; i++) { spcs += " "; } std::string str; if (skip_initial) { str += "[\n"; } else { str += spcs + "[\n"; } str += elems_->toJSON(spc + 1, false); str += spcs + "]"; return str; }
false
false
false
false
false
0
buildDependencies(SceneGraph& sg, int pcol1, int pcol2, int which) { int node1 = sg.getTopNode(pcol1), node2 = sg.getTopNode(pcol2); if (node1 == -1 || node2 == -1) return; while (true) { // if node1 occludes node2, then scan down pcol1 and see if there are any lower // nodes that also occlude it; ...
false
false
false
false
false
0
writeDeltaTo(int32_t jumpTarget) { int32_t i=ucharsLength-jumpTarget; U_ASSERT(i>=0); if(i<=UCharsTrie::kMaxOneUnitDelta) { return write(i); } UChar intUnits[3]; int32_t length; if(i<=UCharsTrie::kMaxTwoUnitDelta) { intUnits[0]=(UChar)(UCharsTrie::kMinTwoUnitDeltaLead+(i>>16)...
false
false
false
false
false
0
print_header(FILE *fp, const char *c) { /* * rfc1522 encoding of headers would go here (but it sucks). */ while (*c != '\0') { putc(*c, fp); if (*c == '\n') { if (!IS_SPACE(*(c+1))) return c + 1; } c++; } return c; }
false
false
false
false
false
0
recinit(unsigned int n) { record = (char *) malloc(n); fields = (char *) malloc(n); fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *)); if (record == NULL || fields == NULL || fldtab == NULL) FATAL("out of space for $0 and fields"); fldtab[0] = (Cell *) malloc(sizeof (Cell)); *fldtab[0] = dollar0; fldtab[...
true
true
false
false
false
1
GetServerLog(bool reset) { wxString ret = server_msg; if ( reset ) { server_msg.Clear(); } return ret; }
false
false
false
false
false
0
au_finfo_fin(struct file *file) { struct au_finfo *finfo; au_nfiles_dec(file->f_path.dentry->d_sb); finfo = au_fi(file); AuDebugOn(finfo->fi_hdir); AuRwDestroy(&finfo->fi_rwsem); au_cache_free_finfo(finfo); }
false
false
false
false
false
0
et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){ int digit; LONGDOUBLE_TYPE d; if( (*cnt)++ >= 16 ) return '0'; digit = (int)*val; d = digit; digit += '0'; *val = (*val - d)*10.0; return digit; }
false
false
false
false
false
0
esas2r_build_cfg_req(struct esas2r_adapter *a, struct esas2r_request *rq, u8 sub_func, u32 length, void *data) { struct atto_vda_cfg_req *vrq = &rq->vrq->cfg; clear_vda_request(rq); rq->vrq->scsi.function = VDA_FUNC_CFG; vrq->sub_func = sub_func; vrq->length = cpu_to_le32(length); if (data...
false
true
false
false
false
1
gsb_form_widget_check_empty ( GtkWidget *entry ) { if (!entry || (!GTK_IS_ENTRY (entry) && !GTK_IS_COMBOFIX (entry))) return FALSE; if (GTK_IS_COMBOFIX (entry)) entry = GTK_COMBOFIX (entry) -> entry; return GPOINTER_TO_INT( g_object_get_data ( G_OBJECT(entry), "empty" ) ); }
false
false
false
false
false
0
read_json_numeric(std::istream &s) { std::string numeric_text; char c; if(try_to_read(s, '-')) numeric_text += '-'; if(!try_to_read(s, '0')) { // Read in whole digits c = s.peek(); check_stream(s); if(!(c >= '1' && c <= '9')) { throw json::ParseException(); } numeric_text += c; s.ignore()...
false
false
false
false
false
0
operator*(const Matrix2x2& m1, const Matrix2x2& m2) { int i, j, rc; Matrix2x2 result; for(i = 0; i < 2; i++) for(j = 0; j < 2; j++){ result.row[i][j] = 0; for(rc = 0; rc < 2; rc++) result.row[i][j] += m1.row[i][rc] * m2.row[rc][j]; } return result; }
false
false
false
false
false
0
ufshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode, enum attr_idn idn, u8 index, u8 selector, u32 *attr_val) { struct ufs_query_req *request = NULL; struct ufs_query_res *response = NULL; int err; BUG_ON(!hba); ufshcd_hold(hba, false); if (!attr_val) { dev_err(hba->dev, "%s: attribute value re...
false
false
false
false
false
0
Ns_ConnReturnStatus(Ns_Conn *conn, int status) { int result; if (ReturnRedirect(conn, status, &result)) { return result; } Ns_ConnSetRequiredHeaders(conn, NULL, 0); Ns_ConnFlushHeaders(conn, status); return Ns_ConnClose(conn); }
false
false
false
false
false
0
modecheck() { bool check=true; string mesg=""; if(mode.value()=="simple"){ if(outfile.value()==""){ mesg+="You must set an output name in simple mode: -o\n"; check=false; } } /* if(mode.value()=="seedmask"){ if(logdir.value()==""){ mesg+="You must set an output directory name ...
false
false
false
false
false
0
wl1271_configure_resume(struct wl1271 *wl, struct wl12xx_vif *wlvif) { int ret = 0; bool is_ap = wlvif->bss_type == BSS_TYPE_AP_BSS; bool is_sta = wlvif->bss_type == BSS_TYPE_STA_BSS; if ((!is_ap) && (!is_sta)) return; if ((is_sta && !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) || (is_ap && !test_...
false
false
false
false
false
0
removeAllPages() { if (!mParent->getManager()->getPagingOperationsEnabled()) return; for (PageMap::iterator i= mPages.begin(); i != mPages.end(); ++i) { OGRE_DELETE i->second; } mPages.clear(); }
false
false
false
false
false
0
createSubFolder(string name, bool isDirectory, mail::callback::folderList &callback1, mail::callback &callback2) const { callback2.fail("Folders cannot be created in this POP3 server account."); }
false
false
false
false
false
0
ConfigureGlobalObjects( v8::Handle<v8::ObjectTemplate> global_proxy_template) { Handle<JSObject> global_proxy( JSObject::cast(global_context()->global_proxy())); Handle<JSObject> inner_global(JSObject::cast(global_context()->global())); if (!global_proxy_template.IsEmpty()) { // Configure the globa...
false
false
false
false
false
0
conf_space_write(struct pci_dev *dev, const struct config_field_entry *entry, int offset, u32 value) { int ret = 0; const struct config_field *field = entry->field; switch (field->size) { case 1: if (field->u.b.write) ret = field->u.b.write(dev, offset, (u8) value, entry->data); br...
false
false
false
false
false
0
mlx4_en_do_set_rx_mode(struct work_struct *work) { struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv, rx_mode_task); struct mlx4_en_dev *mdev = priv->mdev; struct net_device *dev = priv->dev; mutex_lock(&mdev->state_lock); if (!mdev->device_up) { en_dbg(HW, priv, "Card is not up, ignorin...
false
false
false
false
false
0
__shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, struct dm_block_validator *v, struct dm_block **result) { int r; dm_block_t new; struct dm_block *orig_block; r = dm_sm_new_block(tm->sm, &new); if (r < 0) return r; r = dm_sm_dec_block(tm->sm, orig); if (r < 0) return r; r = dm...
false
true
false
false
false
1
ath6kl_set_assoc_req_ies(struct ath6kl_vif *vif, const u8 *ies, size_t ies_len) { struct ath6kl *ar = vif->ar; const u8 *pos; u8 *buf = NULL; size_t len = 0; int ret; /* * Clear previously set flag */ ar->connect_ctrl_flags &= ~CONNECT_WPS_FLAG; /* * Filter out RSN/WPA IE(s) */ if (ies && i...
false
true
false
false
false
1
swapri(R *IO, INT r, INT m, INT s, INT jstart, INT jend) { INT k; INT ms = m * s; INT js = jstart * s; for (k = 0; k + k < r; ++k) { /* pr := IO + (m - j) * s + k * ms */ R *pr = IO + (k + 1) * ms - js; /* pi := IO + (m - j) * s + (r - 1 - k) * ms */ R *pi = IO + (r - k) * ms - js; IN...
false
false
false
false
false
0
spifconf_free_subsystem(void) { spifconf_var_t *v, *tmp; unsigned long i; for (v = spifconf_vars; v;) { tmp = v; v = v->next; spifconf_free_var(tmp); } for (i = 0; i < builtin_idx; i++) { FREE(builtins[i].name); } for (i = 0; i <= ctx_idx; i++) { FREE...
false
false
false
false
false
0
gda_capi_provider_create_operation (GdaServerProvider *provider, GdaConnection *cnc, GdaServerOperationType type, G_GNUC_UNUSED GdaSet *options, GError **error) { gchar *file; GdaServerOperation *op; gchar *str; gchar *dir; if (cnc) { g_return_val_if_fail (GDA_IS_CONNECTION ...
false
false
false
false
false
0
gth_input_make_indices(GthInput *input, const char *progname, GtError *err) { int had_err; GthOutput *out; gt_error_check(err); gt_assert(input); out = gthoutput_new(); had_err = input->file_preprocessor(input, true, false, false, false, false, false, progname, ...
false
false
false
false
false
0
m565_converter(const uchar *from,uchar *to,int w, int delta) { OUTTYPE *t = (OUTTYPE *)to; int d, td; if (dir) { dir = 0; from = from+(w-1)*delta; t = t+(w-1)*OUTSIZE; d = -delta; td = -OUTSIZE; } else { dir = 1; d = delta; td = OUTSIZE; } int r=ri; for (; w--; from += d, t...
false
false
false
false
false
0
MessageSeriesEnd(int propagation, bool blocking) { switch (m_continueAt) { case 0: if (IsolatedMessageSeriesEnd(blocking)) return true; case 1: if (ShouldPropagateMessageSeriesEnd() && OutputMessageSeriesEnd(1, propagation, blocking)) return true; } return false; }
false
false
false
false
false
0
niu_enable_alt_mac(struct niu *np, int index, int on) { unsigned long reg; u64 val, mask; if (index >= niu_num_alt_addr(np)) return -EINVAL; if (np->flags & NIU_FLAGS_XMAC) { reg = XMAC_ADDR_CMPEN; mask = 1 << index; } else { reg = BMAC_ADDR_CMPEN; mask = 1 << (index + 1); } val = nr64_mac(reg); if...
false
false
false
false
false
0
c_common_complain_wrong_lang_p (const struct cl_option *option) { if (accept_all_c_family_options && (option->flags & c_family_lang_mask)) return false; return true; }
false
false
false
false
false
0
from_buffer(struct st_buffer * st_bp, char __user *ubp, int do_count) { int i, cnt, res, offset; int length = PAGE_SIZE << st_bp->reserved_page_order; for (i = 0, offset = st_bp->read_pointer; i < st_bp->frp_segs && offset >= length; i++) offset -= length; if (i == st_bp->frp_segs) { /* Should never happen...
false
false
false
false
false
0
display_role_allow(role_allow_rule_t * ra, policydb_t * p, FILE * fp) { for (; ra; ra = ra->next) { fprintf(fp, "role allow "); display_mod_role_set(&ra->roles, p, fp); display_mod_role_set(&ra->new_roles, p, fp); fprintf(fp, "\n"); } }
false
false
false
false
false
0
Ns_NormalizePath(Ns_DString *dsPtr, char *path) { char end; register char *src, *part, *slash; Ns_DString tmp; Ns_DStringInit(&tmp); src = Ns_DStringAppend(&tmp, path); #ifdef _WIN32 if (isalpha(*src) && src[1] == ':') { if (isupper(*src)) { *src = tolower(*src); } Ns_DStringNAppend(dsP...
false
false
false
false
false
0
exec_global( const char ** const ibufpp, const int gflags, const bool interactive ) { static char * buf = 0; static int bufsz = 0; const char * cmd = 0; if( !interactive ) { if( traditional() && !strcmp( *ibufpp, "\n" ) ) cmd = "p\n"; /* null cmd_list == 'p' */ el...
false
true
false
false
false
1
plP_pllclp(PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void (*draw) (short *, short *, PLINT)) { PLINT xx1, xx2, yy1, yy2; PLINT i, iclp = 0; short _xclp[PL_MAXPOLY], _yclp[PL_MAXPOLY]; short *xclp, *yclp; int drawable; if ( npts < PL_MAXPOLY ) { ...
false
false
false
false
false
0
write_real_cst (const tree value) { if (abi_version_at_least (2)) { long target_real[4]; /* largest supported float */ char buffer[9]; /* eight hex digits in a 32-bit number */ int i, limit, dir; tree type = TREE_TYPE (value); int words = GET_MODE_BITSIZE (TYPE_MODE (type)) /...
false
false
false
false
false
0
collapse(char *pattern) { char *s = pattern, *s1, *t; if (BadPtr(pattern)) return pattern; /* * Collapse all \** into \*, \*[?]+\** into \*[?]+ */ for (; *s; s++) if (*s == '\\') if (!*(s + 1)) break; else s++; else if (*s == '*') { if (*(t = s1 = s + 1) == '*') while (*t == '*') ...
false
false
false
false
false
0
exportToFile( const std::string& filename_const ) const { std::string filename = getExportToFileName( filename_const, ".vcf", getExportTypes() ); UT_DEBUGMSG(( "saving vcard to file:%s\n", filename.c_str() )); #ifd...
false
false
false
false
false
0
canStackSpellRanksInSpellBook(SpellEntry const* spellInfo) const { if (IsPassiveSpell(spellInfo)) // ranked passive spell return false; if (spellInfo->powerType != POWER_MANA && spellInfo->powerType != POWER_HEALTH) return false; if (IsProfessionOrRidingSpell(spellIn...
false
false
false
false
false
0
ConnectionState( eConnectionState state ) { int err = -1; CMessageConnectionState *Object = new CMessageConnectionState(); if ( (state == estCONNECTED) || (state == estDISCONNECTED) ) { // reset all values m_sBuffer.Empty(); m_bHandshake = true; m_timeMyinfoTimeout = time(0); m_nNickListHan...
false
false
false
false
false
0
tile_set_bases(struct tile *ptile, bv_bases bases) { if (!ptile) { return; } ptile->bases = bases; }
false
false
false
false
false
0
createAlternateButton( wxWindow* parent) { if (alternateButtonM.id == wxID_ANY) return 0; return new wxButton(parent, alternateButtonM.id, alternateButtonM.caption); }
false
false
false
false
false
0
find_set(REP_SETS *sets,REP_SET *find) { uint i; for (i=0 ; i < sets->count-1 ; i++) { if (!cmp_bits(sets->set+i,find)) { free_last_set(sets); return i; } } return i; /* return new position */ }
false
false
false
false
false
0
CleanPreMaster(SSL* ssl) { int i, sz = ssl->arrays.preMasterSz; for (i = 0; i < sz; i++) ssl->arrays.preMasterSecret[i] = 0; RNG_GenerateBlock(&ssl->rng, ssl->arrays.preMasterSecret, sz); for (i = 0; i < sz; i++) ssl->arrays.preMasterSecret[i] = 0; }
false
false
false
false
false
0
lpc18xx_wdt_restart(struct notifier_block *this, unsigned long mode, void *cmd) { struct lpc18xx_wdt_dev *lpc18xx_wdt = container_of(this, struct lpc18xx_wdt_dev, restart_handler); unsigned long flags; int val; /* * Incorrect feed sequence causes immediate watchdog reset if enabled. */ spin_lock...
false
false
false
false
false
0
lua_settag (int tag) { checkCparams(1); luaT_realtag(tag); switch (ttype(L->stack.top-1)) { case LUA_T_ARRAY: (L->stack.top-1)->value.a->htag = tag; break; case LUA_T_USERDATA: (L->stack.top-1)->value.ts->u.d.tag = tag; break; default: luaL_verror("cannot change the tag o...
false
false
false
false
false
0
update_buttons (TotemObject *totem) { gboolean has_item; /* Previous */ has_item = bacon_video_widget_has_previous_track (totem->bvw) || totem_playlist_has_previous_mrl (totem->playlist) || totem_playlist_get_repeat (totem->playlist); totem_action_set_sensitivity ("previous-chapter", has_item); /* Next */ h...
false
false
false
false
false
0
print_volume (xmmsc_result_t *res, cli_infos_t *infos, const gchar *channel) { xmmsv_t *val; const gchar *err; val = xmmsc_result_get_value (res); if (!xmmsv_get_error (val, &err)) { xmmsv_dict_foreach (val, print_volume_entry, (void *) channel); } else { g_printf (_("Server error: %s\n"), err); } cli_inf...
false
false
false
false
false
0
dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data, void **ret_data) { struct dlm_ctxt *dlm = data; unsigned int node; struct dlm_exit_domain *exit_msg = (struct dlm_exit_domain *) msg->buf; mlog(0, "%p %u %p", msg, len, data); if (!dlm_grab(dlm)) return 0; node = exit_msg->node_idx; ...
false
false
false
false
false
0
increment_current_value (space, ndim) struct dimension *space; int ndim; { int i; for (i = ndim - 1; i >= 0; i--) { if ((space[i].current_value = XEXP (space[i].current_value, 1)) == 0) space[i].current_value = space[i].values; else return 1; } return 0; }
false
false
false
false
false
0
um_realm_manager_get_realms (UmRealmManager *self) { GList *objects; GList *realms = NULL; GList *l; g_return_val_if_fail (UM_IS_REALM_MANAGER (self), NULL); objects = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (self)); for (l = objects; l != NULL; l = g_l...
false
false
false
false
false
0
transformJoinUsingClause(ParseState *pstate, RangeTblEntry *leftRTE, RangeTblEntry *rightRTE, List *leftVars, List *rightVars) { Node *result = NULL; ListCell *lvars, *rvars; /* * We cheat a little bit here by building an untransformed operator tree * whose leaves are the already-transf...
false
false
false
false
false
0
c2_tx_timeout(struct net_device *netdev) { struct c2_port *c2_port = netdev_priv(netdev); if (netif_msg_timer(c2_port)) pr_debug("%s: tx timeout\n", netdev->name); c2_tx_clean(c2_port); }
false
false
false
false
false
0
pdf_read_old_trailer(pdf_document *xref, pdf_lexbuf *buf) { int len; char *s; int t; int tok; int c; fz_read_line(xref->file, buf->scratch, buf->size); if (strncmp(buf->scratch, "xref", 4) != 0) fz_throw(xref->ctx, "cannot find xref marker"); while (1) { c = fz_peek_byte(xref->file); if (!(c >= '0' && ...
false
false
false
false
true
1
destroy_tree(struct node *n) { if(!n) return; switch(n->type) { case concat: case alternate: case optional: destroy_tree(n->u.children.left); destroy_tree(n->u.children.right); break; case leaf_class: if(n->u.leaf_class_bitmap != dot_bitmap) free(n->u.leaf_class_bitmap); break; case ro...
false
false
false
false
false
0
_PyIO_get_locale_module(_PyIO_State *state) { PyObject *mod; if (state->locale_module != NULL) { assert(PyWeakref_CheckRef(state->locale_module)); mod = PyWeakref_GET_OBJECT(state->locale_module); if (mod != Py_None) { Py_INCREF(mod); return mod; } ...
false
false
false
false
false
0
isns_print_attrs(isns_object_t *obj, char **argv, unsigned int argsmax) { struct isns_attr_list_parser st; unsigned int i, argc = 0; isns_attr_list_parser_init(&st, obj->ie_template); for (i = 0; i < obj->ie_attrs.ial_count; ++i) { isns_attr_t *attr = obj->ie_attrs.ial_data[i]; char argbuf[512], value[512]; ...
false
false
false
false
false
0