Previous 15994 Revisions Next

r7833 Friday 16th April, 2010 at 14:33:46 UTC by Firewave
Replaced some unnecessary strlen() calls
[src/mess/devices]messram.c
[src/mess/tools/dat2html]dat2html.c
[src/mess/tools/imgtool]imgtool.c

src/mess/devices/messram.c
r7832r7833
180180            mame_printf_error("%s: '%s' cannot recognize the RAM option %s\n", driver->source_file, driver->name, ramsize_string);
181181            error = TRUE;
182182         }
183         if (gamename_option!=NULL && strlen(gamename_option) > 0 && strcmp(gamename_option, driver->name) == 0)
183         if (gamename_option != NULL && *gamename_option != 0 && strcmp(gamename_option, driver->name) == 0)
184184         {
185185            /* compare command line option to default value */
186186            if (messram_parse_string(config->default_size) == specified_ram)
src/mess/tools/dat2html/dat2html.c
r7832r7833
199199         {
200200            if( html_system )
201201            {
202               if ( strlen(line) == 0 )
202               if ( *line == 0 )
203203               {
204204                  if ( emptycount++ > 1 )
205205                     fprintf(html_system, "<br>\n");
src/mess/tools/imgtool/imgtool.c
r7832r7833
25362536   else
25372537   {
25382538      /* append a path */
2539      if ((strlen(path1) > 0) && (path1[strlen(path1) - 1] != path_separator))
2539      if ((*path1 != 0) && (path1[strlen(path1) - 1] != path_separator))
25402540         snprintf(buffer, buffer_len, "%s%c%s", path1, path_separator, path2);
25412541      else
25422542         snprintf(buffer, buffer_len, "%s%s", path1, path2);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team