Re: [Mondo-devel] swap_mountlist_entries
Brought to you by:
bcornec
|
From: Joshua O. <or...@we...> - 2003-06-10 19:19:41
|
On Tue, Jun 10, 2003 at 09:03:11PM +0200 or thereabouts, Friedrich Lobenstock seemed to write:
> Hello Hugo!
>
> Can you please verify if the following code works fine for you, as I can not
> currently debug this - at least it compiles.
>
> void
> swap_mountlist_entries(struct mountlist_itself *mountlist, int a, int b)
> {
> struct mountlist_line temp;
>
> // a --> temp
> memcpy (&temp, &mountlist->el[a], sizeof(struct
> mountlist_line));
>
> // b --> a
> memcpy (&mountlist->el[a], &mountlist->el[b], sizeof(struct
> mountlist_line));
>
> // temp --> b
> memcpy (&mountlist->el[b], &temp, sizeof(struct
> mountlist_line));
>
> }
Seems fine logically.
Hugo?
-- Josh
>
> --
> MfG / Regards
> Friedrich Lobenstock
> ____________________________________________________________________
> Friedrich Lobenstock Linux Services Lobenstock
> URL: http://www.lsl.at/ Email: fl...@fl...
> ____________________________________________________________________
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Mondo-devel mailing list
> Mon...@li...
> https://lists.sourceforge.net/lists/listinfo/mondo-devel
|