[macruby-changes] [4047] MacRuby/trunk/ext/etc/etc.c

source_changes at macosforge.org source_changes at macosforge.org
Fri May 7 17:12:02 PDT 2010


Revision: 4047
          http://trac.macosforge.org/projects/ruby/changeset/4047
Author:   lsansonetti at apple.com
Date:     2010-05-07 17:12:01 -0700 (Fri, 07 May 2010)
Log Message:
-----------
fix compiler warnings

Modified Paths:
--------------
    MacRuby/trunk/ext/etc/etc.c

Modified: MacRuby/trunk/ext/etc/etc.c
===================================================================
--- MacRuby/trunk/ext/etc/etc.c	2010-05-08 00:11:49 UTC (rev 4046)
+++ MacRuby/trunk/ext/etc/etc.c	2010-05-08 00:12:01 UTC (rev 4047)
@@ -177,7 +177,7 @@
     struct passwd *pw;
 
     setpwent();
-    while (pw = getpwent()) {
+    while ((pw = getpwent()) != NULL) {
 	rb_yield(setup_passwd(pw));
     }
     endpwent();
@@ -214,7 +214,7 @@
 	passwd_blocking = Qtrue;
 	rb_ensure(passwd_iterate, 0, passwd_ensure, 0);
     }
-    if (pw = getpwent()) {
+    if ((pw = getpwent()) != NULL) {
 	return setup_passwd(pw);
     }
 #endif
@@ -277,7 +277,7 @@
 #ifdef HAVE_GETPWENT
     struct passwd *pw;
 
-    if (pw = getpwent()) {
+    if ((pw = getpwent()) != NULL) {
 	return setup_passwd(pw);
     }
 #endif
@@ -381,7 +381,7 @@
     struct group *pw;
 
     setgrent();
-    while (pw = getgrent()) {
+    while ((pw = getgrent()) != NULL) {
 	rb_yield(setup_group(pw));
     }
     endgrent();
@@ -418,7 +418,7 @@
 	group_blocking = Qtrue;
 	rb_ensure(group_iterate, 0, group_ensure, 0);
     }
-    if (grp = getgrent()) {
+    if ((grp = getgrent()) != NULL) {
 	return setup_group(grp);
     }
 #endif
@@ -475,7 +475,7 @@
 #ifdef HAVE_GETGRENT
     struct group *gr;
 
-    if (gr = getgrent()) {
+    if ((gr = getgrent()) != NULL) {
 	return setup_group(gr);
     }
 #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100507/4fdbb1f5/attachment.html>


More information about the macruby-changes mailing list