Prevent sign extension when dumping bytes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1247 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-11-15 21:06:41 +00:00
parent 67d446be4e
commit 1889e9e787
2 changed files with 3 additions and 3 deletions

View File

@ -325,7 +325,7 @@ extern void nsh_freefullpath(char *relpath);
/* Debug */
extern void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
const char *buffer, ssize_t nbytes);
const ubyte *buffer, ssize_t nbytes);
/* Shell command handlers */

View File

@ -312,7 +312,7 @@ int cmd_mem(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
****************************************************************************/
void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
const char *buffer, ssize_t nbytes)
const ubyte *buffer, ssize_t nbytes)
{
char line[128];
int ch;
@ -371,7 +371,7 @@ int cmd_xd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
return ERROR;
}
nsh_dumpbuffer(vtbl, "Hex dump", addr, nbytes);
nsh_dumpbuffer(vtbl, "Hex dump", (ubyte*)addr, nbytes);
return OK;
}
#endif