diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-04-20 09:13:32 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2019-04-20 09:13:32 -0400 |
commit | 507c4adcc817c2d80643ecee2cb55dff305236f9 (patch) | |
tree | 0b4567e44b8a7af86fa75409858f76976bb82d80 /cgi-bin/help-index.c | |
parent | 60d8f88456d1240720cec82ff7375dff439da56e (diff) | |
download | cups-507c4adcc817c2d80643ecee2cb55dff305236f9.tar.gz |
More clang warning fixes.
Diffstat (limited to 'cgi-bin/help-index.c')
-rw-r--r-- | cgi-bin/help-index.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c index a49536d6a..ce97e47a4 100644 --- a/cgi-bin/help-index.c +++ b/cgi-bin/help-index.c @@ -1,10 +1,11 @@ /* * Online help index routines for CUPS. * - * Copyright 2007-2017 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products. + * Copyright © 2007-2019 by Apple Inc. + * Copyright © 1997-2007 by Easy Software Products. * - * Licensed under Apache License v2.0. See the file "LICENSE" for more information. + * Licensed under Apache License v2.0. See the file "LICENSE" for more + * information. */ /* @@ -340,6 +341,8 @@ helpLoadIndex(const char *hifile, /* I - Index filename */ while (isspace(*ptr & 255)) ptr ++; } + else + section[0] = '\0'; if (*ptr != '\"') break; @@ -1188,7 +1191,7 @@ help_new_node(const char *filename, /* I - Filename */ n->filename = strdup(filename); n->anchor = anchor ? strdup(anchor) : NULL; - n->section = *section ? strdup(section) : NULL; + n->section = (section && *section) ? strdup(section) : NULL; n->text = strdup(text); n->mtime = mtime; n->offset = offset; |