profile write code should only quote empty strings
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 19 Aug 2008 21:04:56 +0000 (21:04 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 19 Aug 2008 21:04:56 +0000 (21:04 +0000)
Assigned to Ken for review.

ticket: new
owner: raeburn

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20674 dc483132-0cff-0310-8789-dd5450dbe970

src/util/profile/prof_parse.c

index 665b9d90c3c2660fdd7b30669ffb4f8b7f8ee432..701d5e4a9a9bbc5f1b0cad8bb1acec1ccd8ffab5 100644 (file)
@@ -310,7 +310,7 @@ static int need_double_quotes(char *str)
 {
        if (!str)
                 return 0;
-        if (*str)
+       if (str[0] == '\0')
                return 1;
        if (isspace((int) (*str)) ||isspace((int) (*(str + strlen(str) - 1))))
                return 1;