aboutsummaryrefslogtreecommitdiffstats
path: root/utils/osmo-arfcn.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/osmo-arfcn.c')
-rw-r--r--utils/osmo-arfcn.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/utils/osmo-arfcn.c b/utils/osmo-arfcn.c
index aee132c7..3d4fb507 100644
--- a/utils/osmo-arfcn.c
+++ b/utils/osmo-arfcn.c
@@ -15,10 +15,6 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
*/
#include <stdio.h>
@@ -97,10 +93,10 @@ int main(int argc, char **argv)
{
int arfcn, freq, pcs = 0, uplink = -1;
int opt;
- char *param;
+ char *param = NULL;
enum program_mode mode = MODE_NONE;
- while ((opt = getopt(argc, argv, "pa:f:ud")) != -1) {
+ while ((opt = getopt(argc, argv, "pa:f:udh")) != -1) {
switch (opt) {
case 'p':
pcs = 1;
@@ -128,6 +124,11 @@ int main(int argc, char **argv)
}
}
+ if (argc > optind) {
+ fprintf(stderr, "Unsupported positional arguments in command line\n");
+ exit(2);
+ }
+
switch (mode) {
case MODE_NONE:
help(argv[0]);