| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfsdump: cleanup _rmt_dev |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sat, 6 Dec 2008 05:27:09 -0500 |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
Rewrite _rmt_dev to be proper ANSI C and readable.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
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;
+}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] fix up xfs-cmds build after the parallel-fest, Christoph Hellwig |
|---|---|
| Next by Date: | [PATCH] xfsdump: add support for building with sparse, Christoph Hellwig |
| Previous by Thread: | Have the velociraptors in a test system now, checkout the errors., Justin Piszcz |
| Next by Thread: | Re: [PATCH] xfsdump: cleanup _rmt_dev, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |