Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3814 → Rev 3815

/trunk/uspace/app/bdsh/cmds/modules/cp/cp.c
34,7 → 34,6
#include <getopt.h>
#include <string.h>
#include <fcntl.h>
#include <assert.h>
#include "config.h"
#include "util.h"
#include "errors.h"
124,12 → 123,19
goto err;
res -= bytes;
} while (res > 0);
assert(res == 0);
 
/* TODO: re-insert assert() once this is stand alone,
* removed as abort() exits the entire shell
*/
if (res != 0) {
printf("\n%d more bytes than actually exist were copied\n", res);
goto err;
}
}
 
if (bytes < 0) {
err:
printf("Error copying %s, (%d)\n", src, bytes);
printf("\nError copying %s, (%d)\n", src, bytes);
copied = bytes;
}
 
/trunk/uspace/app/bdsh/cmds/modules/rm/rm.c
33,7 → 33,6
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <assert.h>
#include <getopt.h>
 
#include "config.h"
219,7 → 218,11
while (NULL != argv[i]) {
len = strlen(argv[i]) + 2;
buff = (char *) realloc(buff, len);
assert(buff != NULL);
if (buff == NULL) {
printf("rm: out of memory\n");
ret = 1;
break;
}
memset(buff, 0, sizeof(buff));
snprintf(buff, len, argv[i]);