
87 Cal.Rptr.2d 18 (1999)
73 Cal.App.4th 807
The PEOPLE, Plaintiff and Respondent,
v.
Regino CUSTODIO, Defendant and Appellant.
No. C027999.
Court of Appeal, Third District.
July 22, 1999.
*19 James F. Wilson, under appointment of the Court of Appeal, Lodi, for Defendant and Appellant.
Daniel E. Lungren and Bill Lockyer, Attorneys General, George H. Williamson and David P. Druliner, Chief Assistant Attorneys General, Robert R. Anderson, Senior Assistant Attorney General, Stan Cross and Nanette Winaker, Deputy Attorneys General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]
*20 SCOTLAND, P.J.
A jury convicted defendant Regino Custodio of possessing a sharp instrument while confined in a penal institution (Pen. Code, § 4502, subd. (a); further section references are to this code) and found that he had a prior serious felony conviction within the meaning of the "three strikes law" (§ 667, subds.(d) & (e)) and had served two prior separate prison terms within the meaning of section 667.5, subdivision (b). He was sentenced to an aggregate prison term of eight years.
In the published part of this opinion, we reject defendant's assertion that section 4502, subdivision (a) is unconstitutionally vague. As we shall explain, viewing the statute according to the fair import of its terms and its purpose, a person of ordinary intelligence would know what it does and does not prohibit. Considering the nature of the item found in defendant's cell (including its tapered shape and the length and firmness of its sharp metal point) and the fact it is not a necessary possession for an inmate, the person would know it is a sharp instrument which falls within the prohibition of section 4502, subdivision (a).
In the unpublished portion of our opinion, we find merit in only one of defendant's remaining contentions. The People concede, and we agree, the trial court erred in failing to award defendant presentence credits. Hence, we shall modify the judgment to award the appropriate credits, and affirm as modified.

FACTS
During a search of defendant's cell, a correctional officer found a plastic barrel of a ball-point pen with a piece of metal like a sewing machine needle sticking out of it. An expert opined that the object was "very capable of being used as a weapon" because the metal was extremely stiff, had been affixed by melting the plastic of the pen barrel, and the entire object had a tapered shape so that "once it starts, there is nothing going to stop it from going as hard as one [] pushfe[s] it."
Both the correctional officer and the expert testified about "cup picks," which generally are used by inmates to decorate plastic items. According to the expert, a cup pick "usually[] has a small, a pointed point that has a blunt backing on it. Might stick out an 8th to a quarter inch" and ordinarily is used by inmates to decorate plastic items.
The expert never had seen a cup pick as "firm" as the item seized from defendant's cell, and agreed that "[t]ypically cup picks have softer or less firm tips" than the item in question.
Defendant testified that he used the item for "artistic talents" to engrave his cup and sunglasses. He did not believe it was a weapon or sharp instrument.

DISCUSSION

