alpine 3.6
obsolete weakness #82

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

v4l-utils/src/v4l-utils-1.12.5/utils/dvb/dvb-fe-tool.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

 	 * If called without any option, be verbose, to print the
	 * DVB frontend information.
	 */
	if (!get && !delsys && !set_params && !femon)
		verbose++;

	if (!delsys && !set_params)
		fe_flags = O_RDONLY;

	dvb = dvb_dev_alloc();
	if (!dvb)
		return -1;

	if (server && port) {
		printf(_("Connecting to %s:%d\n"), server, port);
		ret = dvb_dev_remote_init(dvb, server, port);
		if (ret < 0)
			return -1;
	}

	dvb_dev_set_log(dvb, verbose, NULL);
	if (device_mon) {
		dvb_dev_find(dvb, &dev_change_monitor);
		while (1) {
			usleep(1000000);
		}
	}
	dvb_dev_find(dvb, NULL);
	parms = dvb->fe_parms;

	dvb_dev = dvb_dev_seek_by_sysname(dvb, adapter, frontend,
					  DVB_DEVICE_FRONTEND);
	if (!dvb_dev)
		return -1;

	if (!dvb_dev_open(dvb, dvb_dev->sysname, fe_flags))
		return -1;

	if (delsys) {
		printf(_("Changing delivery system to: %s\n"),
			delivery_system_name[delsys]);
		dvb_set_sys(parms, delsys);
		goto ret;
	}

#if 0
	if (set_params)
		do_something();
#endif
	if (get) { 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.