Просмотр исходного кода

Qnetd: Return errors in test algorithm

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse 9 лет назад
Родитель
Сommit
197865ee46
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      qdevices/qnetd-algo-test.c

+ 2 - 2
qdevices/qnetd-algo-test.c

@@ -75,7 +75,7 @@ qnetd_algo_test_client_init(struct qnetd_client *client)
 
 	client->algorithm_data = malloc(sizeof(int));
 	if (client->algorithm_data == NULL) {
-		return (-1);
+		return (TLV_REPLY_ERROR_CODE_INTERNAL_ERROR);
 	}
 
 	algo_data = client->algorithm_data;
@@ -89,7 +89,7 @@ qnetd_algo_test_client_init(struct qnetd_client *client)
 
 		client->cluster->algorithm_data = malloc(sizeof(int));
 		if (client->cluster->algorithm_data == NULL) {
-			return (-1);
+			return (TLV_REPLY_ERROR_CODE_INTERNAL_ERROR);
 		}
 
 		algo_data = client->cluster->algorithm_data;