Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3479 → Rev 3480

/trunk/uspace/app/bdsh/util.c
75,7 → 75,7
* the contents of s2 into s1.
* Return -1 on failure, or the length of the copied string on success.
*/
int cli_redup(char **s1, const char *s2)
size_t cli_redup(char **s1, const char *s2)
{
size_t len = strlen(s2) + 1;
 
92,7 → 92,7
memset(*s1, 0, sizeof(*s1));
memcpy(*s1, s2, len);
cli_errno = CL_EOK;
return (int) len;
return len;
}
 
/* An asprintf() for formatting paths, similar to asprintf() but ensures
/trunk/uspace/app/bdsh/util.h
5,7 → 5,7
 
/* Internal string handlers */
extern char * cli_strdup(const char *);
extern int cli_redup(char **, const char *);
extern size_t cli_redup(char **, const char *);
extern int cli_psprintf(char **, const char *, ...);
extern char * cli_strtok_r(char *, const char *, char **);
extern char * cli_strtok(char *, const char *);