Re: [PATCH spice-gtk] Use "#pragma once" instead of preprocessor guards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Oh, just noticed, if this pushed, we may want to change the spice
style doc as well

Snir.

On 8/11/19 12:01 PM, Snir Sheriber wrote:
Hi,

It could be an issue with duplicated name headers but
seems we do not have such headers.

Ack

On 7/29/19 5:23 PM, Frediano Ziglio wrote:
Guards currently are quite different in format.
Unify updating to "#pragma once" syntax. This syntax is used
by GTK tools too.
To avoid possible regression public headers are left untouched.

I guess it's better to go safe ;)

Snir.


Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
  src/bio-gio.h                       | 5 +----
  src/channel-display-priv.h          | 5 +----
  src/channel-playback-priv.h         | 4 +---
  src/channel-usbredir-priv.h         | 5 +----
  src/client_sw_canvas.h              | 5 +----
  src/continuation.h                  | 4 +---
  src/coroutine.h                     | 4 +---
  src/decode.h                        | 5 +----
  src/desktop-integration.h           | 5 +----
  src/gio-coroutine.h                 | 5 +----
  src/giopipe.h                       | 5 +----
  src/smartcard-manager-priv.h        | 5 +----
  src/spice-audio-priv.h              | 5 +----
  src/spice-channel-cache.h           | 5 +----
  src/spice-channel-priv.h            | 5 +----
  src/spice-common.h                  | 5 +----
  src/spice-file-transfer-task-priv.h | 5 +----
  src/spice-grabsequence-priv.h       | 5 +----
  src/spice-gstaudio.h                | 5 +----
  src/spice-gtk-session-priv.h        | 5 +----
  src/spice-pulse.h                   | 5 +----
  src/spice-session-priv.h            | 5 +----
  src/spice-uri-priv.h                | 5 +----
  src/spice-util-priv.h               | 5 +----
  src/spice-widget-priv.h             | 5 +----
  src/usb-acl-helper.h                | 5 +----
  src/usb-backend.h                   | 5 +----
  src/usb-device-manager-priv.h       | 5 +----
  src/usbdk_api.h                     | 4 +---
  src/usbutil.h                       | 4 +---
  src/vmcstream.h                     | 5 +----
  src/vncdisplaykeymap.h              | 5 +----
  32 files changed, 32 insertions(+), 123 deletions(-)

diff --git a/src/bio-gio.h b/src/bio-gio.h
index 31fd3693..7f41ce10 100644
--- a/src/bio-gio.h
+++ b/src/bio-gio.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef BIO_GIO_H_
-# define BIO_GIO_H_
+#pragma once
    #include <openssl/bio.h>
  #include <gio/gio.h>
@@ -26,5 +25,3 @@ G_BEGIN_DECLS
  BIO* bio_new_giostream(GIOStream *stream);
    G_END_DECLS
-
-#endif /* !BIO_GIO_H_ */
diff --git a/src/channel-display-priv.h b/src/channel-display-priv.h
index 16c12c6e..b5d67285 100644
--- a/src/channel-display-priv.h
+++ b/src/channel-display-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef CHANNEL_DISPLAY_PRIV_H_
-# define CHANNEL_DISPLAY_PRIV_H_
+#pragma once
    #include <pixman.h>
  #ifdef WIN32
@@ -203,5 +202,3 @@ gboolean hand_pipeline_to_widget(display_stream *st,  GstPipeline *pipeline);
  void spice_frame_free(SpiceFrame *frame);
    G_END_DECLS
-
-#endif // CHANNEL_DISPLAY_PRIV_H_
diff --git a/src/channel-playback-priv.h b/src/channel-playback-priv.h
index aa33d2c4..19ccc150 100644
--- a/src/channel-playback-priv.h
+++ b/src/channel-playback-priv.h
@@ -15,10 +15,8 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_PLAYBACK_CHANNEL_PRIV_H__
-#define __SPICE_CLIENT_PLAYBACK_CHANNEL_PRIV_H__
+#pragma once
    gboolean spice_playback_channel_is_active(SpicePlaybackChannel *channel);   guint32 spice_playback_channel_get_latency(SpicePlaybackChannel *channel);   void spice_playback_channel_sync_latency(SpicePlaybackChannel *channel);
