public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsdump: cleanup _rmt_dev
@ 2008-12-06 10:27 Christoph Hellwig
  2008-12-09 10:16 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2008-12-06 10:27 UTC (permalink / raw)
  To: xfs

Rewrite _rmt_dev to be proper ANSI C and readable.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs-cmds/xfsdump/librmt/rmtdev.c
===================================================================
--- xfs-cmds.orig/xfsdump/librmt/rmtdev.c	2008-11-25 16:39:45.000000000 +0530
+++ xfs-cmds/xfsdump/librmt/rmtdev.c	2008-11-25 16:41:06.000000000 +0530
@@ -28,18 +28,12 @@
  *	is any string that contains ":/dev/".  Returns 1 if remote,
  *	0 otherwise.
  */
-
-int _rmt_dev (path)
-register char *path;
+int _rmt_dev(char *path)
 {
-	if ((path = strchr (path, ':')) != (char *)0)
-	{
-		if (strncmp (path + 1, "/dev/", 5) == 0)
-		{
-			return (1);
-		}
-	}
-	return (0);
-}
-
+	char *c;
 
+	c = strchr(path, ':');
+	if (c && strncmp(c + 1, "/dev/", 5) == 0)
+		return 1;
+	return 0;
+}

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfsdump: cleanup _rmt_dev
  2008-12-06 10:27 [PATCH] xfsdump: cleanup _rmt_dev Christoph Hellwig
@ 2008-12-09 10:16 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2008-12-09 10:16 UTC (permalink / raw)
  To: xfs

On Sat, Dec 06, 2008 at 05:27:09AM -0500, Christoph Hellwig wrote:
> Rewrite _rmt_dev to be proper ANSI C and readable.

Patch withdrawn.  I'll do a bigger one instead to give this treatment
to all of librmt.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-09 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-06 10:27 [PATCH] xfsdump: cleanup _rmt_dev Christoph Hellwig
2008-12-09 10:16 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox