xfsdump: cleanup _rmt_dev
PATCH 1/1 xfsdump: cleanup _rmt_dev
Rewrite _rmt_dev to be proper ANSI C and readable.
Signed-off-by Christoph Hellwig <[email protected]>
xfsdump/librmt/rmtdev.c +7 -13
@@ -28,18 +28,12 @@* is any string that contains ":/dev/". Returns 1 if remote, * 0 otherwise. */ - -int _rmt_dev (path) -registerchar *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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 1 line · Christoph Hellwig
Rewrite
_rmt_devto 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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs