diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-10-28 02:36:01 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-10-28 02:36:01 +0000 |
commit | 22b94483a3bcecf038ab531eefb023d1a578cfd8 (patch) | |
tree | 753c754e4049763b209278568d5fa98ce902afcc /hardinfo2 | |
parent | 789ca8b0d19be16b1ed7386b9b214cd2b66b0498 (diff) |
Cleanups
Diffstat (limited to 'hardinfo2')
-rw-r--r-- | hardinfo2/arch/linux/common/samba.h | 10 | ||||
-rw-r--r-- | hardinfo2/autopackage/default.apspec | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/hardinfo2/arch/linux/common/samba.h b/hardinfo2/arch/linux/common/samba.h index 5f5ecbe5..7c7d8bb7 100644 --- a/hardinfo2/arch/linux/common/samba.h +++ b/hardinfo2/arch/linux/common/samba.h @@ -24,7 +24,7 @@ scan_samba_shared_directories(void) GError *error = NULL; gchar **groups; gchar *smbconf; - gsize length; + gsize length = -1; gint i = 0; if (smb_shares_list) { @@ -33,9 +33,10 @@ scan_samba_shared_directories(void) keyfile = g_key_file_new(); - if (!g_file_get_contents("/etc/samba/smb.conf", &smbconf, &length, &error)) { + if (!g_file_get_contents("/etc/samba/smb.conf", &smbconf, &length, &error) || length == 0) { smb_shares_list = g_strdup("Cannot open /etc/samba/smb.conf=\n"); - g_error_free(error); + if (error) + g_error_free(error); goto cleanup; } @@ -45,7 +46,8 @@ scan_samba_shared_directories(void) if (!g_key_file_load_from_data(keyfile, smbconf, length, 0, &error)) { smb_shares_list = g_strdup("Cannot parse smb.conf=\n"); - g_error_free(error); + if (error) + g_error_free(error); goto cleanup; } diff --git a/hardinfo2/autopackage/default.apspec b/hardinfo2/autopackage/default.apspec index cdb40b8c..f8b73a6f 100644 --- a/hardinfo2/autopackage/default.apspec +++ b/hardinfo2/autopackage/default.apspec @@ -2,7 +2,7 @@ # Generated by mkapspec 0.2 [Meta] ShortName: hardinfo -SoftwareVersion: 0.4.1+SVN37 +SoftwareVersion: 0.4.1+SVN45 DisplayName: HardInfo $SOFTWAREVERSION RootName: @tia.mat.br/hardinfo:$SOFTWAREVERSION Summary: System profiler and benchmark tool |