Commit 630a6b22 authored by ballen4705's avatar ballen4705
Browse files

Might be that token is a null string "", so token[1] undefined.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@355 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 5ecf8efc
......@@ -49,7 +49,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.c,v 1.81 2002/12/01 12:14:16 pjwilliams Exp $"
const char *CVSid6="$Id: smartd.c,v 1.82 2002/12/05 05:24:32 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc.
......@@ -958,7 +958,7 @@ int inttoken(char *arg, char *name, char *token, int lineno, char *configfile, i
// else zero if it has failed to parse a token. Or it exits with a
// directive message if there is a token-parsing problem.
int parsetoken(char *token,cfgfile *cfg){
char sym=token[1];
char sym;
char *name=cfg->name;
int lineno=cfg->lineno;
char *delim=" \n\t";
......@@ -976,7 +976,7 @@ int parsetoken(char *token,cfgfile *cfg){
}
// let's parse the token and swallow its argument
switch (sym) {
switch (sym=token[1]) {
char *arg;
int val;
......
......@@ -49,7 +49,7 @@
// CVS ID strings
extern const char *CVSid1, *CVSid2;
const char *CVSid6="$Id: smartd.cpp,v 1.81 2002/12/01 12:14:16 pjwilliams Exp $"
const char *CVSid6="$Id: smartd.cpp,v 1.82 2002/12/05 05:24:32 ballen4705 Exp $"
CVSID1 CVSID2 CVSID3 CVSID4 CVSID7;
// global variable used for control of printing, passing arguments, etc.
......@@ -958,7 +958,7 @@ int inttoken(char *arg, char *name, char *token, int lineno, char *configfile, i
// else zero if it has failed to parse a token. Or it exits with a
// directive message if there is a token-parsing problem.
int parsetoken(char *token,cfgfile *cfg){
char sym=token[1];
char sym;
char *name=cfg->name;
int lineno=cfg->lineno;
char *delim=" \n\t";
......@@ -976,7 +976,7 @@ int parsetoken(char *token,cfgfile *cfg){
}
// let's parse the token and swallow its argument
switch (sym) {
switch (sym=token[1]) {
char *arg;
int val;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment