JDSU (JDSU) beat fiscal second-quarter targets but guided below Wall Street's expectations for the third quarter.

The San Jose, Calif., optical networking shop posted adjusted income of $30 million, or 13 cents a share. That compares with a pro forma profit of $6.8 million, or 3 cents a share, in the prior quarter, and a loss of $3.5 million, or 2 cents a share, in the year-ago period.

Analysts had been looking for a dime a share in adjusted profit, according to Reuters Research.

Sales for the quarter were $366 million for the fiscal second quarter ended in December. That number compares with $318 million in revenue in the prior quarter and $315 million a year ago. Analysts expected sales of $363 million.

Two weeks ago, JDSU raised expectations, saying preliminary revenue tally put sales for the quarter at $362.5 million.

"Positive earnings per share results show marked improvement from previous quarters, highlighting the impact of our strategy to diversify our business and return to profitability, while continuing to deliver highly innovative products to market," CEO Kevin Kennedy said in a press release Wednesday.

Looking ahead, JDSU expects fiscal second quarter sales to slip sequentially to about $343 million. Wall Street was looking for sales around $351 million.

JDSU shares fell 47 cents to $17.49 in postclose action Wednesday.

More from Technology

Elon Musk's Latest Twitter Tirade Is the Dumbest Thing on Wall Street

Elon Musk's Latest Twitter Tirade Is the Dumbest Thing on Wall Street

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Some Companies Are Already Feeling the Effect of GDPR

Some Companies Are Already Feeling the Effect of GDPR

Experts Break Down GDPR Risks for Investors

Experts Break Down GDPR Risks for Investors

Netflix Ready to Surpass Disney as America's Most Valuable Media Company

Netflix Ready to Surpass Disney as America's Most Valuable Media Company