]> arthur.barton.de Git - netatalk.git/blobdiff - bin/nbp/nbprgstr.c
Remove bdb env on exit
[netatalk.git] / bin / nbp / nbprgstr.c
index 7b9bd4b06bbf95df1916b4a62f3372662e0b09e2..bef33a1c01b54cd57513691a85aab848999655ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbprgstr.c,v 1.6 2009-10-13 22:55:36 didg Exp $
+ * $Id: nbprgstr.c,v 1.9 2009-10-29 11:35:58 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #include <atalk/util.h>
 #include <atalk/unicode.h>
 
-void Usage(char *av0)
+static void Usage(char *av0)
 {
     char       *p;
 
-    if (( p = strrchr( av0, '/' )) == 0 ) {
+    if (( p = strrchr( av0, '/' )) == NULL ) {
        p = av0;
     } else {
        p++;
@@ -40,8 +40,8 @@ int main(int ac, char **av)
 {
     struct sockaddr_at addr;
     struct at_addr      ataddr;
-    char               *Obj = 0, *Type = 0, *Zone = 0;
-    char               *convname = 0;
+    char               *Obj = NULL, *Type = NULL, *Zone = NULL;
+    char               *convname = NULL;
     int                        s, c, port = 0;
     charset_t          chMac = CH_MAC;
     
@@ -80,7 +80,7 @@ int main(int ac, char **av)
 
     /* Convert the name */
     if ((size_t)(-1) == convert_string_allocate(CH_UNIX, chMac,
-                        av[optind], strlen(av[optind]), &convname))
+                        av[optind], -1, &convname))
         convname = av[optind];
 
     /*