
40 Ill.2d 501 (1968)
241 N.E.2d 185
THE PEOPLE OF THE STATE OF ILLINOIS, Appellee,
v.
WILLIAM SMITH, Appellant.
No. 40459.
Supreme Court of Illinois.
Opinion filed June 21, 1968.
Rehearing denied September 24, 1968.
*502 JULIUS LUCIUS ECHELES and WALTER LA VON PRIDE, both of Chicago, for appellant.
WILLIAM G. CLARK, Attorney General, of Springfield, and JOHN J. STAMOS, State's Attorney, of Chicago, (FRED G. LEACH, Assistant Attorney General, and ELMER C. KISSANE and JAMES B. ZAGEL, Assistant State's Attorneys, of counsel,) for the People.
Judgment affirmed.
Mr. JUSTICE KLUCZYNSKI delivered the opinion of the court:
Defendant, William Smith, was convicted by a jury in the circuit court of Cook County of illegal possession of narcotics and sentenced to imprisonment for not less than twenty nor more than forty years. He appeals directly to this court, charging that the prosecution should have been required to produce its informant at a preliminary hearing, that the trial court erred in failing to quash the search warrant and suppress the evidence, and that the indictment underlying his prosecution was defective.
At the preliminary hearing on the motion to suppress, Officer Simpson testified that at about 11:05 A.M. on May 29, 1964, he and a special employee, John Henderson, appeared before a judge of the circuit court of Cook County for the purpose of obtaining a search warrant. Upon Henderson's affidavit, setting forth the facts and circumstances *503 underlying his belief that defendant was in possession of narcotics, including the fact of his recent purchase of narcotics from defendant, the judge issued the warrant authorizing a search of the person of defendant and the apartment located at 3413 W. Franklin Boulevard in Chicago, Illinois. Simpson stated that he went immediately to this apartment and handed the warrant to officers Craig, Nadile and Demke. Officer Nadile testified that he and Craig knocked on the apartment door and were admitted by defendant, that they presented him with the warrant and removed a set of keys from his person. One of the keys fit his car which was parked outside and another fit the lock on a tackle box which they discovered beneath a bed in the apartment. Inside the box they found a packet containing 484 grams of heroin which they seized. He further testified that he then located the owner of the building, Clarence Carbin, whom he knew and brought him back to the apartment building where Carbin identified defendant as the basement apartment tenant. Office Craig corroborated this account of the circumstances of defendant's arrest.
Defendant contradicted the officers' testimony, claiming that he was arrested between 8:30 and 9:00 A.M. on the morning in question when two officers curbed his car as he was approaching Homan and Franklin boulevards. He stated that he was taken in a police car to 3413 W. Franklin where he waited until an officer came with the landlord, Carbin, who opened the basement apartment which the police then searched. He denied being shown a search warrant or being a tenant in the apartment and further denied ever knowing or selling narcotics to anyone named John Henderson. The trial court denied his motion to suppress, including his demand that the State produce its informer, John Henderson.
At trial, the police officers and defendant repeated their testimony given at the earlier hearing. In addition, four *504 witnesses testified for defendant, corroborating his account of the circumstances of his arrest. Carbin stated that he and his wife were drinking in a tavern at about 9:00 A.M. when the police came and took him to the basement apartment which he opened, letting everyone inside. He denied telling the officers that the apartment was leased to the defendant, asserting that a Ruth Walker was the lessee. His wife confirmed these statements. Winston Harrell, who lived on the second floor in the apartment building, testified that he saw two officers curb a car at about 8:30 A.M. on May 29, and search and handcuff the defendant at Franklin and Homan streets. This testimony was confirmed by Mrs. Mamie Holt who stated she observed these events from the street.
While conceding that under ordinary circumstances the prosecution is not required to disclose the identity of an informer who is not a material witness on the issue of the guilt or innocence of the defendant at trial (McCray v. Illinois, 386 U.S. 300, 18 L.Ed.2d 62, 87 S.Ct. 1056; see People v. Williams, 38 Ill.2d 150, 152-154), defendant argues that the informer here should have been made available for cross-examination at the hearing on his motion to suppress because (1) he was the affiant on the complaint for the search warrant, and (2) by his own affidavit his identity was presumably known to defendant, as he claimed to have purchased narcotics from him.
In our opinion, neither of these reasons are sufficient to compel production of the informer at a preliminary hearing. It has been held that the prosecution need not disclose the identity of an informer merely because he communicated his information to the police through the medium of a search warrant. (People v. Mack, 12 Ill.2d 151.) The crux of defendant's argument is that if he did in fact sell narcotics to the affiant-informer his identity must be known to him, thereby vitiating the traditional reasons favoring an informer's privilege, i.e., to protect him from possible retribution *505 and to maintain his usefulness as a purveyor of information. (See Roviaro v. United States, 353 U.S. 53, 1 L.Ed.2d 639, 77 S.Ct. 623.) It is obvious that this conclusion is not a sufficient indication that defendant knew and could identify the informant in this case. Therefore, the prosecution had a legitimate interest in protecting his identity, by refusing to produce him at the preliminary hearing.
In support of his contention that the trial court should have quashed the search warrant and suppressed the evidence, defendant points out that at the preliminary hearing the court did not have the benefit of the testimony of the four defense witnesses who testified at trial, and that upon hearing their testimony, it became incumbent upon the court to reverse its earlier ruling. We cannot agree. While such procedure is authorized (People v. McGuire, 39 Ill.2d 244; People v. Holick, 337 Ill. 333), the trial court was not obliged to disbelieve the arresting officers and rule in defendant's favor. In circumstances such as these where a choice must be made between the conflicting testimony of opposing witnesses, we have repeatedly held that "it is the function of the trier of fact to determine the credibility of witnesses and the weight to be given their testimony, and that where the evidence is merely conflicting we will not substitute our judgment for that of the trial court." (People v. Henderson, 33 Ill.2d 225, 229.) Without detailing the testimony given by the four defense witnesses, it suffices to mention that it contained inherent inconsistencies which detracted from its credibility. We hold the trial court did not err in denying the motion to quash the search warrant and suppress the evidence.
Finally, defendant argues that his indictment was defective for failure to allege that he "knowingly" possessed the narcotics, relying upon our opinion in People v. Matthew Mills, ante, p. 4, filed January 19, 1968. Following rehearing in that case, it was held that an indictment drafted *506 in substantially the same terms as the statutory section which proscribed the unauthorized possession of narcotics (Ill. Rev. Stat. 1965, chap. 38, par. 22-3) without the allegation of "knowing" possession is sufficient. (People v. Mills, ante, p. 4.) Therefore, the indictment here was sufficient.
The judgment of the circuit court of Cook County is affirmed.
Judgment affirmed.
Mr. JUSTICE WARD took no part in the consideration or decision of this case.
