[git commit] libbb: fix thinko in rtc_xopen()

Denys Vlasenko vda.linux at googlemail.com
Fri May 2 07:07:16 UTC 2014


commit: http://git.busybox.net/busybox/commit/?id=d8290c2ef039c389b2f39704543277865f3693fb
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/rtc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libbb/rtc.c b/libbb/rtc.c
index f84da09..6d06d57 100644
--- a/libbb/rtc.c
+++ b/libbb/rtc.c
@@ -76,11 +76,11 @@ int FAST_FUNC rtc_xopen(const char **default_rtc, int flags)
 		rtc = open_loop_on_busy(*default_rtc, flags);
 		if (rtc >= 0)
 			return rtc;
-		name += strlen(name) + 1;
 		if (!name[0])
 			return xopen(*default_rtc, flags);
  try_name:
 		*default_rtc = name;
+		name += strlen(name) + 1;
 	}
 }
 


More information about the busybox-cvs mailing list