]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/fork.c
cnid_t is a unsigned variable, Joe! Thanks to Didier for pointing this out.
[netatalk.git] / etc / afpd / fork.c
index 0a793d631a3b9f49c9878ec77d0df6692f292dfa..291972d0192f8c3cec0d9ded0a79b73e3c3f7c52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: fork.c,v 1.18 2002-01-20 01:34:40 jmarcus Exp $
+ * $Id: fork.c,v 1.20 2002-02-02 19:11:34 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -191,8 +191,8 @@ const u_int16_t     attrbits;
             aint = cnid_add(ofork->of_vol->v_db, &st,
                             ofork->of_dir->d_did,
                             upath, strlen(upath), aint);
-            if (aint > CNID_MAX) {
-                switch (aint) {
+            if (aint == CNID_INVALID) {
+                switch (errno) {
                 case CNID_ERR_PARAM:
                     LOG(log_error, logtype_default, "getforkparams: Incorrect parameters passed to cnid_add");
                     return(AFPERR_PARAM);