mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Whitespace cleanups.
2008-01-21 Matthias Clasen <mclasen@redhat.com> * glocal*.c: * gvolumemanager.c: Whitespace cleanups. * glocalfileoutputsteam.c (_g_local_file_output_stream_create): Use the right mode when creating the file. svn path=/trunk/; revision=6341
This commit is contained in:
committed by
Matthias Clasen
parent
5fbfef4cb7
commit
54300dde6d
@@ -1,3 +1,11 @@
|
||||
2008-01-21 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* glocal*.c:
|
||||
* gvolumemanager.c: Whitespace cleanups.
|
||||
|
||||
* glocalfileoutputsteam.c (_g_local_file_output_stream_create):
|
||||
Use the right mode when creating the file.
|
||||
|
||||
2008-01-21 Murray Cumming,,, <murrayc@murrayc.com>
|
||||
|
||||
* gfileenumerator.c:
|
||||
|
@@ -38,7 +38,8 @@ enum
|
||||
};
|
||||
|
||||
static gboolean g_local_directory_monitor_cancel (GFileMonitor *monitor);
|
||||
static void mounts_changed (GUnixMountMonitor *mount_monitor, gpointer user_data);
|
||||
static void mounts_changed (GUnixMountMonitor *mount_monitor,
|
||||
gpointer user_data);
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (GLocalDirectoryMonitor, g_local_directory_monitor, G_TYPE_FILE_MONITOR)
|
||||
|
||||
@@ -269,7 +270,7 @@ get_default_local_directory_monitor (gpointer data)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_local_directory_monitor_new:
|
||||
* _g_local_directory_monitor_new:
|
||||
* @dirname: filename of the directory to monitor.
|
||||
* @flags: #GFileMonitorFlags.
|
||||
*
|
||||
|
@@ -256,8 +256,7 @@ g_local_file_input_stream_can_seek (GFileInputStream *stream)
|
||||
|
||||
pos = lseek (file->priv->fd, 0, SEEK_CUR);
|
||||
|
||||
if (pos == (off_t)-1 &&
|
||||
errno == ESPIPE)
|
||||
if (pos == (off_t)-1 && errno == ESPIPE)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
@@ -110,8 +110,7 @@ g_local_file_monitor_finalize (GObject *object)
|
||||
(*G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize) (object);
|
||||
}
|
||||
|
||||
static void
|
||||
g_local_file_monitor_class_init (GLocalFileMonitorClass* klass)
|
||||
static void g_local_file_monitor_class_init (GLocalFileMonitorClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
|
@@ -306,8 +306,7 @@ g_local_file_output_stream_can_seek (GFileOutputStream *stream)
|
||||
|
||||
pos = lseek (file->priv->fd, 0, SEEK_CUR);
|
||||
|
||||
if (pos == (off_t)-1 &&
|
||||
errno == ESPIPE)
|
||||
if (pos == (off_t)-1 && errno == ESPIPE)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -437,9 +436,7 @@ _g_local_file_output_stream_create (const char *filename,
|
||||
else
|
||||
mode = 0666;
|
||||
|
||||
fd = g_open (filename,
|
||||
O_CREAT | O_EXCL | O_WRONLY,
|
||||
0666);
|
||||
fd = g_open (filename, O_CREAT | O_EXCL | O_WRONLY, mode);
|
||||
if (fd == -1)
|
||||
{
|
||||
int errsv = errno;
|
||||
@@ -480,9 +477,7 @@ _g_local_file_output_stream_append (const char *filename,
|
||||
else
|
||||
mode = 0666;
|
||||
|
||||
fd = g_open (filename,
|
||||
O_CREAT | O_APPEND | O_WRONLY,
|
||||
mode);
|
||||
fd = g_open (filename, O_CREAT | O_APPEND | O_WRONLY, mode);
|
||||
if (fd == -1)
|
||||
{
|
||||
int errsv = errno;
|
||||
@@ -863,9 +858,7 @@ _g_local_file_output_stream_replace (const char *filename,
|
||||
mode = 0666;
|
||||
|
||||
/* If the file doesn't exist, create it */
|
||||
fd = g_open (filename,
|
||||
O_CREAT | O_EXCL | O_WRONLY,
|
||||
mode);
|
||||
fd = g_open (filename, O_CREAT | O_EXCL | O_WRONLY, mode);
|
||||
|
||||
if (fd == -1 && errno == EEXIST)
|
||||
{
|
||||
|
Reference in New Issue
Block a user