Erm. I'm sleepy. Handle the null-field case the way I actually meant
to the first time.
This commit is contained in:
parent
b434db2353
commit
61b18ede9e
@ -24,7 +24,7 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* library functions for userconfig library
|
||||
*
|
||||
* $Id: uc_main.c,v 1.7 1996/10/05 10:43:49 jkh Exp $
|
||||
* $Id: uc_main.c,v 1.8 1996/10/05 11:56:50 jkh Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -114,17 +114,10 @@ uc_open(char *name){
|
||||
nl[i].n_name = strdup(name);
|
||||
if (fscanf(fp, "%d %d %d %ld\n",
|
||||
&(nl[i].n_type), &(nl[i].n_other), &(nl[i].n_desc), &(nl[i].n_value)) != 4) {
|
||||
if (name[0]) {
|
||||
msgDebug("Unable to read symbol detail fields from symbol file, entry = %d\n", i);
|
||||
free(kern);
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
nl[i].n_type = 0;
|
||||
nl[i].n_other = 0;
|
||||
nl[i].n_desc = 0;
|
||||
nl[i].n_value = 0;
|
||||
}
|
||||
nl[i].n_type = 0;
|
||||
nl[i].n_other = 0;
|
||||
nl[i].n_desc = 0;
|
||||
nl[i].n_value = 0;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user