For a given (d−1)-dimensional simplicial complex Γ, we denote its h-vector by h(Γ)=(h0(Γ),h1(Γ),. . .,hd(Γ)) and set h−1(Γ)=0. The known Swartz equality implies that if Δ is a (d−1)-dimensional Buchsbaum simplicial complex over a field, then for every 0 ≤ i ≤ d, the inequality ihi(Δ)+(d−i+1)hi−1(Δ) ≥ 0 holds true. In this paper, by using these inequalities, we give a simple proof for a result of Terai (N. Terai, On h-vectors of Buchsbaum Stanley–Reisner rings, Hokkaido Math. J. 25(1) (1996), 137–148) on the h-vectors of Buchsbaum simplicial complexes. We then generalize the Swartz equality (E. Swartz, Lower bounds for h-vectors of k-CM, independence, and broken circuit complexes, SIAM J. Discrete Math. 18(3) (2004/05), 647–661), which in turn leads to a generalization of the above-mentioned inequalities for Cohen–Macaulay simplicial complexes in co-dimension t.