diff options
-rw-r--r-- | source3/utils/nmblookup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 546d2f0e15..15188f6768 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -261,14 +261,16 @@ int main(int argc,char *argv[]) } p = strchr(lookup,'#'); - if (p) { - *p = 0; - sscanf(p+1,"%x",&lookup_type); + *p = '\0'; + sscanf(++p,"%x",&lookup_type); } if (!query_one(lookup, lookup_type)) { - printf("name_query failed to find name %s\n", lookup); + printf( "name_query failed to find name %s", lookup ); + if( 0 != lookup_type ) + printf( "#%02x", lookup_type ); + printf( "\n" ); } } |