Remove and refactor code in rdopt.c

Change-Id: Ie35949c803a39717162d2a304d58f68dbcfc1f45
1 file changed