You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/29 08:23:06 UTC

svn commit: r769676 - /commons/sandbox/runtime/trunk/src/main/native/os/darwin/puser.c

Author: mturk
Date: Wed Apr 29 06:23:05 2009
New Revision: 769676

URL: http://svn.apache.org/viewvc?rev=769676&view=rev
Log:
Fix typos

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/darwin/puser.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/darwin/puser.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/darwin/puser.c?rev=769676&r1=769675&r2=769676&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/darwin/puser.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/darwin/puser.c Wed Apr 29 06:23:05 2009
@@ -28,7 +28,7 @@
 #include <grp.h>
 
 
-ACR_JNI_EXPORT_DECLARE(jobjectArray, Group, enum0)(ACR_JNISTDARGS)
+ACR_JNI_EXPORT_DECLARE(jobjectArray, User, enum0)(ACR_JNISTDARGS)
 {
     jobjectArray usrs = NULL;
     struct passwd *pw;
@@ -72,7 +72,7 @@
     setpwent();
     for (i = 0; i < n; i++) {
         pw = getpwent();
-        if (gr) {
+        if (pw) {
             unames[i] = ACR_StrdupA(_E, THROW_FMARK, pw->pw_name);
             if (!unames[i]) {
                 usrs = NULL;
@@ -86,7 +86,7 @@
     for (i = 0; i < n; i++) {
         if (unames[i]) {
             jobject uid = ACR_UserObjectCreate(_E, unames[i]);
-            if ((*_E)->ExceptionCheck(_E) || gid == NULL) {
+            if ((*_E)->ExceptionCheck(_E) || uid == NULL) {
                 /* Object creation failed */
                 break;
             }