I
Section 4502, subdivision (a) provides in pertinent part: "Every person who, while at or confined in any penal institution ... possesses or carries upon his or her person or has under his or her custody or control any instrument or weapon of the kind commonly known as a blackjack, slungshot, billy, sandclub, sandbag, or metal knuckles, any explosive substance, or fixed ammunition, any dirk or dagger or sharp instrument, any pistol, revolver, or other firearm, or any tear gas or tear gas weapon, is guilty of a felony...."
Defendant claims the term "sharp instrument" in this section violates due process of law because it is unconstitutionally vague on its face and as applied in his case.
"Due process requires that criminal statutes be reasonably definite.... In order for a criminal statute to satisfy the dictates of due process in this regard, it must meet two requirements. `First, the provision must be definite enough to provide a standard of conduct *21 for those whose activities are proscribed.... Because we assume that individuals are free to choose between lawful and unlawful conduct, "we insist that laws give the person of ordinary intelligence a reasonable opportunity to know what is prohibited, so that he [or she] may act accordingly. Vague laws trap the innocent by not providing fair warning." ... [H] Second, the statute must provide definite guidelines for the police in order to prevent arbitrary and discriminatory enforcement....'" (People v. Bamba (1997) 58 Cal.App.4th 1113, 1120, 68 Cal.Rptr.2d 450, citations omitted.)
Facial attacks on section 4502 based upon claims that it is unconstitutionally vague have been rejected over the past 50 years. (E.g., People v. Steely (1968) 266 Cal.App.2d 591, 596-597, 72 Cal. Rptr. 368; People v. Morales (1967) 252 Cal.App.2d 537, 539-541, 60 Cal.Rptr. 671; People v. Crenshaw (1946) 74 Cal.App.2d 26, 27-28, 167 P.2d 781.) "Unless a statute facially tenders a present total conflict with constitutional provisions, any overbreadth in a statute is ordinarily cured through case-by-case analysis of the fact situations to which the statute is applied." (In re Marriage of Siller (1986) 187 Cal. App.3d 36, 49, 231 Cal.Rptr. 757.)
While a statute imposing criminal liability "may be declared invalid in [its] entirety if piecemeal adjudication of the legality of the statute would entail the vague or uncertain future application of the statute" (In re Marriage of Siller, supra, 187 Cal.App.3d at p. 49, 231 Cal. Rptr. 757), we see no such danger with respect to section 4502, subdivision (a).
Defendant's complaint is that the term "sharp instrument" is unconstitutionally vague on its face because it "fails to give adequate guidance to law enforcement as to the standards for enforcement." For example, he points out that officers apparently ignore an inmate's possession of a sharpened pencil even though it is a "sharp instrument" capable of being used as a weapon. Thus, he complains, the absence of a statutory definition for sharp instrument "places almost unfettered discretion in the hands of law enforcement," "permits and encourages an arbitrary and discriminatory enforcement of the law," and leaves an inmate to speculate whether a particular sharp object violates the statute. We are unpersuaded.
"In analyzing whether a statute is sufficiently definite to pass constitutional muster, we look not only at the language of the statute but also to legislative history and California decisions construing the statute." (People v. Bamba, supra, 58 Cal.App.4th at p. 1120, 68 Cal.Rptr.2d 450.) By prohibiting prison inmates from possessing any instrument or weapon of the kind specified in the statute, section 4502, subdivision (a) is intended to protect inmates and correctional staff "from the peril of assaults with dangerous weapons by armed prisoners[.]" (People v. Wells (1945) 68 Cal.App.2d 476, 481, 156 P.2d 979.) It applies to instruments that can be used to inflict injury and that are not necessary for an inmate to have in the inmate's possession. (People v. Morales, supra, 252 Cal.App.2d at p. 541, 60 Cal. Rptr. 671.)
Thus, viewing the statute "according to the fair import of [its] terms, with a view to effect its objects and to promote justice" (§ 4), a person of ordinary intelligence would know what is and what is not prohibited by the statute. For example, the person would understand that section 4502, subdivision (a) does not apply to a sharpened pencilwhich ordinarily is used for a legitimate and necessary purpose unless the inmate uses the pencil as a weapon. (Cf. People v. Grubb (1965) 63 Cal.2d 614, 620-621, 47 Cal.Rptr. 772, 408 P.2d 100.) Accordingly, the statute is not unconstitutionally vague on its face.
Nor is the statute vague as applied in this case. Asserting that a "cup pick" is a device made by an inmate for the ordinary purpose of using it to engrave designs *22 on plastic items, such as cups, and suggesting that the "cup pick" found in his possession "was no more dangerous than is a pen or pencil," defendant argues (1) he was required to speculate whether it was prohibited by section 4502; subdivision (a), and (2) he was prosecuted "purely on the whim of a prison guard who chose to deal with this situation as a felony criminal offense rather than simply as an administrative matter, as apparently are the other `cup pick' cases." Again, we disagree.
Evidence established that the sharp instrument seized from defendant's cell was capable of being used to inflict injury as a stabbing device, and that the instrument was not necessary for defendant to have in his possession. This is not a situation where a device used for artistic purposes was possessed in a prison craft room. In fact, defendant concedes that all "cup picks" found in prison cells are confiscated by the authorities.
Therefore, defendant reasonably should have known he could not lawfully possess the sharp instrument in his cell. There is no evidence to support his suggestion that the possession of a "cup pick" by an inmate does not ordinarily lead to prosecution pursuant to section 4502, subdivision (a).
Considering the nature of the item found in defendant's cell (including its tapered shape and the length and firmness of its sharp metal point) and the fact it is not a necessary possession for an inmate, a person of ordinary intelligence would know it is a sharp instrument which falls within the prohibition of section 4502, subdivision (a).

II-IV[**]

DISPOSITION
The judgment is modified to give defendant credit for 55 days of actual custody and 26 days for good conduct, a total of 81 days of presentence credit. As modified, the judgment is affirmed. The trial court is directed to amend the abstract of judgment to reflect the modification, and to send a copy of the amended abstract to the Department of Corrections.
SIMS, J., and NICHOLSON, J., concur.
NOTES
[*]  Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exception of parts II-IV.
[**]  See footnote *, ante.
