Changeset 4339f09 in mainline for uspace/app/bdsh/cmds


Ignore:
Timestamp:
2013-06-28T07:46:31Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e52b4b5
Parents:
3de67b4c (diff), dba3e2c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mostly C style (obey clang suggestions)

Merge from lp:~vojtech-horky/helenos/misc.

Most changes driven by warnings/errors from clang, such as type
redefinitions (typedef struct …) or possibly uninitizalied
variables. Clang still emits some warnings but a lot less than
before :-). As a result, kernel can be built with clang/-Werror.

Also updated mkext2.py to work with Python 3 again.

Location:
uspace/app/bdsh/cmds/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/help/help.c

    r3de67b4c r4339f09  
    9898        builtin_t *cmd;
    9999        module_t *mod;
    100         unsigned int i;
    101100
    102101        printf("\n  Bdsh built-in commands:\n");
     
    104103
    105104        /* First, show a list of built in commands that are available in this mode */
    106         for (cmd = builtins; cmd->name != NULL; cmd++, i++) {
     105        for (cmd = builtins; cmd->name != NULL; cmd++) {
    107106                        if (is_builtin_alias(cmd->name))
    108107                                printf("   %-16s\tAlias for `%s'\n", cmd->name,
     
    112111        }
    113112
    114         i = 0;
    115 
    116113        /* Now, show a list of module commands that are available in this mode */
    117         for (mod = modules; mod->name != NULL; mod++, i++) {
     114        for (mod = modules; mod->name != NULL; mod++) {
    118115                        if (is_module_alias(mod->name))
    119116                                printf("   %-16s\tAlias for `%s'\n", mod->name,
  • uspace/app/bdsh/cmds/modules/pwd/pwd.c

    r3de67b4c r4339f09  
    5555        }
    5656
    57         memset(buff, 0, sizeof(buff));
     57        memset(buff, 0, PATH_MAX);
    5858        getcwd(buff, PATH_MAX);
    5959
  • uspace/app/bdsh/cmds/modules/rm/rm.c

    r3de67b4c r4339f09  
    9999        if (NULL == (rm->nwd = (char *) malloc(PATH_MAX)))
    100100                return 0;
    101         memset(rm->nwd, 0, sizeof(rm->nwd));
     101        memset(rm->nwd, 0, PATH_MAX);
    102102
    103103        if (NULL == (rm->owd = (char *) malloc(PATH_MAX)))
    104104                return 0;
    105         memset(rm->owd, 0, sizeof(rm->owd));
     105        memset(rm->owd, 0, PATH_MAX);
    106106
    107107        if (NULL == (rm->cwd = (char *) malloc(PATH_MAX)))
    108108                return 0;
    109         memset(rm->cwd, 0, sizeof(rm->cwd));
     109        memset(rm->cwd, 0, PATH_MAX);
    110110
    111111        chdir(".");
     
    298298                        break;
    299299                }
    300                 memset(buff, 0, sizeof(buff));
     300                memset(buff, 0, len);
    301301                snprintf(buff, len, "%s", argv[i]);
    302302
Note: See TracChangeset for help on using the changeset viewer.