Solar prominences are subject to both field-aligned (longitudinal) and transverse oscillatory motions, as evidenced by an increasing number of observations. Large-amplitude longitudinal motions provide valuable information on the geometry of the filament-channel magnetic structure that supports the cool prominence plasma against gravity. Our pendulum model, in which the restoring force is the gravity projected along the dipped field lines of the magnetic structure, best explains these oscillations. However, several factors can influence the longitudinal oscillations, potentially invalidating the pendulum model. The aim of this work is to study the influence of large-scale variations in the magnetic field strength along the field lines, i.e., variations of the cross-sectional area along the flux tubes supporting prominence threads. We studied the normal modes of several flux tube configurations, using linear perturbation analysis, to assess the influence of different geometrical parameters on the oscillation properties. We found that the influence of the symmetric and asymmetric expansion factors on longitudinal oscillations is small.}{We conclude that the longitudinal oscillations are not significantly influenced by variations of the cross-section of the flux tubes, validating the pendulum model in this context.