We analyze how the inhomogeneities along signal and reference atmospheric paths affect the efficiency of correction for phase distortions. Adaptive-optics systems operating with signals reflected from an object or scattered by atmospheric inhomogeneities as with reference ones are considered. The levels of residual distortions at various time lags in an adaptive system are studied. Calculations are performed for different scenarios of an optical experiment: ground paths and high-altitude (aircraft) horizontal paths. To describe altitude variations of the wind speed, the Bufton's model is used.