Hello!
This is a side effect of my unsuccessfull attempt to fix the completion.
Variable `char* retval' in set_device() was used most time as a flag and
returned only right after assigning a value.
IMHO, it is a bad practice to use char* for flags.
I've retained the comment about non-clean use of retval, because it may
apply to deeper matters.
Feel free to rename `retval'. I'm not a master of renamings.
ChangeLog:
* stage2/disk_io.c (set_device): variable `retval' made integer
and not used for return anymore.
Pavel Roskin
--- stage2/disk_io.c Fri Sep 24 01:33:36 1999
+++ stage2/disk_io.c Sat Sep 25 17:39:21 1999
@@ -651,7 +651,7 @@
set_device (char *device)
{
/* The use of retval in this function is not really clean, but it works */
- char *retval = 0;
+ int retval = 0;
incomplete = 0;
disk_choice = 1;
@@ -837,7 +837,7 @@
return 0;
if (retval)
- retval = device + 1;
+ return device + 1;
else
{
if (!*device)
@@ -845,7 +845,7 @@
errnum = ERR_DEV_FORMAT;
}
- return retval;
+ return 0;
}
/*