Changeset 46288ee in mainline
- Timestamp:
- 2019-06-26T17:51:50Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b781cc49
- Parents:
- e62f8e3
- Location:
- uspace/app/bdsh/cmds/modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/alias/alias.c
re62f8e3 r46288ee 72 72 /* update existing value */ 73 73 alias_t *data = odict_get_instance(alias_link, alias_t, odict); 74 free(data->value); 75 data->value = str_dup(value); 74 char *dup_value = str_dup(value); 76 75 77 if (d ata->value == NULL) {76 if (dup_value == NULL) { 78 77 cli_error(CL_ENOMEM, "%s: failing to allocate memory for value\n", cmdname); 79 78 return ENOMEM; 80 79 } 80 81 free(data->value); 82 data->value = dup_value; 81 83 } else { 82 84 /* add new value */ -
uspace/app/bdsh/cmds/modules/unalias/unalias.c
re62f8e3 r46288ee 92 92 } 93 93 94 int rc = CMD_SUCCESS; 94 95 size_t i; 95 96 for (i = 1; argv[i] != NULL; i++) { … … 98 99 if (alias_link == NULL) { 99 100 cli_error(CL_ENOENT, "%s: No alias '%s' found\n", cmdname, argv[i]); 101 rc = CMD_FAILURE; 100 102 } else { 101 103 free_alias(alias_link); … … 103 105 } 104 106 105 return CMD_SUCCESS;107 return rc; 106 108 }
Note:
See TracChangeset
for help on using the changeset viewer.