CHARLOTTE, N.C. (AP) — Snack food maker Snyder's-Lance Inc. returned to profitability in its second quarter as it faced lower expenses related to the merger of its two businesses.

Lance Inc. and Snyder's of Hanover Inc. combined in 2010 in an all-stock deal. The new company took on the name Snyder's-Lance. Lance is known for its sandwich crackers, Cape Cod potato chips and Archway cookies, and Snyder's for its pretzels, Krunchers and Grande tortilla chips.

The Charlotte, N.C., company earned $19.3 million, or 28 cents per share, in the quarter that ended June 30. That compares with a loss of $3.8 million, or 6 cents per share, a year earlier.

Merger-related expenses totaled $500,000 in the current quarter. These expenses were $14.9 million a year ago.

Taking out those expenses and other one-time items, earnings rose to 22 cents per share from 16 cents per share.

The results beat the 21 cents per share that analysts surveyed by FactSet predicted.

Revenue fell 3 percent to $399.4 million from $412.5 million. Excluding the impact of converting routes to a new system, revenue climbed 1.3 percent, helped by strong sales of core products like Snyder's of Hanover pretzels, Lance sandwich crackers and Cape Cod kettle chips.

The revenue total fell short of Wall Street's forecast of $407 million.

The company declared a quarterly dividend of 16 cents per share on Tuesday. The dividend will be paid Aug. 31 to shareholders of record Aug. 22.

Snyder's-Lance maintained its guidance for full-year earnings to climb 30 percent to 45 percent, which implies earnings between 91 cents per share and $1.02 per share. Revenue is still expected to be flat to down 2 percent from 2011's $1.64 billion, which implies about $1.61 billion to $1.64 billion.

Analysts foresee earnings of 95 cents per share on revenue of $1.62 billion.