-#endif
diff --git a/src/channel-usbredir-priv.h b/src/channel-usbredir-priv.h
index 80cd31f6..a36f5d9b 100644
--- a/src/channel-usbredir-priv.h
+++ b/src/channel-usbredir-priv.h
@@ -18,8 +18,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_USBREDIR_CHANNEL_PRIV_H__
-#define __SPICE_CLIENT_USBREDIR_CHANNEL_PRIV_H__
+#pragma once
    #ifdef USE_USBREDIR
  @@ -76,5 +75,3 @@ int spice_usbredir_write_callback(SpiceUsbredirChannel *channel, uint8_t *data,
  G_END_DECLS
    #endif /* USE_USBREDIR */
-
-#endif /* __SPICE_CLIENT_USBREDIR_CHANNEL_PRIV_H__ */
diff --git a/src/client_sw_canvas.h b/src/client_sw_canvas.h
index 1180c5b6..ac30240f 100644
--- a/src/client_sw_canvas.h
+++ b/src/client_sw_canvas.h
@@ -15,11 +15,8 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_SW_CANVAS_H__
-#define __SPICE_CLIENT_SW_CANVAS_H__
+#pragma once
    #define SW_CANVAS_CACHE
    #include <common/sw_canvas.h>
-
-#endif /* __SPICE_CLIENT_SW_CANVAS_H__ */
diff --git a/src/continuation.h b/src/continuation.h
index d1fd1377..bbde3863 100644
--- a/src/continuation.h
+++ b/src/continuation.h
@@ -18,8 +18,7 @@
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
   */
  -#ifndef _CONTINUATION_H_
-#define _CONTINUATION_H_
+#pragma once
    #include "spice-common.h"
  #include <stddef.h>
@@ -53,7 +52,6 @@ int cc_swap(struct continuation *from, struct continuation *to);           SPICE_ALIGNED_CAST(type *,                                      \
                             (((char *)obj) - offset_of(type, member)))
  -#endif
  /*
   * Local variables:
   *  c-indent-level: 8
diff --git a/src/coroutine.h b/src/coroutine.h
index 78dc4670..9eb8e0cb 100644
--- a/src/coroutine.h
+++ b/src/coroutine.h
@@ -18,8 +18,7 @@
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
   */
  -#ifndef _COROUTINE_H_
-#define _COROUTINE_H_
+#pragma once
    #include "config.h"
  @@ -73,7 +72,6 @@ static inline gboolean coroutine_self_is_main(void) {       return coroutine_self() == NULL || coroutine_is_main(coroutine_self());
  }
  -#endif
  /*
   * Local variables:
   *  c-indent-level: 8
diff --git a/src/decode.h b/src/decode.h
index b274d673..dc31738c 100644
--- a/src/decode.h
+++ b/src/decode.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef SPICEGTK_DECODE_H_
-# define SPICEGTK_DECODE_H_
+#pragma once
    #include <glib.h>
  @@ -40,5 +39,3 @@ SpiceJpegDecoder *jpeg_decoder_new(void);
  void jpeg_decoder_destroy(SpiceJpegDecoder *d);
    G_END_DECLS
-
-#endif // SPICEGTK_DECODE_H_
diff --git a/src/desktop-integration.h b/src/desktop-integration.h
index 3716089e..2dd9156c 100644
--- a/src/desktop-integration.h
+++ b/src/desktop-integration.h
@@ -18,8 +18,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_DESKTOP_INTEGRATION_H__
-#define __SPICE_DESKTOP_INTEGRATION_H__
+#pragma once
    #include "spice-client.h"
  @@ -60,5 +59,3 @@ void spice_desktop_integration_inhibit_automount(SpiceDesktopIntegration *self);   void spice_desktop_integration_uninhibit_automount(SpiceDesktopIntegration *self);
    G_END_DECLS
-
-#endif /* __SPICE_DESKTOP_INTEGRATION_H__ */
diff --git a/src/gio-coroutine.h b/src/gio-coroutine.h
index b3a6d78e..6b20a081 100644
--- a/src/gio-coroutine.h
+++ b/src/gio-coroutine.h
@@ -18,8 +18,7 @@
     License along with this library; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
-#ifndef __GIO_COROUTINE_H__
-#define __GIO_COROUTINE_H__
+#pragma once
    #include <gio/gio.h>
  #include "coroutine.h"
@@ -62,5 +61,3 @@ void         g_coroutine_signal_emit (gpointer instance, guint signal_id,   void         g_coroutine_object_notify(GObject *object, const gchar *property_name);
    G_END_DECLS
-
-#endif /* __GIO_COROUTINE_H__ */
diff --git a/src/giopipe.h b/src/giopipe.h
index 46c2c9c8..2056841c 100644
--- a/src/giopipe.h
+++ b/src/giopipe.h
@@ -15,8 +15,7 @@
    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_GIO_PIPE_H__
-#define __SPICE_GIO_PIPE_H__
+#pragma once
    #include <gio/gio.h>
  @@ -25,5 +24,3 @@ G_BEGIN_DECLS
  void spice_make_pipe(GIOStream **p1, GIOStream **p2);
    G_END_DECLS
-
-#endif /* __SPICE_GIO_PIPE_H__ */
diff --git a/src/smartcard-manager-priv.h b/src/smartcard-manager-priv.h
index 409c1c54..8dc39e4e 100644
--- a/src/smartcard-manager-priv.h
+++ b/src/smartcard-manager-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SMARTCARD_MANAGER_PRIV_H__
-#define __SMARTCARD_MANAGER_PRIV_H__
+#pragma once
    #include "config.h"
  #include <gio/gio.h>
@@ -33,5 +32,3 @@ gboolean spice_smartcard_manager_init_finish(SpiceSession *session,
                                               GError **err);
    G_END_DECLS
-
-#endif /* __SMARTCARD_MANAGER_PRIV_H__ */
diff --git a/src/spice-audio-priv.h b/src/spice-audio-priv.h
index 04123f55..f96e7210 100644
--- a/src/spice-audio-priv.h
+++ b/src/spice-audio-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_AUDIO_PRIVATE_H__
-#define __SPICE_AUDIO_PRIVATE_H__
+#pragma once
    #include <glib.h>
  #include <gio/gio.h>
@@ -41,5 +40,3 @@ void spice_audio_get_record_volume_info_async(SpiceAudio *audio, GCancellable *c   gboolean spice_audio_get_record_volume_info_finish(SpiceAudio *audio, GAsyncResult *res,           gboolean *mute, guint8 *nchannels, guint16 **volume, GError **error);
  G_END_DECLS
-
-#endif /* __SPICE_AUDIO_PRIVATE_H__ */
diff --git a/src/spice-channel-cache.h b/src/spice-channel-cache.h
index 365fae60..24cd7ca7 100644
--- a/src/spice-channel-cache.h
+++ b/src/spice-channel-cache.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef SPICE_CHANNEL_CACHE_H_
-# define SPICE_CHANNEL_CACHE_H_
+#pragma once
    #include "common/mem.h"
  @@ -150,5 +149,3 @@ static inline void cache_free(display_cache *cache)
  }
    G_END_DECLS
-
-#endif // SPICE_CHANNEL_CACHE_H_
diff --git a/src/spice-channel-priv.h b/src/spice-channel-priv.h
index 5984ca56..80ea7140 100644
--- a/src/spice-channel-priv.h
+++ b/src/spice-channel-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_CHANNEL_PRIV_H__
-#define __SPICE_CLIENT_CHANNEL_PRIV_H__
+#pragma once
    #include "config.h"
  @@ -210,5 +209,3 @@ gint spice_channel_unix_read_fd(SpiceChannel *channel);
  #endif
    G_END_DECLS
-
-#endif /* __SPICE_CLIENT_CHANNEL_PRIV_H__ */
diff --git a/src/spice-common.h b/src/spice-common.h
index 8554f4c8..1af1f5dc 100644
--- a/src/spice-common.h
+++ b/src/spice-common.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef SPICE_COMMON_H_
-# define SPICE_COMMON_H_
+#pragma once
    /* system */
  #include <stdio.h>
@@ -32,5 +31,3 @@
  #include "common/marshaller.h"
    #include "spice-util.h"
-
-#endif // SPICE_COMMON_H_
diff --git a/src/spice-file-transfer-task-priv.h b/src/spice-file-transfer-task-priv.h
index 253b3c5e..06bc3ab4 100644
--- a/src/spice-file-transfer-task-priv.h
+++ b/src/spice-file-transfer-task-priv.h
@@ -15,8 +15,7 @@
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
  -#ifndef __SPICE_FILE_TRANSFER_TASK_PRIV_H__
-#define __SPICE_FILE_TRANSFER_TASK_PRIV_H__
+#pragma once
    #include "config.h"
  @@ -53,5 +52,3 @@ gssize spice_file_transfer_task_read_finish(SpiceFileTransferTask *self,   gboolean spice_file_transfer_task_is_completed(SpiceFileTransferTask *self);
    G_END_DECLS
-
-#endif /* __SPICE_FILE_TRANSFER_TASK_PRIV_H__ */
diff --git a/src/spice-grabsequence-priv.h b/src/spice-grabsequence-priv.h
index 97f05b20..4b498149 100644
--- a/src/spice-grabsequence-priv.h
+++ b/src/spice-grabsequence-priv.h
@@ -15,8 +15,7 @@
    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_GRABSEQUENCE_PRIV_H__
-#define __SPICE_GRABSEQUENCE_PRIV_H__
+#pragma once
    #include <glib.h>
  @@ -25,5 +24,3 @@ struct _SpiceGrabSequence {
      guint nkeysyms;
      guint *keysyms;
  };
-
-#endif
diff --git a/src/spice-gstaudio.h b/src/spice-gstaudio.h
index b605f1cf..21b14909 100644
--- a/src/spice-gstaudio.h
+++ b/src/spice-gstaudio.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_GSTAUDIO_H__
-#define __SPICE_CLIENT_GSTAUDIO_H__
+#pragma once
    #include "spice-client.h"
  #include "spice-audio.h"
@@ -52,5 +51,3 @@ SpiceGstaudio *spice_gstaudio_new(SpiceSession *session,                                     GMainContext *context, const char *name);
    G_END_DECLS
-
-#endif /* __SPICE_CLIENT_GSTAUDIO_H__ */
diff --git a/src/spice-gtk-session-priv.h b/src/spice-gtk-session-priv.h
index 0dbc9e96..cfbe4ac6 100644
--- a/src/spice-gtk-session-priv.h
+++ b/src/spice-gtk-session-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_GTK_SESSION_PRIV_H__
-#define __SPICE_CLIENT_GTK_SESSION_PRIV_H__
+#pragma once
    #include "spice-gtk-session.h"
  @@ -46,5 +45,3 @@ gboolean spice_gtk_session_get_keyboard_has_focus(SpiceGtkSession *self);   gboolean spice_gtk_session_get_mouse_has_pointer(SpiceGtkSession *self);
    G_END_DECLS
-
-#endif /* __SPICE_CLIENT_GTK_SESSION_PRIV_H__ */
diff --git a/src/spice-pulse.h b/src/spice-pulse.h
index 819647e2..dcfa3243 100644
--- a/src/spice-pulse.h
+++ b/src/spice-pulse.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_PULSE_H__
-#define __SPICE_CLIENT_PULSE_H__
+#pragma once
    #include "spice-client.h"
  #include "spice-audio.h"
@@ -53,5 +52,3 @@ SpicePulse *spice_pulse_new(SpiceSession *session,
                              const char *name);
    G_END_DECLS
-
-#endif /* __SPICE_CLIENT_PULSE_H__ */
diff --git a/src/spice-session-priv.h b/src/spice-session-priv.h
index 6ece7e01..62cebc53 100644
--- a/src/spice-session-priv.h
+++ b/src/spice-session-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_CLIENT_SESSION_PRIV_H__
-#define __SPICE_CLIENT_SESSION_PRIV_H__
+#pragma once
    #include "config.h"
  @@ -99,5 +98,3 @@ gboolean spice_session_set_migration_session(SpiceSession *session, SpiceSession   SpiceAudio *spice_audio_get(SpiceSession *session, GMainContext *context);
  const gchar* spice_audio_data_mode_to_string(gint mode);
  G_END_DECLS
-
-#endif /* __SPICE_CLIENT_SESSION_PRIV_H__ */
diff --git a/src/spice-uri-priv.h b/src/spice-uri-priv.h
index 54351dec..1a8341b1 100644
--- a/src/spice-uri-priv.h
+++ b/src/spice-uri-priv.h
@@ -15,8 +15,7 @@
    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_URI_PRIV_H__
-#define __SPICE_URI_PRIV_H__
+#pragma once
    #include "spice-uri.h"
  @@ -26,5 +25,3 @@ SpiceURI* spice_uri_new(void);
  gboolean spice_uri_parse(SpiceURI* self, const gchar* uri, GError** error);
    G_END_DECLS
-
-#endif /* __SPICE_URI_PRIV_H__ */
diff --git a/src/spice-util-priv.h b/src/spice-util-priv.h
index 38b0deb6..9c43a3de 100644
--- a/src/spice-util-priv.h
+++ b/src/spice-util-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef SPICE_UTIL_PRIV_H
-#define SPICE_UTIL_PRIV_H
+#pragma once
    #include <glib.h>
  #include "spice-util.h"
@@ -34,5 +33,3 @@ void spice_mono_edge_highlight(unsigned width, unsigned hight,                                  const guint8 *and, const guint8 *xor, guint8 *dest);
    G_END_DECLS
-
-#endif /* SPICE_UTIL_PRIV_H */
diff --git a/src/spice-widget-priv.h b/src/spice-widget-priv.h
index 65eb4047..436c802c 100644
--- a/src/spice-widget-priv.h
+++ b/src/spice-widget-priv.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_WIDGET_PRIV_H__
-#define __SPICE_WIDGET_PRIV_H__
+#pragma once
    #include "config.h"
  @@ -177,5 +176,3 @@ void spice_display_widget_gl_scanout     (SpiceDisplay *display);   void     spice_display_widget_update_monitor_area(SpiceDisplay *display);
    G_END_DECLS
-
-#endif
diff --git a/src/usb-acl-helper.h b/src/usb-acl-helper.h
index e2e27db4..25f2f5f0 100644
--- a/src/usb-acl-helper.h
+++ b/src/usb-acl-helper.h
@@ -18,8 +18,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_USB_ACL_HELPER_H__
-#define __SPICE_USB_ACL_HELPER_H__
+#pragma once
    #include "spice-client.h"
  #include <gio/gio.h>
@@ -68,5 +67,3 @@ gboolean spice_usb_acl_helper_open_acl_finish(
  void spice_usb_acl_helper_cancel(SpiceUsbAclHelper *self);
    G_END_DECLS
-
-#endif /* __SPICE_USB_ACL_HELPER_H__ */
diff --git a/src/usb-backend.h b/src/usb-backend.h
index 69a490b5..66e13f54 100644
--- a/src/usb-backend.h
+++ b/src/usb-backend.h
@@ -19,8 +19,7 @@
      License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
  -#ifndef __SPICE_USB_BACKEND_H__
-#define __SPICE_USB_BACKEND_H__
+#pragma once
    #include <usbredirfilter.h>
  #include "usb-device-manager.h"
@@ -90,5 +89,3 @@ void spice_usb_backend_channel_get_guest_filter(SpiceUsbBackendChannel *ch,   void spice_usb_backend_return_write_data(SpiceUsbBackendChannel *ch, void *data);
    G_END_DECLS
-
-#endif
diff --git a/src/usb-device-manager-priv.h b/src/usb-device-manager-priv.h
index 66acf6d5..e2a54ed1 100644
--- a/src/usb-device-manager-priv.h
+++ b/src/usb-device-manager-priv.h
@@ -18,8 +18,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_USB_DEVICE_MANAGER_PRIV_H__
-#define __SPICE_USB_DEVICE_MANAGER_PRIV_H__
+#pragma once
    #include "usb-device-manager.h"
  @@ -38,5 +37,3 @@ gboolean spice_usb_device_is_isochronous(const SpiceUsbDevice *device);
  #endif
    G_END_DECLS
-
-#endif /* __SPICE_USB_DEVICE_MANAGER_PRIV_H__ */
diff --git a/src/usbdk_api.h b/src/usbdk_api.h
index 8e5406c8..8978d75c 100644
--- a/src/usbdk_api.h
+++ b/src/usbdk_api.h
@@ -19,8 +19,7 @@
      Dmitry Fleytman <dmitry@xxxxxxxxxx>
      Kirill Moizik <kirill@xxxxxxxxxx>
  */
-#ifndef USBDK_HEADER
-#define USBDK_HEADER
+#pragma once
    typedef struct tag_usbdk_api_wrapper usbdk_api_wrapper;
  @@ -31,4 +30,3 @@ HANDLE usbdk_create_hider_handle(usbdk_api_wrapper *usbdk_api);   void     usbdk_api_set_hide_rules(usbdk_api_wrapper *usbdk_api, HANDLE hider_handle, gchar *redirect_on_connect);   BOOL     usbdk_clear_hide_rules(usbdk_api_wrapper *usbdk_api, HANDLE hider_handle);   void     usbdk_close_hider_handle(usbdk_api_wrapper *usbdk_api, HANDLE hider_handle);
-#endif
diff --git a/src/usbutil.h b/src/usbutil.h
index 50e39493..6c570d94 100644
--- a/src/usbutil.h
+++ b/src/usbutil.h
@@ -18,8 +18,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_USBUTIL_H__
-#define __SPICE_USBUTIL_H__
+#pragma once
    #include <glib.h>
  @@ -35,4 +34,3 @@ void spice_usb_util_get_device_strings(int bus, int address,
  G_END_DECLS
    #endif /* USE_USBREDIR */
-#endif /* __SPICE_USBUTIL_H__ */
diff --git a/src/vmcstream.h b/src/vmcstream.h
index 1316b77d..4851cf52 100644
--- a/src/vmcstream.h
+++ b/src/vmcstream.h
@@ -15,8 +15,7 @@
     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef __SPICE_VMC_STREAM_H__
-#define __SPICE_VMC_STREAM_H__
+#pragma once
    #include <gio/gio.h>
  @@ -77,5 +76,3 @@ GType spice_vmc_stream_get_type        (void) G_GNUC_CONST;   SpiceVmcStream* spice_vmc_stream_new             (SpiceChannel *channel);
    G_END_DECLS
-
-#endif /* __SPICE_VMC_STREAM_H__ */
diff --git a/src/vncdisplaykeymap.h b/src/vncdisplaykeymap.h
index 3ec55d58..2d3dc527 100644
--- a/src/vncdisplaykeymap.h
+++ b/src/vncdisplaykeymap.h
@@ -19,8 +19,7 @@
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
   */
  -#ifndef VNC_DISPLAY_KEYMAP_H
-#define VNC_DISPLAY_KEYMAP_H
+#pragma once
    #include <glib.h>
  @@ -32,5 +31,3 @@ guint16 vnc_display_keymap_gdk2xtkbd(const guint16 *keycode_map,
  void vnc_display_keyval_set_entries(void);
  void vnc_display_keyval_free_entries(void);
  guint vnc_display_keyval_from_keycode(guint keycode, guint keyval);
-
-#endif /* VNC_DISPLAY_KEYMAP_H */
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]