From: Diego P. <dg...@us...> - 2008-03-11 22:51:06
|
Update of /cvsroot/xine/xine-ui/src/xitk In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv24343/src/xitk Modified Files: network.c Log Message: When getting sizes using sizeof, mark them as static constant (so they are resolved at build time) and of type size_t. Index: network.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/network.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- network.c 11 Mar 2008 22:43:27 -0000 1.82 +++ network.c 11 Mar 2008 22:51:07 -0000 1.83 @@ -679,7 +679,7 @@ } static void session_create_commands(session_t *session) { - int num_commands = (sizeof(client_commands) / sizeof(client_commands[0])); + static const size_t num_commands = (sizeof(client_commands) / sizeof(client_commands[0])); int i; if(session == NULL) @@ -960,7 +960,7 @@ if((special = strstr(obuffer, COMMANDS_PREFIX)) != NULL) { char *p, *pp; int special_length = strlen(special); - int i = (sizeof(client_commands) / sizeof(client_commands[0])) - 1; + size_t i = (sizeof(client_commands) / sizeof(client_commands[0])) - 1; pp = special + 11; while((p = xine_strsep(&pp, "\t")) != NULL) { |